Permalink
Browse files

[FIX] website_sale: click first image in carousel does not work

- Activate the `group_website_multiimage` in the website settings
- Add several images on a product
- On the eCommerce, click on the second image, then the first one

The click on the first image doesn't work.

This is because `t-att-data-slide-to="0"` is removed from the attributes
(probably because evaluated as falsy).

opw-1884368

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
  • Loading branch information...
caburj and nim-odoo committed Oct 9, 2018
1 parent c2688e4 commit 3df584f5a68ec61a719dc34b59028e9a4c230edf
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/website_sale/views/templates.xml
@@ -428,7 +428,7 @@
<li t-if="variant_img" data-target="#o-carousel-product" data-slide-to="0" class="active">
<img class="img img-responsive js_variant_img_small" t-attf-src="/website/image/product.product/{{product.product_variant_id.id}}/image/90x90" t-att-alt="product.name"/>
</li>
<li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else 0" t-att-class="'' if variant_img else 'active'">
<li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else '0'" t-att-class="'' if variant_img else 'active'">
<img class="img img-responsive" t-attf-src="/website/image/product.template/{{product.id}}/image/90x90" t-att-alt="product.name"/>
</li>
<t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg">

0 comments on commit 3df584f

Please sign in to comment.