Browse Source

Jan 04 [UPDT] : Updated 'website_hide_button'

pull/309/head
AjmalCybro 4 months ago
parent
commit
6df0b519a3
  1. 2
      website_hide_button/__manifest__.py
  2. 5
      website_hide_button/doc/RELEASE_NOTES.md
  3. 2
      website_hide_button/models/res_config_settings.py
  4. 9
      website_hide_button/views/product_templates.xml

2
website_hide_button/__manifest__.py

@ -21,7 +21,7 @@
############################################################################### ###############################################################################
{ {
'name': "Hide Price, Add To Cart And Quantity Button In Website", 'name': "Hide Price, Add To Cart And Quantity Button In Website",
'version': '17.0.3.0.0', 'version': '17.0.3.0.1',
'category': 'Website', 'category': 'Website',
'summary': """Hide Price, Add To Cart and Quantity button for guest 'summary': """Hide Price, Add To Cart and Quantity button for guest
users""", users""",

5
website_hide_button/doc/RELEASE_NOTES.md

@ -20,3 +20,8 @@
#### Version 17.0.3.0.0 #### Version 17.0.3.0.0
##### UPDT ##### UPDT
- Bug Fix - Fixed the error that occurred after installing the website_sale_stock module - Bug Fix - Fixed the error that occurred after installing the website_sale_stock module
#### 10.01.2025
#### Version 17.0.3.0.1
##### UPDT
- Bug Fix - Fixed the bug where the cart was not being hidden even when the option was enabled.

2
website_hide_button/models/res_config_settings.py

@ -59,3 +59,5 @@ class ResConfigSettings(models.TransientModel):
def _onchange_hide_price(self): def _onchange_hide_price(self):
if self.hide_price: if self.hide_price:
self.hide_cart = True self.hide_cart = True
self.env['ir.config_parameter'].sudo().set_param(
'website_hide_button.hide_cart', self.hide_cart)

9
website_hide_button/views/product_templates.xml

@ -35,10 +35,11 @@
<!-- Cart_hide --> <!-- Cart_hide -->
<template id="header_cart_link_hide" <template id="header_cart_link_hide"
inherit_id="website_sale.header_cart_link"> inherit_id="website_sale.header_cart_link">
<xpath expr="//t[@t-set='show_cart']" position="replace"> <xpath expr="//a[@href='/shop/cart']" position="attributes">
<t t-if="not request.env.user._is_public() or (request.env.user._is_public() and not request.env['ir.config_parameter'].sudo().get_param('website_hide_button.hide_cart'))"> <attribute name="t-if">not request.env.user._is_public() or
<t t-set="show_cart" t-value="true"/> (request.env.user._is_public() and not
</t> request.env['ir.config_parameter'].sudo().get_param('website_hide_button.hide_cart'))
</attribute>
</xpath> </xpath>
</template> </template>
<!-- Hide details section in search bar for hide price --> <!-- Hide details section in search bar for hide price -->

Loading…
Cancel
Save