Page 1 of 1

Custom Templates More info / If Then Question

PostPosted: Fri Feb 14, 2003 3:44 pm
by Justin Sutton
I have a quick question. I am running 6.1 pro. Is it possible to use the If
/Else statement with subproducts to do the following.

If subproducts then do the subproducts loop, else regular product info in
the more info page.

or is it necessary to build a product template for products with subproducts
and another template for products without?

Example:

[--IF SUBPRODUCTS --]
[-- LOOP SUBPRODUCTS --]
[--SUBPRODUCTS--]
[-- END_LOOP SUBPRODUCTS--]

[--ELSE--]

[--PRODUCT.NAME--]
[-- PRODUCT.SKU--]

[-- End_IF--]


Thanks for the help.
Justin

Re: Custom Templates More info / If Then Question

PostPosted: Fri Feb 14, 2003 4:53 pm
by loren_d_c
It is possible, but not exactly like you have it. For your IF, use this:

[-- IF PRODUCT.subproduct --]

In the documentation of the fields available for the custom templates, you will
see the subproduct field (the very last product field) says this:
http://www.shopsite.com/help/6.1/en-US/ ... ields.html

===============
Returns a comma-separated list of the record numbers of any
subproducts assigned to the current product. Use with an IF
tag to see if any subproducts exist for the current product.
===============

-Loren




Justin Sutton wrote:

I have a quick question. I am running 6.1 pro. Is it possible to use the If
/Else statement with subproducts to do the following.

If subproducts then do the subproducts loop, else regular product info in
the more info page.

or is it necessary to build a product template for products with subproducts
and another template for products without?

Example:

[--IF SUBPRODUCTS --]
[-- LOOP SUBPRODUCTS --]
[--SUBPRODUCTS--]
[-- END_LOOP SUBPRODUCTS--]

[--ELSE--]

[--PRODUCT.NAME--]
[-- PRODUCT.SKU--]

[-- End_IF--]

Thanks for the help.
Justin

Re: Custom Templates More info / If Then Question

PostPosted: Fri Feb 14, 2003 5:09 pm
by Guest
Justin,
That is the way it should work. I can't remember if it was in 6.1 or
6.2 that subproducts were enabled on Moreinfo pages. Give it a try and
see if it will work.

Jim


Justin Sutton wrote:
I have a quick question. I am running 6.1 pro. Is it possible to use the If
/Else statement with subproducts to do the following.

If subproducts then do the subproducts loop, else regular product info in
the more info page.

or is it necessary to build a product template for products with subproducts
and another template for products without?

Example:

[--IF SUBPRODUCTS --]
[-- LOOP SUBPRODUCTS --]
[--SUBPRODUCTS--]
[-- END_LOOP SUBPRODUCTS--]

[--ELSE--]

[--PRODUCT.NAME--]
[-- PRODUCT.SKU--]

[-- End_IF--]


Thanks for the help.
Justin


Re: Custom Templates More info / If Then Question

PostPosted: Fri Feb 14, 2003 5:23 pm
by Justin Sutton
Thanks to the both of you for your help. Have a great weekend.

Justin


<jstavast@xmission.com> wrote in message
news:b2jsrk$982$1@support.shopsite.com...
Justin,
That is the way it should work. I can't remember if it was in 6.1 or
6.2 that subproducts were enabled on Moreinfo pages. Give it a try and
see if it will work.

Jim


Justin Sutton wrote:
I have a quick question. I am running 6.1 pro. Is it possible to use the
If
/Else statement with subproducts to do the following.

If subproducts then do the subproducts loop, else regular product info
in
the more info page.

or is it necessary to build a product template for products with
subproducts
and another template for products without?

Example:

[--IF SUBPRODUCTS --]
[-- LOOP SUBPRODUCTS --]
[--SUBPRODUCTS--]
[-- END_LOOP SUBPRODUCTS--]

[--ELSE--]

[--PRODUCT.NAME--]
[-- PRODUCT.SKU--]

[-- End_IF--]


Thanks for the help.
Justin



Re: Custom Templates More info / If Then Question

PostPosted: Fri Feb 14, 2003 5:37 pm
by Brent Doud
Yes this will work great.
I used the following code:
(Thanks Loren)

[-- IF PRODUCT.subproduct --]
[-- SUBPRODUCTS --] code etc..
[--ELSE--]
Nothing
[--END_IF--]

This way if the merchant wants to put cross selling up they can, but if they
do not it will not show any sign of the cross selling code. Without it if
they opted not to use cross selling on a particular product that product it
would still display:
You may be interested in the following product(s) etc.. etc..

Here are some examples:
The same product template is used for all the products. Some have
cross-selling and some do not.
http://www.motoworldracing.com/index.html
http://ssdemo01.basiclink.com/index.html

If anyone needs Shopsite page or product templates feel free to call us.

Thanks,
Brent Doud
www.SD360.com
619-972-7550




<jstavast@xmission.com> wrote in message
news:b2jsrk$982$1@support.shopsite.com...
Justin,
That is the way it should work. I can't remember if it was in 6.1 or
6.2 that subproducts were enabled on Moreinfo pages. Give it a try and
see if it will work.

Jim


Justin Sutton wrote:
I have a quick question. I am running 6.1 pro. Is it possible to use the
If
/Else statement with subproducts to do the following.

If subproducts then do the subproducts loop, else regular product info
in
the more info page.

or is it necessary to build a product template for products with
subproducts
and another template for products without?

Example:

[--IF SUBPRODUCTS --]
[-- LOOP SUBPRODUCTS --]
[--SUBPRODUCTS--]
[-- END_LOOP SUBPRODUCTS--]

[--ELSE--]

[--PRODUCT.NAME--]
[-- PRODUCT.SKU--]

[-- End_IF--]


Thanks for the help.
Justin