Answer the question
In order to leave comments, you need to log in
Bitrix CMS - how to add a price calculation formula?
Hello!
I am developing an online store website on CMS Bitrix.
There are products where the standard functionality of adding the quantity of the product and calculating the price from the quantity of the product is suitable,
but there are also those products where the user needs to specify not just the quantity of the product, but the cut, i.e.
for example, a metal tile product, the width of all products is already set (the value is taken from 1C), you also need to set the length and number of such sheets. Further, the formula for calculating the price will be as follows:
Area = Width (already set in the product) * Length (specified by the client) * Quantity
Next, the Amount is calculated as follows:
Amount = Price * Area The
question is:
How can I transfer the calculated area to the Bitrix product quantity value?
Then the formula for calculating the price will not have to be changed.
Or how can I add a new formula for calculating the price, then I still need to somehow transfer this new value of Area to the basket and then to the order?
I am attaching screenshots.
The bitrix.catalog.cection template needs to be improved - where the list of category products is displayed,
and the bitrix.catalog.element template of the product card (i.e. the page template with detailed information about the product)
Here is a screenshot of the bitrix.catalog.cection template, here the product needs to be set slicing
Here is a screenshot of the bitrix.catalog.cection template, here the product does not need to set the slicing and the usual form for adding the number of products works
Answer the question
In order to leave comments, you need to log in
Use units of measure.
Your price will be n rubles per square meter.
She will count herself.
Well, or add the handling of the "add to cart" event, and in it check whether you need to calculate the price and take the necessary actions
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question