Product Information Fields

General ShopSite user discussion

Product Information Fields

Postby Rick Steven » Mon Apr 10, 2006 12:15 pm

I would like to have include files used for certain products and not for
others. I am hoping that I can use a single product template for all
products and just insert the different include files into the Product Fields
for each product.

I tried to put [-- INCLUDE include-file-name --] in the PRODUCT.Field1 area
and then included this into my custom template:

<p>
[-- IF PRODUCT.Field1 --]
[-- PRODUCT.Field1 --]
[-- END_IF --]
</p>

but the resulting html page simply shows "[-- INCLUDE include-file-name --]"
on the page instead of processing the include file. I also tried to put [--
INCLUDE include-file-name PROCESS --] in the Product Field box with the same
results.

Is it possible to use an include file this way, or do I have to hard code it
into the product template and have different templates for different
products that use different include files?

Thanks for any help,
Rick
Rick Steven
 

Re: Product Information Fields

Postby Jim » Mon Apr 10, 2006 12:42 pm

ShopSite template tags can only be used in the template itself and not
in data fields like the product field1. You might try something like this.

[-- IF PRODUCT.Field1 "" --]
<!-- Product field one is empty so don't do anything here -->
[-- Else --]
[-- INCLUDE PRODUCT.Field1 PROCESS--]
[-- END_IF --]

In product.field1 you put the name of the file you want to include.

Jim


Rick Steven wrote:
I would like to have include files used for certain products and not for
others. I am hoping that I can use a single product template for all
products and just insert the different include files into the Product Fields
for each product.

I tried to put [-- INCLUDE include-file-name --] in the PRODUCT.Field1 area
and then included this into my custom template:

p
[-- IF PRODUCT.Field1 --]
[-- PRODUCT.Field1 --]
[-- END_IF --]
/p

but the resulting html page simply shows "[-- INCLUDE include-file-name --]"
on the page instead of processing the include file. I also tried to put [--
INCLUDE include-file-name PROCESS --] in the Product Field box with the same
results.

Is it possible to use an include file this way, or do I have to hard code it
into the product template and have different templates for different
products that use different include files?

Thanks for any help,
Rick

Jim
 

Re: Product Information Fields

Postby Rick Steven » Mon Apr 10, 2006 2:20 pm

Hi Jim,

I tried what you said but when I published the changes I got the following
error:

Generating Page [0:Gift Specialists Inc]...
Adding Product [Test Featured Product]...
gsi-product-featured [270]: Template Error: Could not find include file:
/usr/local/apache/cgi-bin/sc/templates/includes/PRODUCT.Field1

It seems like SS isn't getting the include name from the product field,
instead it is looking for an include called PRODUCT.Field1 which doesn't
exist.

Any ideas?

Rick

"Jim" <jstavast@xmission.com> wrote in message
news:e1ecba$jna$1@eval.shopsite.com...
ShopSite template tags can only be used in the template itself and not in
data fields like the product field1. You might try something like this.

[-- IF PRODUCT.Field1 "" --]
!-- Product field one is empty so don't do anything here --
[-- Else --]
[-- INCLUDE PRODUCT.Field1 PROCESS--]
[-- END_IF --]

In product.field1 you put the name of the file you want to include.

Jim


Rick Steven wrote:
I would like to have include files used for certain products and not for
others. I am hoping that I can use a single product template for all
products and just insert the different include files into the Product
Fields for each product.

I tried to put [-- INCLUDE include-file-name --] in the PRODUCT.Field1
area and then included this into my custom template:

p
[-- IF PRODUCT.Field1 --]
[-- PRODUCT.Field1 --]
[-- END_IF --]
/p

but the resulting html page simply shows "[-- INCLUDE
include-file-name --]" on the page instead of processing the include
file. I also tried to put [-- INCLUDE include-file-name PROCESS --] in
the Product Field box with the same results.

Is it possible to use an include file this way, or do I have to hard code
it into the product template and have different templates for different
products that use different include files?

Thanks for any help,
Rick
Rick Steven
 

Re: Product Information Fields

Postby Jim » Mon Apr 10, 2006 2:46 pm

Try setting a var with the product.field1 and then use the var as the
include.


[-- IF PRODUCT.Field1 "" --]
<!-- Product field one is empty so don't do anything here -->
[-- Else --]
[-- VAR.FILE2OPEN product.field1 --]
[-- INCLUDE VAR.FILE2OPEN PROCESS--]
[-- END_IF --]

Jim

Rick Steven wrote:
Hi Jim,

I tried what you said but when I published the changes I got the following
error:

Generating Page [0:Gift Specialists Inc]...
Adding Product [Test Featured Product]...
gsi-product-featured [270]: Template Error: Could not find include file:
/usr/local/apache/cgi-bin/sc/templates/includes/PRODUCT.Field1

It seems like SS isn't getting the include name from the product field,
instead it is looking for an include called PRODUCT.Field1 which doesn't
exist.

Any ideas?

Rick

"Jim" <jstavast@xmission.com> wrote in message
news:e1ecba$jna$1@eval.shopsite.com...
ShopSite template tags can only be used in the template itself and not in
data fields like the product field1. You might try something like this.

[-- IF PRODUCT.Field1 "" --]
!-- Product field one is empty so don't do anything here --
[-- Else --]
[-- INCLUDE PRODUCT.Field1 PROCESS--]
[-- END_IF --]

In product.field1 you put the name of the file you want to include.

Jim


Rick Steven wrote:
I would like to have include files used for certain products and not for
others. I am hoping that I can use a single product template for all
products and just insert the different include files into the Product
Fields for each product.

I tried to put [-- INCLUDE include-file-name --] in the PRODUCT.Field1
area and then included this into my custom template:

p
[-- IF PRODUCT.Field1 --]
[-- PRODUCT.Field1 --]
[-- END_IF --]
/p

but the resulting html page simply shows "[-- INCLUDE
include-file-name --]" on the page instead of processing the include
file. I also tried to put [-- INCLUDE include-file-name PROCESS --] in
the Product Field box with the same results.

Is it possible to use an include file this way, or do I have to hard code
it into the product template and have different templates for different
products that use different include files?

Thanks for any help,
Rick

Jim
 

Re: Product Information Fields

Postby Rick Steven » Mon Apr 10, 2006 3:25 pm

Jim - you are the MAN!

worked great!

Thanks a bunch,
Rick

"Jim" <jstavast@xmission.com> wrote in message
news:e1ejja$oab$1@eval.shopsite.com...
Try setting a var with the product.field1 and then use the var as the
include.


[-- IF PRODUCT.Field1 "" --]
!-- Product field one is empty so don't do anything here --
[-- Else --]
[-- VAR.FILE2OPEN product.field1 --]
[-- INCLUDE VAR.FILE2OPEN PROCESS--]
[-- END_IF --]

Jim

Rick Steven wrote:
Hi Jim,

I tried what you said but when I published the changes I got the
following error:

Generating Page [0:Gift Specialists Inc]...
Adding Product [Test Featured Product]...
gsi-product-featured [270]: Template Error: Could not find include
file: /usr/local/apache/cgi-bin/sc/templates/includes/PRODUCT.Field1

It seems like SS isn't getting the include name from the product field,
instead it is looking for an include called PRODUCT.Field1 which doesn't
exist.

Any ideas?

Rick

"Jim" <jstavast@xmission.com> wrote in message
news:e1ecba$jna$1@eval.shopsite.com...
ShopSite template tags can only be used in the template itself and not
in data fields like the product field1. You might try something like
this.

[-- IF PRODUCT.Field1 "" --]
!-- Product field one is empty so don't do anything here --
[-- Else --]
[-- INCLUDE PRODUCT.Field1 PROCESS--]
[-- END_IF --]

In product.field1 you put the name of the file you want to include.

Jim


Rick Steven wrote:
I would like to have include files used for certain products and not
for others. I am hoping that I can use a single product template for
all products and just insert the different include files into the
Product Fields for each product.

I tried to put [-- INCLUDE include-file-name --] in the PRODUCT.Field1
area and then included this into my custom template:

p
[-- IF PRODUCT.Field1 --]
[-- PRODUCT.Field1 --]
[-- END_IF --]
/p

but the resulting html page simply shows "[-- INCLUDE
include-file-name --]" on the page instead of processing the include
file. I also tried to put [-- INCLUDE include-file-name PROCESS --]
in the Product Field box with the same results.

Is it possible to use an include file this way, or do I have to hard
code it into the product template and have different templates for
different products that use different include files?

Thanks for any help,
Rick
Rick Steven
 


Return to User Forum

Who is online

Users browsing this forum: No registered users and 131 guests