I'm working on a product page where there are two attributes, each with three variants. I'm trying to hide the "Add to Cart" button when a specific variant is selected, but I can't seem to identify the right handle for the variant. For example, if the selected variant contains the word "custom," I want the "Add to Cart" button to be hidden. In the coding I'm tried various combinations to target the name of the variant including product.variant, name, ID, etc but can't seem to get the right one. Please assist.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Sounds like you gonna need to implement JS to modify the behaviour of the page.
Could you share your code?
<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" href="#">
<i class="fa fa-shopping-cart me-2"/>
Add to cart
</a>
</div>
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Mei 24
|
716 | ||
|
0
Mei 24
|
937 | ||
|
0
Mei 24
|
1242 | ||
|
0
Mei 24
|
606 | ||
|
0
Mei 24
|
1025 |