Answer the question
In order to leave comments, you need to log in
Relationship of price types to location?
Good afternoon.
The task is this:
There is a type of prices for different cities. For example, a product in Moscow costs 2000, in Voronezh 3000.
When placing an order, there is a standard field Location
It is logical that if the user chooses Moscow, the price should change to Moscow, and if Voronezh, then to Voronezh.
Has anyone implemented this?
Bitrix TP replied that there was no basket by location from the box for recalculating the basket ...
Answer the question
In order to leave comments, you need to log in
Write your function in init.php function get_price_code()
Location IDs are most likely stored in $_COOKIE
Set your function to match price types to location
In the component settings , call the
"PRICE_CODE" => get_price_code() function,
In terms of logic, it's not quite right. Not all prices vary by region. And let's say there may be situations when the balance, and the availability of goods depends on the region. That is, here it is necessary to formalize the task, not to miss anything.
Yaroslav Alexandrov and your code for both editions (MB and B) is suitable?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question