From 29c7f2e0396194d5012c3c33e677135aa59b8b2a Mon Sep 17 00:00:00 2001 From: Gautam Panday Date: Thu, 14 May 2015 13:12:56 +0530 Subject: [PATCH 1/3] Added tooltip when product is already added in cart #7727 --- templates/webshop/base.jinja | 8 ++++++++ templates/webshop/product.jinja | 31 +++++++++++++++++-------------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/templates/webshop/base.jinja b/templates/webshop/base.jinja index c967dd4..d5b240d 100644 --- a/templates/webshop/base.jinja +++ b/templates/webshop/base.jinja @@ -466,8 +466,16 @@ $.each(lines, function(index, line) { $(".product-" + line.product.id + "-buy-now-btn") .attr('disabled', 'disabled'); + var isDisabled=$(".product-" + line.product.id + "-buy-now-btn").prop('disabled'); + if(isDisabled){ + $('.tooltip-bottom-'+ line.product.id).tooltip({ + title: "This product is already added to the cart", + placement: "bottom" + }); + } }); } + function updatedCart(){ $.post("{{ url_for('nereid.website.user_status') }}", function(data){ var template = $("#cart-html-append").html(); diff --git a/templates/webshop/product.jinja b/templates/webshop/product.jinja index 8cb271b..f385e24 100644 --- a/templates/webshop/product.jinja +++ b/templates/webshop/product.jinja @@ -142,14 +142,15 @@ {% if product.salable %}
- - - - - - - +
+ + + + + + +
{% if product.type == 'goods' %} @@ -258,12 +259,14 @@ Add to Cart {% else %} {% endif %} {% else %} From fe5953e1fd1979e2f7d13167fcf023ce1f391ad0 Mon Sep 17 00:00:00 2001 From: Gautam Panday Date: Thu, 14 May 2015 18:58:39 +0530 Subject: [PATCH 2/3] Added message after product added to the cart #7727 --- static/css/style.css | 15 +++++++++++++-- templates/webshop/base.jinja | 30 +++++++++++++++++++----------- templates/webshop/product.jinja | 1 - 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 5d86375..ed09f61 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1674,7 +1674,7 @@ border-top: 1px solid rgba(248, 248, 248, 0.2); padding: 5px; } .related-products{ - padding-top: 5px; + padding: 5px 0 15px 0; } .product-short-description{ font-size: 13px; @@ -1778,7 +1778,7 @@ h3.product-item-name{ vertical-align: middle; } .btn-related-item-add-cart{ - margin: 10px 0 20px 0; + margin-top: 10px; } .order-detail-description .panel-default > .panel-heading{ background: transparent; @@ -1873,4 +1873,15 @@ h3.product-item-name{ } #search_form{ position: relative; +} +.cart-add-msg{ + background: #fff; + border: 1px solid #eee; + position: absolute; + top: auto; + right: 15px; + width: 242px; + margin-top: 17px; + z-index: 100; + padding: 10px; } \ No newline at end of file diff --git a/templates/webshop/base.jinja b/templates/webshop/base.jinja index d5b240d..f268e5e 100644 --- a/templates/webshop/base.jinja +++ b/templates/webshop/base.jinja @@ -188,6 +188,10 @@
  • {{ _('My Cart') }} 0
  • + {% endif %} @@ -341,6 +345,15 @@ + + diff --git a/templates/webshop/product.jinja b/templates/webshop/product.jinja index f385e24..09ea354 100644 --- a/templates/webshop/product.jinja +++ b/templates/webshop/product.jinja @@ -472,7 +472,6 @@ var wishlist_id = $(this).val(); var product_id = {{ product.id }}; var data = {'wishlist': wishlist_id, 'product': product_id, 'action': "add"} - console.log(data); $.ajax({ type: "POST", url: "{{ url_for('wishlist.wishlist.wishlist_product') }}", From 178a85070cc913b1719b7cf4d07b2f5e0b7ba54c Mon Sep 17 00:00:00 2001 From: Tarun Bhardwaj Date: Mon, 18 May 2015 15:09:22 +0530 Subject: [PATCH 3/3] Released version 3.4.1.10 --- tryton.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tryton.cfg b/tryton.cfg index 71e0193..116b343 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=3.4.1.9 +version=3.4.1.10 depends: nereid nereid_cms