| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
If/else on specific product page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
If/else on specific product page
This should be a simple task but it doesn't appear to be based on the work I have done thus far;
When displaying a category, I want to be able to designate whether the product comes in rolls or cartons. On the products_list.tpl, I can easily do this with {if $cat eq 183} ROLLS {else} CARTONS {/if} However, once the user clicks on the specific PRODUCT, I seem to lose the ability to control this. The "If Category" no longer works, because X-Cart is not carrying over the category in the URL, it's just the product now. How can I then, continue to get the rolls v. cartons to display on product_details.tpl using the same "If Cat" code? I can't break it down per product, there are too many. Thanks you in advance, Pat |
|||||||
#2
|
|||||||||
|
|||||||||
Re: If/else on specific product page
$product array hold the categoryid for the product. Note that this is the category id for the main category the product is assigned to.
{if $product.categoryid eq 183}.....
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|||
X-Cart forums © 2001-2020
|