Answer the question
In order to leave comments, you need to log in
How to display the total amount for each product in the Minishop2 cart?
It is necessary to display the total amount of the goods in the basket, so that it is updated when the quantity of goods for each product changes,
I could not find a solution.
This method is not suitable.
{$product.count * $product.price|replace:" ":""}
How is it possible to implement?
Answer the question
In order to leave comments, you need to log in
Если минишоп последней версии, то просто оберни стоимость в
<span class="ms2_cost">270</span>
Если нет. то самое простое через js:
miniShop2.Callbacks.add('Cart.change.response.success', 'cart_change_ok', function() {
// проходишься по каждой строке товара и умножаешь цену на кол-во
$( "li" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
});
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question