Updated price calculation in checkout

We scheduled breaking change in HTML and JavaScript of checkout process, which is going to break it in some blank templates and JavaScript addons or customizations without your cooperation. We need you to follow several steps listed below. It’s going to affect you if:
– you are using Blank template with custom JavaScript (on /admin/html-codes checked “Omit Shoptet Javascript”)
– you are using one of elements listed in tables below in your JavaScript

If you are affected by the second option, you can just check body for prices-original class and update your scripts according to this class. This class will be removed from body element together with new version of HTML described below.

If you are the author of Blank template with custom JavaScript, please follow the steps below.

First step

In HTML editor in Shoptet admin (as well as in administration of blank template addon), you can now use placeholder #ASSETS_POSTFIX#, which has currently value -prices-original. Rename all currently included assets from your-assets.js to your-assets-prices-original.js and include them this way:

<script src="http://cdn.myshoptet.com/usr/your-eshop.cz/user/assets/your-assets#ASSETS_POSTFIX#.js"></script>

For several days will be used assets with prefix -prices-original.

Second step

Please check DOM in checkout and adjust and test your script accordingly. Here is a list of upcoming changes. Please make sure that your scripts work with To be.


Previous state To be Description
data-billing-price data-billing-price-wv Price with VAT
data-billing-price-wv data-billing-price-wov Price without VAT
data-billing-price-vat VAT for the billing price
data-billing-price-id data-billing-price-id Internal billing price id


Previous state To be Description
data-shipping-price data-shipping-price-wv Price with VAT
data-shipping-price-wv data-shipping-price-wov Price without VAT
data-shipping-price-vat VAT for the shipping price
data-shipping-price-id data-shipping-price-id Internal shipping price id

Total price

Previous state To be Description
data-price-total data-price-total-wv Final price with VAT
data-price-total-wv data-price-total-wov Final price without VAT
data-price-total-vat VAT for the final price

Final step

After the new version of application with updated HTML will be released, we will let you know, so you could remove the #ASSETS_POSTFIX# and remove outdated your-assets-prices-original.js from FTP. You can also remove eventual conditions detecting prices-original class on body element.

Post navigation