Install Shopping list¶
Install framework¶
Run the following command to install the package:
1 | |
The associated recipe declares the bundle and its routes.
Check that the following line have been added by the recipe to config/bundles.php file's array:
1 | |
And that you have a config/routes/ibexa_shopping_list.yaml file configuring the following routes:
1 2 3 4 5 6 | |
Modify database schema¶
Add the tables needed by the bundle:
1 | |
1 | |
TODO: possible charset issue, see https://github.com/ibexa/doctrine-schema/pull/38
Notice that a user has no shopping list at this stage, not even the default "My Wishlist" one. Each user's default shopping list is created when used for the first time.
Configure¶
By default, the maximum shopping list count per user is 10 custom plus 1 default, and the maximum entries per list is 100. When listing their shopping list, the use see 25 lists per page (and as it's over the shopping list count, there is always one page of shopping lists in this default scenario).
You can override the following parameters to change their values:
1 2 3 4 | |
Notice that if a customer reach the max_lists_per_user, if not already created, this customer can still create the default shopping list.
If you want to restrict to only the default shopping list, you can set max_lists_per_user to 0.
Shopping list user role¶
Create a new role and then assign it to registered customer groups who should be able to use this feature. The four functions from the Shopping List module must be granted with the limitation 'Shopping List Owner: Self' to restrict authenticated users to only their own lists. Anonymous users can't have shopping lists as they're internally sharing the same account.
To create such role, you can use a migration file, for example, with the following content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
On a clean install, you can, for example, assign this "Shopping List User" role to the "Customers" user group.