Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Changing layout to a single product?

Changing layout to a single product?

Locked

Views: 803

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
26 Oct 2007, 5:59 AM
#1
jds580s avatar

jds580s

New Zenner

Join Date:
Oct 2007
Posts:
25
Plugin Contributions:
0

Changing layout to a single product?

I am wanting to know how I might go about modifying the product_info layout of a single product. Does the override system have a way of respecting the products_id?

Specifically I have a number of attributes set for a product, and about half way through the list of selectable attributes I need to insert a bunch of custom code. It's only for a specific product, the rest don't need it.

Thanks!

26 Oct 2007, 8:26 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Changing layout to a single product?

Probably the simplest way of dealing with this product is to enclose your custom code in a conditional statement so it is only executed for that product.
In the file where the attributes list is built, add something like```php
if ($products_id == ###) {
custom code
}