Answer the question
In order to leave comments, you need to log in
Does the amount in the cart change depending on the quantity of the product?
The product has a price, it needs to be multiplied by the quantity of the product and output how can this be implemented in minishop2?
Don't know how to implement it?
so that when the quantity of goods changes, the amount also changes.
Answer the question
In order to leave comments, you need to log in
If the minishop is the latest version, then just wrap the cost in
<span class="ms2_cost">270</span>
If not. the simplest via js:
miniShop2.Callbacks.add('Cart.change.response.success', 'cart_change_ok', function() {
// проходишься по каждой строке товара и умножаешь цену на кол-во
$( "li" ).each(function( index ) {
console.log( index + ": " + $( this ).text() );
});
})
It will depend on how you implemented the logic of the online store, do you use only js or do you use php as well? in short, it
takes the value of the input, turns it into a number and multiplies by the price, depending on how you implemented the logic of the online store
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question