From f0f80aec4f7a857f96ca7bb2ae403fdb7003c857 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Fri, 14 Feb 2025 17:33:47 +0530 Subject: [PATCH 1/4] Fixed:Should not allow the admin to select the tax rule for the auto added service product --- .../controllers/products/serviceproduct.tpl | 149 +++++++++++------- 1 file changed, 88 insertions(+), 61 deletions(-) diff --git a/admin/themes/default/template/controllers/products/serviceproduct.tpl b/admin/themes/default/template/controllers/products/serviceproduct.tpl index ac93c1ed9b..c16eab0eae 100644 --- a/admin/themes/default/template/controllers/products/serviceproduct.tpl +++ b/admin/themes/default/template/controllers/products/serviceproduct.tpl @@ -1,7 +1,7 @@ {if isset($product->id)}
- -

{l s='Service Products'}

+ +

{l s='Service Products'}

{if (isset($associated_service_products) && $associated_service_products) || (isset($unassociated_service_products) && $unassociated_service_products)}
@@ -33,7 +33,10 @@ {foreach from=$associated_service_products item=service_product} - + {assign var=inputs_prefix value="service_product_`$service_product.id_product`_"} @@ -42,13 +45,14 @@ {$service_product.id_product|escape:'html':'UTF-8'} - + {$service_product.name} - + {if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if} @@ -73,7 +77,8 @@ {assign var=price_value value=$service_product.association_info.default_price} {/if} {/if} - +
@@ -85,16 +90,21 @@ {l s='-'} {else}
- {foreach from=$tax_rules_groups item=tax_rules_group} - {/foreach}
-
{l s='Default tax rule: %s' sprintf=$service_product.association_info.default_tax_rules_group_name}
+
+ {l s='Default tax rule: %s' sprintf=$service_product.association_info.default_tax_rules_group_name} +
{/if} @@ -106,59 +116,76 @@ - + - {$service_product.id_product|escape:'html':'UTF-8'} + {$service_product.id_product|escape:'html':'UTF-8'} {$service_product.name} - {if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if} - {l s='--'} - -
-
- {$currency->prefix}{$currency->suffix} - + {if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if} + {l s='--'} + +
+
+ {$currency->prefix}{$currency->suffix} + +
-
-
- {l s='Default price: %s' sprintf={displayPrice price=$service_product.price currency=$currency->id}} -
- - -
- -
-
{l s='Default tax rule: %s' sprintf=$service_product.tax_rules_group_name}
- - - {/foreach} - - -
- + - {else} -
- {l s='No services are attached with this room type'} -
- {/if} -
-{/if} \ No newline at end of file + + + {else} +
+ {l s='No services are attached with this room type'} +
+ {/if} + + {/if} \ No newline at end of file From 3c328c281e9c620e0339cfb327a77ff248f78677 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Fri, 14 Feb 2025 17:58:45 +0530 Subject: [PATCH 2/4] Fixed:Should not allow the admin to select the tax rule for the auto added product --- .../controllers/products/serviceproduct.tpl | 151 ++++++++---------- 1 file changed, 64 insertions(+), 87 deletions(-) diff --git a/admin/themes/default/template/controllers/products/serviceproduct.tpl b/admin/themes/default/template/controllers/products/serviceproduct.tpl index c16eab0eae..4d62dfea74 100644 --- a/admin/themes/default/template/controllers/products/serviceproduct.tpl +++ b/admin/themes/default/template/controllers/products/serviceproduct.tpl @@ -1,7 +1,7 @@ {if isset($product->id)}
- -

{l s='Service Products'}

+ +

{l s='Service Products'}

{if (isset($associated_service_products) && $associated_service_products) || (isset($unassociated_service_products) && $unassociated_service_products)}
@@ -33,10 +33,7 @@ {foreach from=$associated_service_products item=service_product} - + {assign var=inputs_prefix value="service_product_`$service_product.id_product`_"} @@ -45,14 +42,13 @@ {$service_product.id_product|escape:'html':'UTF-8'} - + {$service_product.name} - + {if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if} @@ -77,8 +73,7 @@ {assign var=price_value value=$service_product.association_info.default_price} {/if} {/if} - +
@@ -90,21 +85,16 @@ {l s='-'} {else}
- {foreach from=$tax_rules_groups item=tax_rules_group} - {/foreach}
-
- {l s='Default tax rule: %s' sprintf=$service_product.association_info.default_tax_rules_group_name} -
+
{l s='Default tax rule: %s' sprintf=$service_product.association_info.default_tax_rules_group_name}
{/if} @@ -116,76 +106,63 @@ - + - {$service_product.id_product|escape:'html':'UTF-8'} + {$service_product.id_product|escape:'html':'UTF-8'} {$service_product.name} - {if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if} - {l s='--'} - -
-
- {$currency->prefix}{$currency->suffix} - -
+ {if $service_product.auto_add_to_cart}{l s='Yes'}{else}{l s='No'}{/if} + {l s='--'} + +
+
+ {$currency->prefix}{$currency->suffix} +
-
- {l s='Default price: %s' sprintf={displayPrice price=$service_product.price currency=$currency->id}} +
+
+ {l s='Default price: %s' sprintf={displayPrice price=$service_product.price currency=$currency->id}} +
+ + + {if $service_product.auto_add_to_cart} + {l s='-'} + {else} +
+
- - - {if $service_product.auto_add_to_cart&&$service_product.price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM} - {l s='-'} - {else} -
- -
-
- {l s='Default tax rule: %s' sprintf=$service_product.tax_rules_group_name}
- {/if} - - - {/foreach} - - -
- + - {else} -
- {l s='No services are attached with this room type'} -
- {/if} -
- {/if} \ No newline at end of file + +
+ {else} +
+ {l s='No services are attached with this room type'} +
+ {/if} + +{/if} \ No newline at end of file From e942f46475013c4101a36adc1c1e2fce647ea710 Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Fri, 14 Feb 2025 18:02:13 +0530 Subject: [PATCH 3/4] price addition type condition added --- .../default/template/controllers/products/serviceproduct.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/themes/default/template/controllers/products/serviceproduct.tpl b/admin/themes/default/template/controllers/products/serviceproduct.tpl index 4d62dfea74..501fdf54cf 100644 --- a/admin/themes/default/template/controllers/products/serviceproduct.tpl +++ b/admin/themes/default/template/controllers/products/serviceproduct.tpl @@ -124,7 +124,7 @@ - {if $service_product.auto_add_to_cart} + {if $service_product.auto_add_to_cart&& $service_product.association_info.price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM} {l s='-'} {else}
From e7aafa4c8e4d076ce120fabe311ab950819c576c Mon Sep 17 00:00:00 2001 From: azhar bhat Date: Thu, 20 Feb 2025 15:15:56 +0530 Subject: [PATCH 4/4] condition modified --- .../default/template/controllers/products/serviceproduct.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/themes/default/template/controllers/products/serviceproduct.tpl b/admin/themes/default/template/controllers/products/serviceproduct.tpl index 501fdf54cf..15b7d51d04 100644 --- a/admin/themes/default/template/controllers/products/serviceproduct.tpl +++ b/admin/themes/default/template/controllers/products/serviceproduct.tpl @@ -124,7 +124,7 @@
- {if $service_product.auto_add_to_cart&& $service_product.association_info.price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM} + {if $service_product.auto_add_to_cart&& $service_product.price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM} {l s='-'} {else}