# Pricing (Legacy)

{% hint style="danger" %}
As of April 2022, this concept has been marked as **legacy**.

To learn about the current pricing concept, check out the [Pricing guide](https://developer.emporix.io/ce/core-commerce/pricing-v2).
{% endhint %}

In the Emporix e-commerce system, prices apply to products sold on your storefront.

## Price types

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-b009e8e174ab7aa29b4e376d102378b23cce6be5%2Fprices.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Each product's price information includes two price types. They are described in the table below.

| Price type         | Description                                                                                                                                         |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Presentation price | Price presented to the customers on the storefront.                                                                                                 |
| Base price         | <p>Price per base measurement unit (such as a kilogram or liter).<br>It is often used by customers to compare the prices of different products.</p> |

## Examples of price setups

| Example of product                                                  | Bananas                                                                                                                                                                          | Chocolate spread                                                                                                                                                     | Bottled juice                                                                                                                                |
| ------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description**                                                     | <p>Customers can order bananas by pieces.<br><br>One banana weighs approximately 180 grams.<br><br>The final price of the product depends on its actual weight in kilograms.</p> | <p>Customers can order chocolate spread by packaging.<br><br>One packaging contains 450 grams of chocolate spread.<br><br>Base price is calculated per kilogram.</p> | <p>Customers can order juice by bottles.<br><br>One bottle contains 500 milliliters of juice.<br><br>Base price is calculated per liter.</p> |
| **Original and** [**effective**](#user-content-fn-1)[^1] **amount** | 0.36 EUR                                                                                                                                                                         | 2.99 EUR                                                                                                                                                             | 0.99 EUR                                                                                                                                     |
| **Measurement unit**                                                | Piece                                                                                                                                                                            | Piece                                                                                                                                                                | Piece                                                                                                                                        |
| **Base price**                                                      | 1.99 EUR                                                                                                                                                                         | 6.64 EUR                                                                                                                                                             | 1.98 EUR                                                                                                                                     |
| **Base price unit**                                                 | Kilogram                                                                                                                                                                         | Kilogram                                                                                                                                                             | Liter                                                                                                                                        |
| **Presentation price**                                              | 1.99 EUR                                                                                                                                                                         | 2.99 EUR                                                                                                                                                             | 0.99 EUR                                                                                                                                     |
| **Presentation price unit**                                         | Kilogram                                                                                                                                                                         | Piece                                                                                                                                                                | Piece                                                                                                                                        |

## Sales promotions

You can put products on sale and specify the date range in which the sale price applies. Discounts can be applied either as a percentage of the original price or as a fixed amount.

<details>

<summary>See example of a <code>Price</code> object with the sale price configured</summary>

```json
{
  "id": "61b9dcb2cfa47f0001e0e75d",
  "productId": "61b9dc9ff5758b79d5815892",
  "siteCode": "main",
  "currency": "EUR",
  "originalAmount": 0.3582,
  "effectiveAmount": 0.2682,
  "measurementUnit": {
    "quantity": "1.0",
    "unitCode": "H87"
  },
  "basePrice": {
    "originalAmount": 1.99,
    "effectiveAmount": 1.49,
    "measurementUnit": {
      "quantity": 1.0,
      "unitCode": "KGM"
    }
  },
  "presentationPrice": {
    "originalAmount": 1.99,
    "effectiveAmount": 1.49,
    "measurementUnit": {
      "quantity": 1.0,
      "unitCode": "KGM"
    }
  },
  "customAttributes": {},
  "salePrice": {
    "discountRate": 25.0,
    "description": "25% off!"
  },
  "metadata": {
    "mixinMetadata": {
      "mixins": {}
    }
  }
}
```

</details>

<details>

<summary>See example of a <code>Product</code> object with the sale price configured</summary>

```json
{
  "id": "61b9dc9ff5758b79d5815892",
  "code": "SALEPRICE",
  "name": {
    "localizedMap": {
      "en": "Product on sale"
    },
    "multiLanguage": true
  },
  "description": {
    "localizedMap": {
      "en": "Product created for documentation purposes."
    },
    "multiLanguage": true
  },
  "published": true,
  "mixins": {
    "salePricesData": {
      "salePrices": [
        {
          "enabled": true,
          "salePriceAmount": 1.49,
          "salePriceEnd": "2021-12-31T23:59:00.000+0000",
          "salePriceStart": "2021-12-23T00:00:00.000+0000"
        }
      ]
    },
    "productCustomAttributes": {
      "activeTab": "ProductDescription",
      "categoryPath": {
        "categoryLevel1": "example-category-1",
        "prettyName": "product-on-sale",
        "categoryLevel2": "",
        "categoryLevel3": ""
      },
      "defaultOrderQuantity": 1,
      "inStock": true,
      "maxOrderQuantity": 10,
      "minOrderQuantity": 1,
      "orderUnit": "H87",
      "pricingMeasure": {
        "unitCode": "KGM",
        "value": 1
      },
      "pricingMeasurePrice": 1.99,
      "productState": "prepare",
      "taxClass": "FULL",
      "unitPricingBaseMeasure": {
        "unitCode": "KGM",
        "value": 1
      },
      "unitPricingMeasure": {
        "unitCode": "GRM",
        "value": 180
      },
      "weightDependent": true
    }
  },
  "metadata": {
    "mixinMetadata": {
      "mixins": {
        "salePricesData": "https://res.cloudinary.com/saas-ag/raw/upload/schemata/salePriceData.json",
        "productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/v1560527845/schemata/CAAS/productCustomAttributesMixIn-v38.json"
      }
    },
    "schema": "https://res.cloudinary.com/saas-ag/raw/upload/v1544786405/schemata/CAAS/product.v2"
  }
}
```

</details>

## Taxes

When you configure a product, you select its tax class from classes configured for a particular site.

Product prices are stored as gross values. Their net values are calculated when an invoice is created.

{% hint style="warning" %}
If you want to display net prices on your storefront, you need to deduct the tax from the gross price according to the following formula:

**Net price = Gross price / (1 + (Tax rate / 100))**
{% endhint %}

[^1]: Price that customers pay per order unit. If a product is on sale, this value is different from the original amount. Otherwise, both values are the same.
