Jump to content

[Group Discount ] Failed.....


Recommended Posts

My guess is that you are still using your PrestaShop v1.1 theme, which doesn't include the group discount code. You should recreate your theme based on the default PrestaShop v1.3.1 theme so that you have access to all features and bug fixes. If that is too difficult, you could try copying just the group discount code into your PrestaShop v1.1 theme. Add the following to the var declarations in product.tpl in your theme's directory:

var group_reduction = '{$group_reduction}';



and change the code inside the {if} statement in the <!-- attributes --> section to:

- {if $attributeImpact.price > 0}+{/if}{convertPrice price=$attributeImpact.price*$group_reduction}



and add the following before the currency format at the bottom of the updateDisplay() function in js/product.js in your theme's directory:

if (group_reduction)
   priceProduct *= group_reduction;

Link to comment
Share on other sites

If group_reduction doesn't appear anywhere in your product.tpl, then that confirms that you are using a PrestaShop v1.1 theme. If you change to the default PrestaShop v1.3.1 theme, then the group discounts should work.

Link to comment
Share on other sites

Then you are missing the attribute group reduction code I mentioned above and will need to add it. Here's my full attributes section of product.tpl:

{if isset($groups)}
<!-- attributes -->

{foreach from=$groups key=id_attribute_group item=group}


{$group.name|escape:'htmlall':'UTF-8'} :
   {assign var='groupName' value='group_'|cat:$id_attribute_group}
0}$('#resetImages').show('slow');{/if}">
       {foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
       {/foreach}


{/foreach}

{/if}

Link to comment
Share on other sites

i found this related to group

{if isset($groups)}
<!-- attributes -->


{foreach from=$groups key=id_attribute_group item=group}


{$group.name|escape:'htmlall':'UTF-8'} :
{assign var='groupName' value='group_'|cat:$id_attribute_group}
0}$('#resetImages').show('slow');{/if}">
{foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
{/foreach}


{/foreach}

{/if}
Link to comment
Share on other sites

Oops, it looks like I was looking at a modified theme. You are right, the default product.tpl only has the variable declaration and not the other lines, but it does have group_reduction in product.js as I mentioned above.

Link to comment
Share on other sites

×
×
  • Create New...