Skip to content

Commit c79526b

Browse files
[IMP] website_sale_insurance_caser: Change the selector so that the quantity selector for the “Add to Cart” button does not move
TT59185
1 parent a5049a7 commit c79526b

2 files changed

Lines changed: 47 additions & 42 deletions

File tree

website_sale_insurance_caser/README.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ purchase insurance for their products directly from the online store.
3333

3434
This module extends **sale_insurance_caser** by adding:
3535

36-
- Checkbox on product page to add insurance
37-
- Interactive modal at checkout offering insurance for uncovered
38-
products
39-
- Visual badges identifying insurance lines in the cart
40-
- Automatic synchronization between cart and insurance lines
36+
- Checkbox on product page to add insurance
37+
- Interactive modal at checkout offering insurance for uncovered
38+
products
39+
- Visual badges identifying insurance lines in the cart
40+
- Automatic synchronization between cart and insurance lines
4141

4242
**Table of contents**
4343

@@ -49,16 +49,16 @@ Configuration
4949

5050
1. **Configure the base module** ``sale_insurance_caser``:
5151

52-
- Define price ranges (``caser.price.range``)
53-
- Configure insurance products
54-
- Set up Caser API credentials
52+
- Define price ranges (``caser.price.range``)
53+
- Configure insurance products
54+
- Set up Caser API credentials
5555

5656
2. **Enable insurance on eCommerce products**:
5757

58-
- Go to *Inventory > Products > Products*
59-
- Open a product you want to offer with insurance
60-
- In the **Sales** tab, check the **Caser Insurance in eCommerce**
61-
checkbox
58+
- Go to *Inventory > Products > Products*
59+
- Open a product you want to offer with insurance
60+
- In the **Sales** tab, check the **Caser Insurance in eCommerce**
61+
checkbox
6262

6363
Usage
6464
=====
@@ -83,9 +83,9 @@ Usage
8383
uninsured products
8484
7. The modal displays:
8585

86-
- Product image and name
87-
- Insurance price per unit and total
88-
- Toggle switches to select which products to insure
86+
- Product image and name
87+
- Insurance price per unit and total
88+
- Toggle switches to select which products to insure
8989

9090
8. Upon confirmation, page reloads with new insurance lines added
9191

@@ -110,9 +110,9 @@ Authors
110110
Contributors
111111
------------
112112

113-
- `Tecnativa <https://www.tecnativa.com>`__:
113+
- `Tecnativa <https://www.tecnativa.com>`__:
114114

115-
- Juan Carlos Oñate
115+
- Juan Carlos Oñate
116116

117117
Maintainers
118118
-----------

website_sale_insurance_caser/views/templates.xml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,45 @@
55
inherit_id="website_sale.product"
66
name="Caser Insurance Checkbox"
77
>
8-
<xpath expr="//div[@id='add_to_cart_wrap']" position="before">
8+
<xpath expr="//div[@id='o_wsale_cta_wrapper']/*" position="before">
99
<t
1010
t-if="website.caser_insurance_enabled and product.caser_insurance_ecommerce"
1111
>
1212
<t
1313
t-set="caser_price_display"
1414
t-value="product.get_caser_insurance_price_display(combination_info['price'])"
1515
/>
16-
<div class="mb-3 w-100">
17-
<div>
18-
Tu dispositivo protegido, pase lo que pase
16+
<div class="p-2 mb-3 w-100 border border-secondary">
17+
<div class="d-flex align-items-center justify-content-between">
18+
<div class="me-3">
19+
<div>Tu dispositivo protegido, pase lo que pase</div>
20+
<t t-if="caser_price_display">
21+
<div class="form-check">
22+
<input
23+
type="checkbox"
24+
class="form-check-input"
25+
id="caser_insurance_checkbox"
26+
name="caser_add_insurance"
27+
value="1"
28+
/>
29+
<label
30+
class="form-check-label"
31+
for="caser_insurance_checkbox"
32+
>
33+
Seguro anual por <t
34+
t-esc="caser_price_display"
35+
/>
36+
</label>
37+
</div>
38+
</t>
39+
</div>
1940
<img
20-
src="/website_sale_insurance_caser/static/src/img/logo-caser.png"
21-
alt="Caser"
22-
style="height: 30px; margin-left: 10px;"
23-
/>
41+
src="/website_sale_insurance_caser/static/src/img/logo-caser.png"
42+
alt="Caser"
43+
class="d-block flex-shrink-0"
44+
style="height: 30px;"
45+
/>
2446
</div>
25-
<t t-if="caser_price_display">
26-
<div class="form-check">
27-
<input
28-
type="checkbox"
29-
class="form-check-input"
30-
id="caser_insurance_checkbox"
31-
name="caser_add_insurance"
32-
value="1"
33-
/>
34-
<label
35-
class="form-check-label"
36-
for="caser_insurance_checkbox"
37-
>
38-
Seguro anual por <t t-esc="caser_price_display" />
39-
</label>
40-
</div>
41-
</t>
4247
</div>
4348
</t>
4449
</xpath>

0 commit comments

Comments
 (0)