K
K
kamisarlapsha2018-10-10 16:41:04
opencart
kamisarlapsha, 2018-10-10 16:41:04

How to display discount in OpenCart 2.3 cart?

Hey! Such a question, how can you display a variable $specialin the basket, so that, provided that the product has a discount, the price is displayed in the same way as in the product card. In general, so that the goods in the basket have the old and new prices.
Tried to add the following in cart.php controller:
'special' => $special,
But it doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2018-10-10
@kamisarlapsha

'special' => $special

Well, it's understandable why it doesn't work.
In general, with a basket, everything is not so simple. It uses the price already taking into account the selected options, discounts, etc. and it is considered in system/library/cart, and not taken directly from the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question