Skip to content

Enable purchasing products

To enable purchasing from the catalog, the following configuration is required:

Product completeness

You can track required tasks related to product configuration in product view's Completeness tab.

Product completeness

This page shows which tasks are finished for the given product, and which are still awaiting completion.

Click the edit button next to an unfinished task to move directly to the screen where you can add the missing information.

Note

By default, the anonymous user does not have permissions to view products. To change this, add the Product/View Policy to the Anonymous Role.

Region and currency

All currencies available in the system must be enabled in the Back Office under Product Catalog -> Currencies.

Additionally, you must configure currencies valid for specific SiteAccesses under the ibexa.system.<scope>.product_catalog.currencies configuration key:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ibexa:
    system:
        default:
            product_catalog:
                currencies:
                    - EUR
                    - GBP
                    - PLN
                regions:
                    - germany
                    - uk
                    - poland

In the ibexa_storefront.yaml file, under the ibexa.system.<scope>.product_catalog.regions configuration key, regions are set with default value. Remember to either exclude this element or extend it by configuring other regions.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
ibexa:
    system:
        storefront_group:
            product_catalog:
                currencies:
                    - EUR
                    - PLN
                regions:
                    - germany
                    - poland 
        another_storefront_group:
            product_catalog:
                currencies:
                    - GBP
                regions:
                    - uk

This example uses the currencies and regions set in the VAT rates' example below.

Configuring other regions and currencies

By default, the system always uses the first currency and the first region configured.

To implement a different logic, for example a switcher for preferred currencies and regions, you need to subscribe to Ibexa\Contracts\ProductCatalog\Events\CurrencyResolveEvent and Ibexa\Contracts\ProductCatalog\Events\RegionResolveEvent in your customization.

VAT rates

You set up VAT percentage values corresponding to VAT rates in configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
ibexa:
    repositories:
        default:
            product_catalog:
                engine: default
                regions:
                    germany:
                        vat_categories:
                            standard: 19
                            reduced: 7
                            none: ~
                    uk:                                               
                        vat_categories:                            
                            standard: 20                            
                            reduced: 5                            
                            none: ~
                    poland:                                               
                        vat_categories:                            
                            standard: 23                            
                            reduced: 8                            
                            none: ~

You can configure which VAT rate to use per product type in the Back Office.

In the product type editing mode, access the definition of the Product Specification Field.

Setting up VAT rates for product type

Product price

The product must have at least one price configured.

Product availability

To enable adding a product to cart, you must configure product availability with positive or infinite stock.