Skip to content
For AI agents: the complete documentation index is available at llms.txt; this page is also available as Markdown at index.md.

Configure shopping list

Configure limits

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:

1
2
3
4
parameters:
    ibexa.site_access.config.default.shopping_list.limits.max_lists_per_user: 10
    ibexa.site_access.config.default.shopping_list.limits.max_entries_per_list: 100
    ibexa.site_access.config.default.shopping_list.pagination.list_per_page_limit: 25

Max lists per user and default shopping list

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.

Shopping list user role

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
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-   type: role
    mode: create
    metadata:
        identifier: Shopping List User
    policies:
        -   module: shopping_list
            function: create
            limitations:
                -   identifier: ShoppingListOwner
                    values: [self]
        -   module: shopping_list
            function: view
            limitations:
                -   identifier: ShoppingListOwner
                    values: [self]
        -   module: shopping_list
            function: edit
            limitations:
                -   identifier: ShoppingListOwner
                    values: [self]
        -   module: shopping_list
            function: delete
            limitations:
                -   identifier: ShoppingListOwner
                    values: [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:

1
php bin/console ibexa:doctrine:migrations:migrate --file=shopping_list_user.yaml --siteaccess=admin