Hi Loren,
Here's the code from the first line in the template to the end of the define
subproduct. Also note that I have to put an additional <body> tag for the
link colors even though I have the page settings set to #0000FF on the page
template. For some reason they just don't seem to take.
All I'm trying to accomplish here is to place the List/MSRP and the Sale
price in the correct column depending on the settings. I've since recoded to
not use the VAR but would still like to know why it didn't work.
Best
Vince
<body vlink="#0000FF" alink="#0000FF">
############################################################################
##################################################################
[-- DEFINE SUBPRODUCT --]
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]
[-- VAR.DisplayMSRP yes --]
[-- VAR.DisplayACPrice yes --]
##################
#Add Product Name
##################
<td align="left" width="300" >
[-- IF PRODUCT.DisplayName --]
[-- PRODUCT.NameSize Begin --][-- PRODUCT.NameStyle Begin --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
[-- PRODUCT.Name --]
[-- END_IF --]
[-- PRODUCT.NameStyle End --][-- PRODUCT.NameSize End --]
[-- END_IF --]
</td>
#################
#Add Product SKU
#################
<td align="left" width="100" nowrap><font size="2" >
[-- IF PRODUCT.DisplaySKU--]
[--PRODUCT.SKU--]
[-- END_IF --]
</font></td>
##########################
#Add Price and Sale Price
##########################
[-- VAR.DisplayMSRP no --]
[-- VAR.DisplayACPrice no --]
[-- IF PRODUCT.DisplayPrice --]
[-- IF PRODUCT.Price --]
[-- IF PRODUCT.SaleOn --]
[-- IF PRODUCT.SaleAmount --]
[-- VAR.DisplayMSRP yes --]
[-- VAR.DisplayACPrice yes --]
[-- VAR.MSRP PRODUCT.Price --]
[-- VAR.ACPrice PRODUCT.SaleAmount --]
[-- ELSE --]
[-- VAR.DisplayMSRP no --]
[-- VAR.DisplayACPrice yes --]
[-- VAR.ACPrice PRODUCT.SaleAmount --]
[-- END_IF --]
[-- ELSE --]
[-- VAR.DisplayMSRP no --]
[-- VAR.DisplayACPrice yes --]
[-- VAR.ACPrice PRODUCT.Price --]
[-- END_IF --]
[-- END_IF --]
[--END_IF --]
<td align="right" width="125" >
[-- IF VAR.DisplayMSRP yes --]
<font size="2">[-- VAR.MSRP --]</font>
[-- END_IF --]
</td>
<td align="right" width="125" >
[-- IF VAR.DisplayACPrice yes --]
<font size="2" color="#FF0000"><b>[-- VAR.ACPrice --]</b></font>
[-- END_IF --]
</td>
##########################
#Begin Shopping Cart Form
##########################
[-- IF PRODUCT.DisplayPrice --]
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi" method=post>
<input type=hidden name=storeid value=[-- STORE_ID --]>
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]>
##########################
#Add any Ordering Options
##########################
<td align="right">
#if Ordering Options are required, generate the quantity box
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- IF PRODUCT.OptionText --]
[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]
</td>
##################################
#Add the Quantity Box if required
##################################
<td align="right">
[-- IF PRODUCT.DisplayOrderQuantity --]
Qty <input type=text size=2 name="[-- PRODUCT.RecordNumber --]:qnty"
value="1" >
[-- END_IF --]
</td>
############################
#Add the ADD To Cart Button
############################
<td align="right">
[-- IF VAR.AddButtonGraphic --]
<input type=image class="add" src="[-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/[-- VAR.AddButtonGraphic --]"name="Add to Cart" alt="Add to
Cart">
[-- ELSE_IF ADDIMAGE? --]
<input type=image [--ADDIMAGE--]>
[-- ELSE --]
<input class="add" type=submit value="[-- ADDTEXT --]">
[-- END_IF --]
</td>
########################
#End Shopping Cart Form
########################
</form>
[-- END_IF --]
#############################
[-- END_DEFINE SUBPRODUCT --]
"Loren" <loren_d_c@yahoo.com> wrote in message
news:c25c9o$h2c$1@support.shopsite.com...
What is the template code from the beginning [-- DEFINE SUBPRODUCT --]
to the [-- END_DEFINE SUBPRODUCT --], and are those two tags on their
own lines and is this definition at the beginning of the file before the
other sections?
-Loren
Vince Salese wrote:
It is in the Define Subproducts section of a Product Template
"Loren" <loren_d_c@yahoo.com> wrote in message
news:c251kb$epo$1@support.shopsite.com...
Is it the product template that you are setting those VAR's up in, or
are you doing it in the LOOP PRODUCTS in the page template? The
PRODUCT.* tags are not valid in a page template.
-Loren
Vince Salese wrote:
In SS7 Pro
I'm trying to set two variables to two product database values. Here's
the
code. The varibles are not initialized to anything prior to these two
lines
(these lines are line 49 & 50 in the template)
[-- VAR.ACPrice PRODUCT.SaleAmount --]
[-- VAR.MSRP PRODUCT.Price --]
When I publish the product I get the following errors
Indexing Product [93:test Product 00]...
Indexing Product [1080:1/4" G4 Hot-Galvanized Chain]...
Indexing Product [89:Test Product #2]...
Indexing Product [92:Test Product 0]...
Indexing Product [93:test Product 00]...
Indexing Product [91:Test Product Number Four]...
Indexing Product [16:Test Product One]...
Indexing Product [90:Test Product Three]...
Cleaning Environment
Closing All files
End of Partial Reindex.
Generating Page [95:Test Page]...
Adding Product [test Product 00]...
AC_Product [49]: Template Error: Product tag not allowed
AC_Product [50]: Template Error: Product tag not allowed
AC_Product [59]: Template Error: Product tag not allowed