P
P
pavelmosin2019-12-09 12:19:36
1C-Bitrix
pavelmosin, 2019-12-09 12:19:36

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
5dee113f171e8242887687.jpeg
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

2 answer(s)
Y
Yaroslav Alexandrov, 2019-12-09
@alexyarik

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,

I
Igor Ionov, 2019-12-10
@easymanner

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 question

Ask a Question

731 491 924 answers to any question