From b1398e050fcf90aa253ef027ee72673f8da8d53f Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Fri, 3 Nov 2023 15:25:39 +0530 Subject: [PATCH] Nov 3 : [FIX] Bug Fixed 'call_for_price_website' --- call_for_price_website/__manifest__.py | 2 +- .../static/src/js/variant_mixin.js | 16 +- .../views/compare_hide_price_template.xml | 2 + .../views/shop_hide_call_price_template.xml | 362 ++++++++++-------- .../views/wishlist_hide_price_template.xml | 14 +- 5 files changed, 226 insertions(+), 170 deletions(-) diff --git a/call_for_price_website/__manifest__.py b/call_for_price_website/__manifest__.py index 3d3ba0ed3..73ff077d1 100644 --- a/call_for_price_website/__manifest__.py +++ b/call_for_price_website/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################### { 'name': 'Website Call For Price', - 'version': '16.0.1.0.1', + 'version': '16.0.2.0.0', 'category': 'Website', 'author': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions', diff --git a/call_for_price_website/static/src/js/variant_mixin.js b/call_for_price_website/static/src/js/variant_mixin.js index deba7150a..b7d18a233 100644 --- a/call_for_price_website/static/src/js/variant_mixin.js +++ b/call_for_price_website/static/src/js/variant_mixin.js @@ -49,9 +49,11 @@ odoo.define('call_for_price_website.CustomVariantMixin', function(require) { addToCart.removeClass('d-inline-flex').addClass('d-none'); contactUsButton.removeClass('d-none').addClass('d-flex'); price_call_div.removeClass('d-none').addClass('d-flex'); - this.$el.find('#add_to_cart')[0].style.display = "none"; - this.$el.find('#price_of_product')[0].style.display = "none"; - this.$el.find('#price_of_product')[0].style.display = "none"; + this.$el.find('#add_to_cart').removeClass('d-block').addClass('d-none'); + this.$el.find('#price_of_product').removeClass('d-block').addClass('d-none'); + this.$el.find('#price_of_product').removeClass('d-block').addClass('d-none'); + this.$el.find('.js_add_cart_json').removeClass('d-block').addClass('d-none'); + this.$el.find('.quantity').removeClass('d-block').addClass('d-none'); } else { productPrice.removeClass('d-none').addClass('d-inline-block'); quantity.removeClass('d-none').addClass('d-inline-flex'); @@ -59,9 +61,11 @@ odoo.define('call_for_price_website.CustomVariantMixin', function(require) { contactUsButton.removeClass('d-flex').addClass('d-none'); product_unavailable.removeClass('d-flex').addClass('d-none') price_call_div.removeClass('d-flex').addClass('d-none') - this.$el.find('#add_to_cart')[0].style.display = "block"; - this.$el.find('#price_of_product')[0].style.display = "block"; - this.$el.find('#price_of_product')[0].style.display = "block"; + this.$el.find('#add_to_cart').removeClass('d-none').addClass('d-block'); + this.$el.find('#price_of_product').removeClass('d-none').addClass('d-block'); + this.$el.find('#price_of_product').removeClass('d-none').addClass('d-block'); + this.$el.find('.js_add_cart_json').removeClass('d-none').addClass('d-block'); + this.$el.find('.quantity').removeClass('d-none').addClass('d-block'); } // Call the original onChangeCombination function originalOnChangeCombination.apply(this, [ev, $parent, combination]); diff --git a/call_for_price_website/views/compare_hide_price_template.xml b/call_for_price_website/views/compare_hide_price_template.xml index 6e499c07e..d71d9cfb2 100644 --- a/call_for_price_website/views/compare_hide_price_template.xml +++ b/call_for_price_website/views/compare_hide_price_template.xml @@ -2,6 +2,7 @@