[IMP] website_sale, *: adapt CTA style in product pages

*: website_sale_loyalty, website_sale_product_configurator

task-3097005

closes odoo/odoo#120302

Related: odoo/design-themes#687
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Brieuc-brd
2023-10-08 10:45:45 +00:00
committed by qsm-odoo
parent 010c0470db
commit 11df0a1187
8 changed files with 11 additions and 11 deletions
@@ -18,7 +18,7 @@
run: 'text Wood',
}, {
id: 'add_cart_step',
trigger: 'a:contains(ADD TO CART)',
trigger: 'a:contains(Add to cart)',
run: 'click',
},
tourUtils.goToCart(),
@@ -109,7 +109,7 @@ wTourUtils.registerWebsitePreviewTour('shop_customize', {
},
{
content: "click on 'Add to Cart' button",
trigger: "iframe a:contains(ADD TO CART)",
trigger: "iframe a:contains(Add to cart)",
},
{
content: "check quantity",
@@ -64,7 +64,7 @@ wTourUtils.registerWebsitePreviewTour('shop_list_view_b2c', {
},
{
content: "click on 'Add to Cart' button",
trigger: 'iframe a:contains(ADD TO CART)',
trigger: 'iframe a:contains(Add to cart)',
},
tourUtils.goToCart({backend: true}),
{
@@ -49,7 +49,7 @@ registry.category("web_tour.tours").add('tour_shop_multi_checkbox', {
},
{
content: "add to cart",
trigger: 'a:contains(ADD TO CART)',
trigger: 'a:contains(Add to cart)',
},
tourUtils.goToCart(),
{
@@ -19,7 +19,7 @@ registry.category("web_tour.tours").add('tour_shop_no_variant_attribute', {
},
{
content: "add to cart",
trigger: 'a:contains(ADD TO CART)',
trigger: 'a:contains(Add to cart)',
},
tourUtils.goToCart(),
{
+4 -4
View File
@@ -1045,9 +1045,9 @@
<t t-set="ctaSizeBig" t-value="not hasQuantities or not hasBuyNow"/>
<div id="add_to_cart_wrap" t-attf-class="{{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-flex'}} align-items-center mb-2 me-auto">
<a data-animation-selector=".o_wsale_product_images" role="button" id="add_to_cart" t-attf-class="btn btn-primary js_check_product a-submit flex-grow-1 #{'btn-lg' if ctaSizeBig else ''}" href="#">
<a data-animation-selector=".o_wsale_product_images" role="button" id="add_to_cart" t-attf-class="btn btn-primary js_check_product a-submit flex-grow-1" href="#">
<i class="fa fa-shopping-cart me-2"/>
<span style="font-weight: bold">ADD TO CART</span>
Add to cart
</a>
</div>
<div id="product_option_block" class="d-flex flex-wrap w-100"/>
@@ -1229,7 +1229,7 @@
<attribute name="t-value" remove="false" add="true" separator=" "/>
</xpath>
<xpath expr="//div[@id='add_to_cart_wrap']" position="before">
<div t-attf-class="css_quantity input-group {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-flex'}} me-2 mb-2 align-middle #{'input-group-lg' if ctaSizeBig else ''}" contenteditable="false">
<div t-attf-class="css_quantity input-group {{'d-none' if combination_info['prevent_zero_price_sale'] else 'd-inline-flex'}} me-2 mb-2 align-middle" contenteditable="false">
<a t-attf-href="#" class="btn btn-link js_add_cart_json" aria-label="Remove one" title="Remove one">
<i class="fa fa-minus"></i>
</a>
@@ -1248,7 +1248,7 @@
<xpath expr="//a[@id='add_to_cart']" position="after">
<a role="button" t-attf-class="btn btn-outline-primary o_we_buy_now ms-1 #{'btn-lg' if ctaSizeBig else ''}" href="#">
<i class="fa fa-bolt me-2"/>
<span style="font-weight:bold">BUY NOW</span>
Buy now
</a>
</xpath>
</template>
@@ -21,7 +21,7 @@ registry.category("web_tour.tours").add('shop_sale_loyalty', {
},
{
content: "click on 'Add to Cart' button",
trigger: "a:contains(ADD TO CART)",
trigger: "a:contains(Add to cart)",
},
tourUtils.goToCart({quantity: 2}),
{
@@ -17,7 +17,7 @@ registry.category("web_tour.tours").add("a_shop_custom_attribute_value", {
run: function (){}, // check
}, {
id: 'add_cart_step',
trigger: 'a:contains(ADD TO CART)',
trigger: 'a:contains(Add to cart)',
run: 'click',
}, {
trigger: '.oe_advanced_configurator_modal .js_product:eq(1) div:contains("Conference Chair (TEST) (Steel)")',