D
D
DotDash2019-03-13 18:30:39
MODX
DotDash, 2019-03-13 18:30:39

How to sum the output of a snippet and a third-party number in modx evo?

The value of the shopkeeper cart price variable is displayed in the cart-amount block.
There is also a delivery amount that changes depending on the condition via javascript in the delivery field. The condition is chosen by the fact.
It is necessary that in the next block these data be combined into a total amount and go to cart-total-amount

<p>Сумма заказа: <span class="cart-amount">[+totalPrice+] р</span></p>
<p>Доставка: <span class="delivery"></span></p>
<p>итого:  <span class="cart-total-amount"></span></p>

What is the best way to take the value of the totalPrice variable and add it to the actual delivery if the page is already loaded? get cart-amount value? Or is a variable better?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DotDash, 2019-10-01
@DotDash

Display the variable as usual, and then take the value and perform the necessary operations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question