Help

Examples Quick start

Calculations

A calculation contains your definitions how a product will be billed. You create input fields for your customers and a formula that is used to calculate the order quantity from the input fields.

To associate a calculation to your products you'll have to log into your shop's SEOshop backoffice and add a new custom field to the product that has the same name as the calculation.

Name

The calculation's name is used to identify the custom field, that indicates a product as calculatable.

Adding custom fields

This is how you can add new custom fields:

  • Click Products in the sidebar on the left
  • Select the product
  • Click Custom fields, a tab on the top
  • Click the green (+) on the very top

In the fomula, that just appeared, enter this:

  • Type: Text Field
  • Name: Your calculation's name
  • Custom field set: -------

After clicking Save you'll see the new custom fields' settings.

Attention: the name may have been automatically translated. The internationalization capabilities of Pricen are unfortunately limited right now, but we're working hard on a solution.

If you want to use the calculation (with the same calculation field names) in shops of other languages after all, you'll have to change the translated names to the original one.

Formula

The formula is used to calculate the order quantity of the product in your shop. In other words: the product price is a unit price and the formula results in the count of units, calculated using the customer's input.

When editing a calculation the formula is an input field, that can be also filled with labels representing the customer's input fields.

Let's say you want to create a calculation for a product billed by area, your formula could look like this:

Width (m) * Height (m) * 1.5

So if the customer wants to order 2x4 meters of this article, while entering the values the order quantity will be set to 12, invisible to the customer. (2 * 4 * 1.5 = 12)

Attention: Order quantities are always integers for SEOshop, that means the formula's result will be rounded to the next integer. (With a minimum of 1)

Attention: SEOshop doesn't support order quantities over 65,535, so take care that your formulas can't result in numbers higher than this limit.

Attention: By default products have an order quantity limit of 10,000. If your formula can result in numbers higher than this limit, you'll have to change that in your shop's backoffice. Unfortunately it's not possible for Pricen to recognize these limits via SEOshop's API for you.

This is how you change the limit:

  • Open the product in the backoffice
  • Select the tab Prices & stock
  • Click the entry
    • If there are no entries in this list you'll have to create one using the green (+) at the very top of the page.
  • Under Inventory in Maximum quantity enter "9999999999". (Will automatically set to the internal maximum.)
  • Save

Rounding

Since SEOshop only supports integers in the order amount field and your formulas might result in decimal numbers, we let you decide how to round the resulting order amount in your shop.

You can select from the following:

  • Commercially (to the nearest integer)
  • Round up
  • Round down

Fields

The calculation fields are the input fields your customer will be able to fill on the product page of your shop. Using the entered values in the formula Pricen calculates the order quantity. A calculation can contain any number of fields, but all of them need to be used in the formula.

A calculation has to contain at least one field.

Name

The field's name will be used as a label in the shop.

Type

There are two types of fields:

  • Number: an ordinary input field
  • Select: a dropdown with predefined options

Number

A basic input field that only allows numbers. With this type you can set a minimum, maximum and the amount of decimal places the customer can enter.

Select

If you want to offer only a couple of options for your customers this is the type you should use. A select can contain any number of options, each with a name and a numeric value that's used in the formula.