D
D
Dmitry Grabko2017-04-27 11:45:52
PHP
Dmitry Grabko, 2017-04-27 11:45:52

How to update the discount value of a product without refreshing the page?

Hello!

Discounts are set on the site depending on the total cost of the order. The cart shows the discount amount, but the value is updated only after the page is refreshed.

I found the discount output itself and the component script, but I can’t figure out how to add processing through ajax of the discount value

<td class="fwb">
              <?if (floatval($arResult["DISCOUNT_PRICE_ALL"]) > 0):?>
                <span class="sale-value">Ваша скидка составляет <?=$arResult["FULL_DISCOUNT_LIST"][0]["ACTIONS_LIST"]["CHILDREN"][0]["DATA"]["Value"]?>% </span>
              <?endif;?>
            
            </td>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question