Learn more about Pixlpark Web-to-Print service

Usage of pricing constants

If you want prices on your website to be always up to date and change automatically you can use pricing constants in the HTML-pages.

They can be found in options for every product:

Price constants in product settings

How to use price constants?

  1. – this is a sample for the pricing:

    price – is a necessary part denoting a price of a total print run;

    url – is a necessary part denoting an address of a product;

    cUrl – is a necessary part denoting an address of a product category;

    q – is an optional part denoting the number of products in a displayed price. If this option is not added the price for a print run will be displayed;

    p – is an optional part denoting the number of pages in a displayed price. This option work only for multi-page products;

    complex product

    surface и zone – are optional parts denoting that the price of a printing surface (surface) and printing zone will be added to the price. Pay attention that those parts only work together and in the following order.

    *Values of all parts except for url и cUrl, can be only equal to numbers and are added after «:».

  2. priceWithCustomWorks denotes that the price displayed would also take into account options attached to the product. For the options, the position with the least possible cost is used. For example, the cost of a print run is 100 rubles, and a minimal price of an option is 30 rubles the price displayed will be 130 rubles.
  3. Pay attention that options with a size value won't be added to the pricing constants.

  4. – in this case option pricePerItem denotes that the price for only 1 item will be displayed. This way if the product print run is equal to 100 items and costs 300 rubles the price for one item will be 300/100 = 3.
  5. priceString or pricePerItemString parts are used to display prices with a currency symbol.

Pay attention that for different types of editors various pricing constants are used. The settings are available for every product.

Here is an example

The t-shirt has two printing surfaces (back and front) and four printing zones.

In the main settings, you can find available settings for the pricing constants for this product.
In the Circulation field, you can find only one rule with a minimal quantity equal to 1 and price equal to 300. Thus, you don't need to add q (quantity) settings since you have only 1 rule (it will be used by default since it's the only 1).

You also don't need p (page) option since the product doesn't have multiple pages.

Item customization Setting up product printing zones

There are prices for every printing zone, so you'll need such options as surface and zone.

Setting up product printing zones Setting up product printing zones

Usually, minimal prices for the product are added on a website like in this example.

In the product settings, you can find 2 surfaces. Each of them has 4 printing zones. The minimal cost of an order can be equal to the price from 1 side, that's why the minimal cost of printing is equal to 4,5 euro.

Pay attention, the price of the t-shirt is based on the options, that's why we won't find it anywhere in the product settings. That's how it looks on a website: http://demo.pixlpark.com/printing/t-shirts/man-white/editor

To display the minimal cost for an option, you can use priceWithCustomWorks option.

The pricing constant for the 3 printing zone (in our case it doesn't matter if it's the first or second surface since the prices for them are the same) will look this way:

[$ price(url: man-red, surface:1, zone:2) $]

In order to show the price with its options, you can combine various options. Here is one of the examples:

[$ priceWithCustomWorksString(url: man-red, surface:1, zone:2) $]

In this case, we will see a price for the 3 printing zone on the 1 surface that takes into account the minimal price of options.

That's how you add a price constant to the page.

Разметка страницы