This documentation is for a version that has reached its End Of Life. Such versions are no longer supported and don't receive security updates. Consider updating to a newer version.
The script creates the required data structures, but doesn't add any data to the database.
The users don't have any shopping lists, not even the default “My Wishlist” list.
The default shopping list is created automatically when the user triggers the "Add to wishlist" action for the first time.
By default, the maximum shopping list count per user is 10 and the maximum entries per list is 100.
When listing their shopping lists, the user 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:
The customer can always create the default shopping list if it doesn't exist yet, even if they have already reached the limit defined by max_lists_per_user.
So, for 10 as the default limit, the user may have 11 lists if the user created 10 custom lists before creating the default one.
If you want to restrict users to only the default shopping list, you can set max_lists_per_user to 0.
To allow customers to use the shopping list feature, create a new role and assign it to registered customer groups.
To restrict authenticated users access to only their own lists, you must grant the four functions from the Shopping List module with the limitation 'Shopping List Owner: Self'.
Otherwise, they will be able to interact with all shopping lists existing in the system.
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 910111213141516171819202122232425
-type:rolemode:createmetadata:identifier:Shopping List Userpolicies:-module:shopping_listfunction:createlimitations:-identifier:ShoppingListOwnervalues:[self]-module:shopping_listfunction:viewlimitations:-identifier:ShoppingListOwnervalues:[self]-module:shopping_listfunction:editlimitations:-identifier:ShoppingListOwnervalues:[self]-module:shopping_listfunction:deletelimitations:-identifier:ShoppingListOwnervalues:[self]
On a clean install, you can, for example, assign this "Shopping List User" role to the "Customers" user group.
After placing the migration content in src/Migrations/Ibexa/migrations/shopping_list_user.yaml, you can import and execute it with: