Z
Z
zooey1632017-02-18 16:21:13
PHP
zooey163, 2017-02-18 16:21:13

How to dynamically recalculate sale.basket.basket.line for multiple price types with the OnGetOptimalPrice event?

Good afternoon. Tell me how to completely update sale.basket.basket.line, which dynamically changes the price and quantity indicators when adding a product?
A product has several types of prices. Depending on the total amount in the cart, the price types of the goods change. This is implemented using the OnGetOptimalPrice event in init.php. On the basket page, everything is successfully recalculated both in the basket itself (sale.basket.basket) and in the small basket (sale.basket.basket.line). But on other pages, sale.basket.basket.line, when a certain value is reached, changes the price only for the last added product, while other products remain with the wrong (previous) price. How to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2017-02-18
@Logic87

You need to debug and see everything that is in the event that is being processed.
Also, as an option, try to see the result on the default sale.basket.basket.line template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question