# Enable purchasing products

To enable adding product to cart and purchasing from the catalog, the following configuration is required:

- at least [one region and one currency for the shop](#region-and-currency)
- [VAT rates per region](#vat-rates) and for each product type
- at least one [price](https://doc.ibexa.co/en/latest/product_catalog/prices/index.md) for the product
- [availability](https://doc.ibexa.co/en/latest/product_catalog/products/#product-availability-and-stock) with positive or infinite stock for the product or product variant

Configuring products in the UI

After you configure the region, currency and VAT rates for regions in settings, the store manager must set up the remaining parameters in the UI, such as, [VAT rates per product type](https://doc.ibexa.co/projects/userguide/en/5.0/pim/create_product_types/#vat), descriptions, attributes, assets, [prices](https://doc.ibexa.co/projects/userguide/en/5.0/pim/manage_prices/), and [availability](https://doc.ibexa.co/projects/userguide/en/5.0/pim/manage_availability_and_stock/) per product.

For more information, see [User Documentation](https://doc.ibexa.co/projects/userguide/en/5.0/pim/products/#product-completeness).

## 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](https://doc.ibexa.co/en/latest/administration/configuration/configuration/#configuration-files):

```
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](https://doc.ibexa.co/en/latest/product_catalog/enable_purchasing_products/#configuring-other-regions-and-currencies).

```
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](#vat-rates).

### 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:

```
ibexa:
    repositories:
        default:
            product_catalog:
                engine: default
                regions:
                    germany: # Shorthand VAT configuration format
                        vat_categories:
                            standard: 19
                            reduced: 7
                            none: ~
                    poland: # Current VAT configuration format
                        vat_categories:
                            standard:
                                value: 23
                            reduced:
                                value: 8
                            zero:
                                value: 0
                            none:
                                value: 0
                                extras:
                                    not_applicable: true
```

Note

The above example presents two acceptable formats of VAT configuration. For each VAT category, setting a value to "null" (`~`) is equal to making the following setting:

```
                            none:
                                value: 0
                                extras:
                                    not_applicable: true
```

You can then assign VAT rates that apply to every product type in each of the supported regions. To do it, in the back office, [open the product type for editing](https://doc.ibexa.co/projects/userguide/en/5.0/pim/create_product_types/#vat), and navigate to the **VAT rates** area.
