Jump to content

feature for institute charity


Recommended Posts

the idea is when a customer buys a product, X value goes to donation to charity. This X = % * (price - wholesale_price).

The % is defined by myself and not fixed. Each product has a different %.

Not is possible with combination and features. Or is?
understand?

suggestion please.

with combination, code: (product.tpl) [but open blank page, not working. My prestashop is 1.3.7]
from:

{foreach from=$groups key=id_attribute_group item=group}
           {if $group.attributes|@count}


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


           {/if}
           {/foreach}


replace:

            <!--combination contribuition-->
           <!--******-->

{foreach from=$groups key=id_attribute_group item=group}
           {if $group.attributes|@count}


               {if $group.name != 'contribution'}{$group.name|escape:'htmlall':'UTF-8'} :{/if}
               {assign var='groupName' value='group_'|cat:$id_attribute_group}
0}$('#wrapResetImages').show('slow');{/if}">
                   {foreach from=$group.attributes key=id_attribute item=group_attribute}
{$group_attribute|escape:'htmlall':'UTF-8'}
                       {if $group.name == 'contribution'}
                           {literal}[removed] $(document).ready(function(){
                                   document.getElementById('contribution_label')[removed]="{/literal}{$group_attribute|escape:'htmlall':'UTF-8'}{literal}"
                               })
                           [removed]{/literal}
                       {/if}
                   {/foreach}
                   <!--combination contribuition-->
                   <!--******-->



and put:


Link to comment
Share on other sites

  • 2 years later...
×
×
  • Create New...