chrissie Posted November 5, 2009 Share Posted November 5, 2009 HiWhen 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 More sharing options...
rocky Posted November 5, 2009 Share Posted November 5, 2009 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 More sharing options...
chrissie Posted November 5, 2009 Author Share Posted November 5, 2009 HiThanks Rocky, that does work, but I had to put in the SUB-category ID. It doesn't work with the MAIN category ID. How can I get it to work from the main category, or how can I add all the necessary sub-categories? (there are quite a few!) Link to comment Share on other sites More sharing options...
rocky Posted November 6, 2009 Share Posted November 6, 2009 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 More sharing options...
chrissie Posted November 6, 2009 Author Share Posted November 6, 2009 Thank you Rocky Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now