Ah yes, according to the spec, the subproduct field is singular, see:
http://www.shopsite.com/help/6.2/en-US/ ... ields.html-Loren
Justin Sutton wrote:
Allen,
I hope I am not being redundant. We are also using the If tag with
subproducts and it is working very well. Here are the tags we use. The only
difference I noticed was the (s) in the end of the word subproduct in your
if tag. I hope this helps you out.
[-- IF PRODUCT.subproduct --]
[-- LOOP SUBPRODUCTS --]
[--SUBPRODUCTS--]
[-- END_LOOP SUBPRODUCTS--]
[--ELSE--]
[-- End_IF --]
Good Luck,
Justin
"Allen Murdock" <murdock@clamco.com> wrote in message
news:BA922C42.9292%murdock@clamco.com...
Loren -
Thanks for your help. I knew [--IF SUBPRODUCTS--] didn't look right.
I've changed my IF statement as you suggested, and I'm still not able to
get
this to work as I want it to. My subproducts are coming out fine, but the
code that's supposed to follow the ELSE tag doesn't appear.
Here's the relevant code:
[--IF PRODUCT.SubProducts--]
table width="70%" align="center" cellpadding="5px" cellspacing="0"
border="1px"
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]
/table
[--ELSE--]
table width="100%" cellpadding="10px" cellspacing="0" border="0"
tr
td width="22%"> </td
td width="78%"><div align="center"><a
href="[--PRODUCT.AddToCartURL--]">[--PRODUCT.AddToCartButton--]</a>
a ref="[--SHOPPING_CART_URL--]">[--PRODUCT.ViewCartButton--]</a></div
/td
/tr
/table
[--END_IF--]
Obviously I'm doing something wrong, but I can't see it. Can you help me?
BTW, Is it OK to post snippets of code like this?
- Allen
On 3/10/03 8:06 AM, in article b4id73$k6p$1@support.shopsite.com, "Loren"
loren_d_c@yahoo.com> wrote:
You are testing a property of the product. Try [-- IF
PRODUCT.Subproducts --]
-Loren
Allen Murdock wrote:
All -
I'm writing a custom product template (for my first ShopSite store) and
I've
been trying to use an IF tag to test for the presence of subproducts on
a
More Info page.
The store has several products that come in various colors and/or
sizes.
I've set these products up to act as "master" products, with the
different
size/color variants as a subproducts.
Each subproduct has its own SKU and often a different price from other
subproducts in the group.
What I'm trying to accomplish is to have the master product's price and
"Add
to Cart" button appear on the More Info page only if there are no
subproducts, and to eliminate them if there are.
My attempts to use the tag [--IF SUBPRODUCTS--] have left me
frustrated.
I hope I've described the situation clearly enough. I would definitely
be
grateful for any help.
- Allen