border-radius: 5px;
border: 1px solid rgba(0, 0, 0, 0.1);
}
+.oe_ecommerce .oe_product .oe_hidden {
+ visibility: hidden;
+}
.oe_ecommerce .oe_product .oe_ecommerce_price {
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.44);
text-align: center;
$(document).ready(function (){
$('.oe_ecommerce').on('click', '.oe_product .btn-success,.oe_product .btn-primary,.btn-inverse', function (e) {
+ var mycart = !!$('.oe_ecommerce .oe_mycart').size();
var $button = $(e.currentTarget);
var link = $button.hasClass('btn-inverse') ? '/shop/remove_cart' : '/shop/add_cart';
var $add = $button.parent().find('.btn-success,.btn-primary');
$add.find('.oe_quantity').html(quantity);
$add.toggleClass('btn-primary', !quantity).toggleClass('btn-success', !!quantity);
$remove.toggleClass('oe_hidden', !quantity);
- if (!quantity) {
+ if (mycart && !quantity) {
$button.parents('.oe_product:first').remove()
}
$('.oe_ecommerce .oe_total').replaceWith(''+result.totalHTML);
<t t-call="website_sale.products"/>
</t>
<t t-call="website_sale.total"/>
- <a t-if="order.order_line" href="/shop/customer"><button class="btn btn-success">Next stage</button></a>
+ <a t-if="order.order_line" href="/shop/customer"><button class="oe_mycart btn btn-success">Next stage</button></a>
</t>
</t>
</field>