diff options
| author | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2020-07-13 08:50:18 +0000 |
|---|---|---|
| committer | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2020-07-17 14:23:30 +0000 |
| commit | cf741bb7fc76b6947f244e469f344fa442aad23c (patch) | |
| tree | ce1c993c0ff1f5e794d2715edf56988fad26613e | |
| parent | ef709fd92b7b22a58e60715c9ff7ab4476a83ca5 (diff) | |
[FIX] website_sale_coupon: display product image for rewards
Go to web shop as guest
Add 10 office chair black
Go to checkout
Add coupon code 10pc
Image for the reward prod will be displayed correctly
Proceed in checkout flow
Image is not displayed anymore
opw-2289771
closes odoo/odoo#54684
X-original-commit: 913ed0460b68537f9653c175996e3f58d3c81a40
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
| -rw-r--r-- | addons/website_sale_coupon/views/website_sale_templates.xml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/website_sale_coupon/views/website_sale_templates.xml b/addons/website_sale_coupon/views/website_sale_templates.xml index 50ae43b1b84..5d67838fab4 100644 --- a/addons/website_sale_coupon/views/website_sale_templates.xml +++ b/addons/website_sale_coupon/views/website_sale_templates.xml @@ -6,6 +6,16 @@ <script type="text/javascript" src="/website_sale_coupon/static/tests/tours/website_sale_coupon.js"></script> </xpath> </template> +<template id="website_sale_coupon_cart_summary_show_img" inherit_id="website_sale.cart_summary"> + <xpath expr="//td[hasclass('td-img')]/span" position="attributes"> + <attribute name="t-if">not line.is_reward_line or not line.sudo().product_id.image_128</attribute> + </xpath> + <xpath expr="//td[hasclass('td-img')]/span" position="after"> + <span t-if="line.is_reward_line and line.sudo().product_id.image_128"> + <img t-att-src="image_data_uri(line.sudo().product_id.image_128)" class="img o_image_64_max rounded"/> + </span> + </xpath> +</template> <template id="website_sale_coupon_cart_hide_qty" inherit_id="website_sale.cart_lines"> <xpath expr="//td[hasclass('td-img')]/span" position="replace"> <t t-if="line.is_reward_line and line.sudo().product_id.image_128"> |
