Jump to content

(SOLVED) Regarding a particular category - How to add text to shopping cart


Recommended Posts

Hi
When products from one particular category are ordered, customer orders will be slightly delayed. I intend to put text around the site informing customers of this, but I want to know if it's possible to put some text in the shopping cart so that if they add items from this category, there's a reminder there also.
Is this possible? If so, how?
Thanks in advance
:)

Link to comment
Share on other sites

You could add something like this at line 48 of shopping-cart.tpl in your theme's directory:



{foreach from=$products item=product}
   {if $product.id_category_default == 2}
       {assign var='delay' value='1'}
   {/if}
{/foreach}
{if $delay}There will be a delay in your order.{/if}



This code relies on the default category of the products being the one that causes the delay.

Link to comment
Share on other sites

I'm not sure what you mean by the Main category. Do you mean the Home category? It has an ID of 1. You can add as many IDs as your want to the code using OR:



{foreach from=$products item=product}
   {if $product.id_category_default == 2 OR $product.id_category_default == 3}
       {assign var='delay' value='1'}
   {/if}
{/foreach}
{if $delay}There will be a delay in your order.{/if}
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...