Get rid of spaces

This is an archive of old posting to the User Forum

Get rid of spaces

Postby NuQ » Fri May 14, 2004 4:30 pm

http://www.swtrading.net/zzJJTest2.html

I've hacked together a Product Template and Page Template in order to
implement the Multi-Product [Add to Cart] Button.

I basically started with the Stained Glass template and hacked away. BTW,
the More Info page still looks like crap, but I'm working on it.

I need to get rid of the spaces or carriage return or whatever between the
description and the Quantity Pricing and the spaces between the Quantity
Pricing and the Checkbox/Quantity.

I don't see how to control this in the templates.

Here's my template...(there's left over stuff still in there)

# Multi-Prod by JTJ

#######################
[--DEFINE SUBPRODUCT--]
#######################
[-- VAR.SubForm no --]
[-- VAR.SubOptions no --]
[-- VAR.SubQuantity no --]

#######################
# Subproduct Name #
#######################
[-- IF PRODUCT.DisplayMoreInformationPage --]
<font size="4" color="#000066">•</font> <a href="[--
OUTPUT_DIRECTORY_URL --]/[-- PRODUCT.MoreInformationFileName --]">[--
PRODUCT.Name --]</a>
[-- ELSE --]20DISPLAY_TAG
<font size="4" color="#000066">•</font> [-- PRODUCT.Name --]
[-- END_IF --]
&nbsp;&nbsp;

#######################
# Subproduct Price #
#######################
[--IF PRODUCT.SaleOn--]
[-- IF PRODUCT.SaleAmount --]
<strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize
Begin --][-- PRODUCT.PriceStyle Begin --][-- PRODUCT.SaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[-- PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.SubForm yes --]
[-- VAR.SubOptions yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.SubForm yes --]
[-- VAR.SubQuantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF VAR.SubForm no --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]&super=[--
PRODUCT.Parent --]"><img src="media/buyitall.gif" height=26 width=84
border=0></a><br>
[-- ELSE --]
<form action="[-- SHOPPING_CART_URL BASE --]/order.cgi"
style="display:inline" method=post>
<input type=hidden name=storeid value=[-- STORE_ID --]>
<input type=hidden name="super" value="[-- Product.Parent --]">
<input type=hidden name=dbname value=products>
<input type=hidden name=function value=add>
<input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]>
[-- IF VAR.SubOptions yes --]
<br>[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.SubQuantity yes --]
[-- IF VAR.SubOptions no --]
<br>
[-- END_IF --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
<input type=image src="media/buyitall.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart">
</form><br>
[-- END_IF --]

###########################
[--END_DEFINE SUBPRODUCT--]
###########################



####################
[--DEFINE PRODUCT--]
####################
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
[-- VAR.Form no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]
[-- IF PRODUCT.TextWrap On --]
[-- VAR.wrap on --]
[-- ELSE --]
[-- VAR.wrap off --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment center --]
[-- VAR.wrap on --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment right --]
[-- VAR.ImageAlign align=right --]
[-- ELSE_IF PRODUCT.ImageAlignment left --]
[-- VAR.ImageAlign align=left --]
[-- ELSE --]
[-- VAR.ImageAlign "" --]
[-- END_IF --]
[-- IF PRODUCT.DisplayGraphic--]
[-- IF PRODUCT.Graphic --]
[-- VAR.Graphic yes --]
[-- END_IF --]
[-- END_IF --]
# A table layout is only required if all these conditions are true:
## there is a graphic,
## the graphic is to be displayed,
## text wrap is off,
## image alignment is left or right (can be determined by VAR.wrap value)
[-- IF VAR.Graphic yes --]
[-- IF VAR.wrap off --]
[-- VAR.TableLayout yes --]
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT GRAPHIC #
####################
[-- IF VAR.TableLayout yes --]
<table cellspacing="0" border="0">
<tr>
<td valign="top">
[-- ELSE --]
[-- IF PRODUCT.ImageAlignment center --]
<center>
[-- END_IF --]
[-- END_IF --]

[-- IF VAR.Graphic yes --]
[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
# do nothing because graphic is placed later
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
<a href="[-- PRODUCT.MoreInfoURL --]"><img [-- PRODUCT.Graphic
REMOVE_HTML --] [-- VAR.ImageAlign --]></a>
[-- ELSE --]
<img [-- PRODUCT.Graphic REMOVE_HTML --] [-- VAR.ImageAlign --]>
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.ImageAlignment center --]
</center>
[-- END_IF --]

[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
#do nothing
[-- ELSE --]
</td> <!-- This closes the product graphic cell -->
<td valign="top"> <!-- This opens the text cell -->
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT NAME #
####################
[-- 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.NameSize End --][-- PRODUCT.NameStyle End --]<br>
[-- END_IF --]

########################
# PRODUCT SUBPRODUCTS #
########################
[-- IF PRODUCT.Subproduct --]
# Product has subproducts, so just show description for this product
# and then loop through subproducts
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br>

[-- VAR.MoreInfo no --]

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

[-- ELSE --]
# Product does not have subproducts

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a sale
price
[-- IF PRODUCT.SaleAmount --]
<strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
<br>
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
<br>
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
<br>
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]


####################
# PRODUCT SKU #
####################
[--IF PRODUCT.DisplaySKU --]
[-- PRODUCT.SKUSize Begin --][-- PRODUCT.SKUStyle Begin --][--
PRODUCT.SKU --][-- PRODUCT.SKUSize End --][-- PRODUCT.SKUStyle End --]<br>
[--End_If--]


########################
# PRODUCT DESCRIPTION #
########################
# Product Description
[-- IF PRODUCT.ProductDescription --]
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br>
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF PRODUCT.QuantityPricing --]
<p class="Space">&nbsp;</p>
[-- PRODUCT.QuantityPricing --]
<p class="Space">&nbsp;</p>
[-- END_IF --]

[-- IF VAR.Form no --]
<a href="[--PRODUCT.AddToCartURL--]"><img src="media/buyit.gif"
height=26 width=84 border=0></a>
[-- ELSE --]
# <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 --]>

[-- IF VAR.Options yes --]
[-- IF PRODUCT.OptionText --]
[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

<P><font face="Verdana, Arial, Helvetica, sans-serif">Check to Buy It</font>
<input type=checkbox name=itemnum value=[-- PRODUCT.RECORDNUMBER --]>
<br>
[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

# <br><input type=image src="media/buyit.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart">
# <input type=image src="http://www.swtrading.net/media/view_cart.gif"
width=84 height=26 border=0 align="absbottom" name="Add to Cart"
alt="view_cart.gif" hspace=3 vspace=3 border=0 align="bottom" border="0"
name="View Cart" alt="View Cart">
# </form>

[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]



###########################
# PRODUCT GRAPHIC #
# align=right, wrap=off #
###########################
[-- IF VAR.TableLayout yes --]
</td> <!-- Close cell for product name and description -->
# if image align=right, put graphic in cell here
[-- IF PRODUCT.ImageAlignment right --]
<td valign="top">
[-- IF PRODUCT.DisplayMoreInformationPage --]
<a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
</td>
[-- END_IF --]
</tr>
</table>
[-- END_IF --]

[-- END_DEFINE PRODUCT--]


############################
[-- DEFINE MORE_INFO_PAGE--]
############################
[-- VAR.MoreInfo yes --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- VAR.Quantity yes --]
<html>
<head>
<title>[-- PRODUCT.Name Remove_HTML --] at [-- STORE.Name
Remove_HTML --]</title>
<style type"text/css">
<!--
body, p, h1, h2, h3, td, div, ol, ul, dl {
font-family: Arial, Verdana, Helvetica, sans-serif;
}

body {
margin: 0em;
color: [-- MORE_INFO.TextColor --];
background-color: [-- MORE_INFO.BackgroundColor --];
font-size: 10pt;
}

a:link {
color: #[-- MORE_INFO.LinkColor --];
}
a:visited {
color: #[-- MORE_INFO.VisitedLinkColor --];
}
a:hover {
color: #[-- MORE_INFO.LinkColor --];
}
a:active {
color: #[-- MORE_INFO.ActiveLinkColor --];
}

h1 {
font-size: 18pt;
margin-top: 10px;
margin-bottom: 0pt;
}

h2 {
font-size: 16pt;
margin-top: 8px;
margin-bottom: 0pt;
}

h3 {
font-size: 14pt;
margin-top: 8px;
margin-bottom: 0pt;
}

table.header
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_top.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 154}

table.footer
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_bottom.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 160}

table.middle {
background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_middle.gif);
background-position: top left;
background-repeat: repeat-y;
width: 800;
}

table.name
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_banner.gif);
background-position: center center;
background-repeat: no-repeat;
border: 0pt;
width: 400;
height: 50}

td.name
{ text-align: center;
vertical-align: middle;
font-size: 18pt;
font-weight: bold}

td.graphic
{ text-align: center;
padding-top: 15}

table.qp_header {
font-size: 10pt;
}

p.Space {
font-size: 6pt;
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
}
-->
</style>

</head>

<body marginwidth="0" marginheight="0">

<font face="sans-serif">

<!--********************-->
<!--*** Header Table ***-->
<!--********************-->

<table class="header">
[-- IF MORE_INFO.DisplayPageHeader --]
<tr>
<td class="graphic" colspan="3">
[-- HEADER --]
</td>
</tr>
[-- END_IF --]

<tr>
<td align="center">

<table cellpadding="0" cellspacing="0" border="0">
<tr>

</tr>
</table>
<div align="center">

<table class="name">
<tr><td class="name">
[-- PRODUCT.Name --]
</td></tr>
</table>
</div>

</td>
</tr>
</table>


<!--********************-->
<!-- Begin Middle Table -->
<!--********************-->
<div align="center">
<table class="middle">
<tr>
<td width="8">&nbsp;</td> <!-- left side spacer -->
<td align="center">
[-- PRODUCT.MoreInformationGraphic --]
<p>
<small>[-- PRODUCT.SKU --]</small>
</td>
<td width="8">&nbsp;</td> <!-- right side spacer -->
</tr>

<tr>
<td width="8">&nbsp;</td> <!-- left side spacer -->
<td align="center">
<table>
<tr>
<td>
[-- PRODUCT.MoreInformationText --]
</div>
</td>
</tr>
</p>

[-- IF PRODUCT.Subproduct --]
# Product has subproducts
<tr>
<td>
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]

[-- ELSE --]
# Product does not have subproducts
<tr>
<td>

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a sale
price
[-- IF PRODUCT.SaleAmount --]
<strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
<br>
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
<br>
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
<br>
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
<div align="center">
[-- IF PRODUCT.QuantityPricing --]
<p class="Space">&nbsp;</p>
[-- PRODUCT.QuantityPricing --]
<p class="Space">&nbsp;</p>
[-- END_IF --]

[-- IF VAR.Form 0 --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]"><img
src="media/buyit.gif" height=26 width=84 border=0></a>
[-- ELSE --]
<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 --]>

[-- IF VAR.Options yes --]
[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

<input type=image src="media/buyit.gif" height=26 width=84 border=0
align="absbottom" name="Add to Cart" alt="Add to Cart">
</form>
[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]
</font>
</body>
</html>
</div>


<!--********************-->
<!-- Begin Footer Table -->
<!--********************-->
<table class="footer">
<tr>
<td align="center">
[--IF MORE_INFO.DisplayPageFooter--]
[-- FOOTER --]
[--END_IF--]
</td>
</tr>
<tr>

</tr>
</table>

[-- VAR.MoreInfo "" --]
[-- END_DEFINE MORE_INFO_PAGE--]
NuQ
 

Re: Get rid of spaces

Postby Jim » Fri May 14, 2004 7:50 pm

I can't get your page to load so I can look at it.

I do notice that in your product template there are form tags for
various parts of the product (quantity, order options). In the
multi-product add to cart all form tags must be on the page not in the
product because all products must be added to the cart at one time so
all values for the form must be submitted at one time.

You would be better off starting with the sample multi-product page and
product templates found in the help and expanding from there.
http://www.shopsite.com/help/7.0/en-US/ ... i-add.html

You must use a specific product template with a specific page template
in order for it to work. I copied the templates exactly from the help
and put them in my store and got it to work without much effort. You
can see an example here.
http://beeutahful.com/store/arachne2003_sale.html
It could be fancied up but it is functional and just uses the example
templates from the help.

Jim

NuQ wrote:

http://www.swtrading.net/zzJJTest2.html

I've hacked together a Product Template and Page Template in order to
implement the Multi-Product [Add to Cart] Button.

I basically started with the Stained Glass template and hacked away. BTW,
the More Info page still looks like crap, but I'm working on it.

I need to get rid of the spaces or carriage return or whatever between the
description and the Quantity Pricing and the spaces between the Quantity
Pricing and the Checkbox/Quantity.

I don't see how to control this in the templates.

Here's my template...(there's left over stuff still in there)

# Multi-Prod by JTJ

#######################
[--DEFINE SUBPRODUCT--]
#######################
[-- VAR.SubForm no --]
[-- VAR.SubOptions no --]
[-- VAR.SubQuantity no --]

#######################
# Subproduct Name #
#######################
[-- IF PRODUCT.DisplayMoreInformationPage --]
font size="4" color="#000066">•</font> <a href="[--
OUTPUT_DIRECTORY_URL --]/[-- PRODUCT.MoreInformationFileName --]">[--
PRODUCT.Name --]</a
[-- ELSE --]20DISPLAY_TAG
font size="4" color="#000066">•</font> [-- PRODUCT.Name --]
[-- END_IF --]
&nbsp;&nbsp;

#######################
# Subproduct Price #
#######################
[--IF PRODUCT.SaleOn--]
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize
Begin --][-- PRODUCT.PriceStyle Begin --][-- PRODUCT.SaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[-- PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.SubForm yes --]
[-- VAR.SubOptions yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.SubForm yes --]
[-- VAR.SubQuantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF VAR.SubForm no --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]&super=[--
PRODUCT.Parent --]"><img src="media/buyitall.gif" height=26 width=84
border=0></a><br
[-- ELSE --]
form action="[-- SHOPPING_CART_URL BASE --]/order.cgi"
style="display:inline" method=post
input type=hidden name=storeid value=[-- STORE_ID --]
input type=hidden name="super" value="[-- Product.Parent --]"
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]
[-- IF VAR.SubOptions yes --]
br>[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.SubQuantity yes --]
[-- IF VAR.SubOptions no --]
br
[-- END_IF --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
input type=image src="media/buyitall.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart"
/form><br
[-- END_IF --]

###########################
[--END_DEFINE SUBPRODUCT--]
###########################



####################
[--DEFINE PRODUCT--]
####################
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
[-- VAR.Form no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]
[-- IF PRODUCT.TextWrap On --]
[-- VAR.wrap on --]
[-- ELSE --]
[-- VAR.wrap off --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment center --]
[-- VAR.wrap on --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment right --]
[-- VAR.ImageAlign align=right --]
[-- ELSE_IF PRODUCT.ImageAlignment left --]
[-- VAR.ImageAlign align=left --]
[-- ELSE --]
[-- VAR.ImageAlign "" --]
[-- END_IF --]
[-- IF PRODUCT.DisplayGraphic--]
[-- IF PRODUCT.Graphic --]
[-- VAR.Graphic yes --]
[-- END_IF --]
[-- END_IF --]
# A table layout is only required if all these conditions are true:
## there is a graphic,
## the graphic is to be displayed,
## text wrap is off,
## image alignment is left or right (can be determined by VAR.wrap value)
[-- IF VAR.Graphic yes --]
[-- IF VAR.wrap off --]
[-- VAR.TableLayout yes --]
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT GRAPHIC #
####################
[-- IF VAR.TableLayout yes --]
table cellspacing="0" border="0"
tr
td valign="top"
[-- ELSE --]
[-- IF PRODUCT.ImageAlignment center --]
center
[-- END_IF --]
[-- END_IF --]

[-- IF VAR.Graphic yes --]
[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
# do nothing because graphic is placed later
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
a href="[-- PRODUCT.MoreInfoURL --]"><img [-- PRODUCT.Graphic
REMOVE_HTML --] [-- VAR.ImageAlign --]></a
[-- ELSE --]
img [-- PRODUCT.Graphic REMOVE_HTML --] [-- VAR.ImageAlign --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.ImageAlignment center --]
/center
[-- END_IF --]

[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
#do nothing
[-- ELSE --]
/td> <!-- This closes the product graphic cell --
td valign="top"> <!-- This opens the text cell --
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT NAME #
####################
[-- 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.NameSize End --][-- PRODUCT.NameStyle End --]<br
[-- END_IF --]

########################
# PRODUCT SUBPRODUCTS #
########################
[-- IF PRODUCT.Subproduct --]
# Product has subproducts, so just show description for this product
# and then loop through subproducts
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br

[-- VAR.MoreInfo no --]

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

[-- ELSE --]
# Product does not have subproducts

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a sale
price
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
br
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]


####################
# PRODUCT SKU #
####################
[--IF PRODUCT.DisplaySKU --]
[-- PRODUCT.SKUSize Begin --][-- PRODUCT.SKUStyle Begin --][--
PRODUCT.SKU --][-- PRODUCT.SKUSize End --][-- PRODUCT.SKUStyle End --]<br
[--End_If--]


########################
# PRODUCT DESCRIPTION #
########################
# Product Description
[-- IF PRODUCT.ProductDescription --]
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- END_IF --]

[-- IF VAR.Form no --]
a href="[--PRODUCT.AddToCartURL--]"><img src="media/buyit.gif"
height=26 width=84 border=0></a
[-- ELSE --]
# <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 --]

[-- IF VAR.Options yes --]
[-- IF PRODUCT.OptionText --]
[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

P><font face="Verdana, Arial, Helvetica, sans-serif">Check to Buy It</font
input type=checkbox name=itemnum value=[-- PRODUCT.RECORDNUMBER --]
br
[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

# <br><input type=image src="media/buyit.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart"
# <input type=image src="http://www.swtrading.net/media/view_cart.gif"
width=84 height=26 border=0 align="absbottom" name="Add to Cart"
alt="view_cart.gif" hspace=3 vspace=3 border=0 align="bottom" border="0"
name="View Cart" alt="View Cart"
# </form

[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]



###########################
# PRODUCT GRAPHIC #
# align=right, wrap=off #
###########################
[-- IF VAR.TableLayout yes --]
/td> <!-- Close cell for product name and description --
# if image align=right, put graphic in cell here
[-- IF PRODUCT.ImageAlignment right --]
td valign="top"
[-- IF PRODUCT.DisplayMoreInformationPage --]
a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
/td
[-- END_IF --]
/tr
/table
[-- END_IF --]

[-- END_DEFINE PRODUCT--]


############################
[-- DEFINE MORE_INFO_PAGE--]
############################
[-- VAR.MoreInfo yes --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- VAR.Quantity yes --]
html
head
title>[-- PRODUCT.Name Remove_HTML --] at [-- STORE.Name
Remove_HTML --]</title
style type"text/css"
!--
body, p, h1, h2, h3, td, div, ol, ul, dl {
font-family: Arial, Verdana, Helvetica, sans-serif;
}

body {
margin: 0em;
color: [-- MORE_INFO.TextColor --];
background-color: [-- MORE_INFO.BackgroundColor --];
font-size: 10pt;
}

a:link {
color: #[-- MORE_INFO.LinkColor --];
}
a:visited {
color: #[-- MORE_INFO.VisitedLinkColor --];
}
a:hover {
color: #[-- MORE_INFO.LinkColor --];
}
a:active {
color: #[-- MORE_INFO.ActiveLinkColor --];
}

h1 {
font-size: 18pt;
margin-top: 10px;
margin-bottom: 0pt;
}

h2 {
font-size: 16pt;
margin-top: 8px;
margin-bottom: 0pt;
}

h3 {
font-size: 14pt;
margin-top: 8px;
margin-bottom: 0pt;
}

table.header
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_top.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 154}

table.footer
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_bottom.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 160}

table.middle {
background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_middle.gif);
background-position: top left;
background-repeat: repeat-y;
width: 800;
}

table.name
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_banner.gif);
background-position: center center;
background-repeat: no-repeat;
border: 0pt;
width: 400;
height: 50}

td.name
{ text-align: center;
vertical-align: middle;
font-size: 18pt;
font-weight: bold}

td.graphic
{ text-align: center;
padding-top: 15}

table.qp_header {
font-size: 10pt;
}

p.Space {
font-size: 6pt;
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
}
--
/style

/head

body marginwidth="0" marginheight="0"

font face="sans-serif"

!--********************--
!--*** Header Table ***--
!--********************--

table class="header"
[-- IF MORE_INFO.DisplayPageHeader --]
tr
td class="graphic" colspan="3"
[-- HEADER --]
/td
/tr
[-- END_IF --]

tr
td align="center"

table cellpadding="0" cellspacing="0" border="0"
tr

/tr
/table
div align="center"

table class="name"
tr><td class="name"
[-- PRODUCT.Name --]
/td></tr
/table
/div

/td
/tr
/table


!--********************--
!-- Begin Middle Table --
!--********************--
div align="center"
table class="middle"
tr
td width="8">&nbsp;</td> <!-- left side spacer --
td align="center"
[-- PRODUCT.MoreInformationGraphic --]
p
small>[-- PRODUCT.SKU --]</small
/td
td width="8">&nbsp;</td> <!-- right side spacer --
/tr

tr
td width="8">&nbsp;</td> <!-- left side spacer --
td align="center"
table
tr
td
[-- PRODUCT.MoreInformationText --]
/div
/td
/tr
/p

[-- IF PRODUCT.Subproduct --]
# Product has subproducts
tr
td
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]

[-- ELSE --]
# Product does not have subproducts
tr
td

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a sale
price
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
br
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
div align="center"
[-- IF PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- END_IF --]

[-- IF VAR.Form 0 --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]"><img
src="media/buyit.gif" height=26 width=84 border=0></a
[-- ELSE --]
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 --]

[-- IF VAR.Options yes --]
[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

input type=image src="media/buyit.gif" height=26 width=84 border=0
align="absbottom" name="Add to Cart" alt="Add to Cart"
/form
[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]
/font
/body
/html
/div


!--********************--
!-- Begin Footer Table --
!--********************--
table class="footer"
tr
td align="center"
[--IF MORE_INFO.DisplayPageFooter--]
[-- FOOTER --]
[--END_IF--]
/td
/tr
tr

/tr
/table

[-- VAR.MoreInfo "" --]
[-- END_DEFINE MORE_INFO_PAGE--]

Jim
 

Re: Get rid of spaces

Postby Jim » Fri May 14, 2004 8:21 pm

I finally got the page to load using IE it never did finish loading
using Mozilla.

The source show <p class="Space">&nbsp;</p> before and after the
quantity pricing table as well as an additional <p> after the table. I
can not see where the "Space" style is defined in the page. If I copy
the style sheet containing the Space define from the moreinfo section of
the template and paste it into the html code for the page the spacing
becomes much smaller. If I remove that altogether then the spacing
becomes minimal. So either add the style sheet to the page template or
remove the <p class="Space">&nbsp;</p> code from the product template.

Jim

NuQ wrote:

http://www.swtrading.net/zzJJTest2.html

I've hacked together a Product Template and Page Template in order to
implement the Multi-Product [Add to Cart] Button.

I basically started with the Stained Glass template and hacked away. BTW,
the More Info page still looks like crap, but I'm working on it.

I need to get rid of the spaces or carriage return or whatever between the
description and the Quantity Pricing and the spaces between the Quantity
Pricing and the Checkbox/Quantity.

I don't see how to control this in the templates.

Here's my template...(there's left over stuff still in there)

# Multi-Prod by JTJ

#######################
[--DEFINE SUBPRODUCT--]
#######################
[-- VAR.SubForm no --]
[-- VAR.SubOptions no --]
[-- VAR.SubQuantity no --]

#######################
# Subproduct Name #
#######################
[-- IF PRODUCT.DisplayMoreInformationPage --]
font size="4" color="#000066">•</font> <a href="[--
OUTPUT_DIRECTORY_URL --]/[-- PRODUCT.MoreInformationFileName --]">[--
PRODUCT.Name --]</a
[-- ELSE --]20DISPLAY_TAG
font size="4" color="#000066">•</font> [-- PRODUCT.Name --]
[-- END_IF --]
&nbsp;&nbsp;

#######################
# Subproduct Price #
#######################
[--IF PRODUCT.SaleOn--]
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize
Begin --][-- PRODUCT.PriceStyle Begin --][-- PRODUCT.SaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[-- PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.SubForm yes --]
[-- VAR.SubOptions yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.SubForm yes --]
[-- VAR.SubQuantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF VAR.SubForm no --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]&super=[--
PRODUCT.Parent --]"><img src="media/buyitall.gif" height=26 width=84
border=0></a><br
[-- ELSE --]
form action="[-- SHOPPING_CART_URL BASE --]/order.cgi"
style="display:inline" method=post
input type=hidden name=storeid value=[-- STORE_ID --]
input type=hidden name="super" value="[-- Product.Parent --]"
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]
[-- IF VAR.SubOptions yes --]
br>[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.SubQuantity yes --]
[-- IF VAR.SubOptions no --]
br
[-- END_IF --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
input type=image src="media/buyitall.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart"
/form><br
[-- END_IF --]

###########################
[--END_DEFINE SUBPRODUCT--]
###########################



####################
[--DEFINE PRODUCT--]
####################
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
[-- VAR.Form no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]
[-- IF PRODUCT.TextWrap On --]
[-- VAR.wrap on --]
[-- ELSE --]
[-- VAR.wrap off --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment center --]
[-- VAR.wrap on --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment right --]
[-- VAR.ImageAlign align=right --]
[-- ELSE_IF PRODUCT.ImageAlignment left --]
[-- VAR.ImageAlign align=left --]
[-- ELSE --]
[-- VAR.ImageAlign "" --]
[-- END_IF --]
[-- IF PRODUCT.DisplayGraphic--]
[-- IF PRODUCT.Graphic --]
[-- VAR.Graphic yes --]
[-- END_IF --]
[-- END_IF --]
# A table layout is only required if all these conditions are true:
## there is a graphic,
## the graphic is to be displayed,
## text wrap is off,
## image alignment is left or right (can be determined by VAR.wrap value)
[-- IF VAR.Graphic yes --]
[-- IF VAR.wrap off --]
[-- VAR.TableLayout yes --]
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT GRAPHIC #
####################
[-- IF VAR.TableLayout yes --]
table cellspacing="0" border="0"
tr
td valign="top"
[-- ELSE --]
[-- IF PRODUCT.ImageAlignment center --]
center
[-- END_IF --]
[-- END_IF --]

[-- IF VAR.Graphic yes --]
[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
# do nothing because graphic is placed later
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
a href="[-- PRODUCT.MoreInfoURL --]"><img [-- PRODUCT.Graphic
REMOVE_HTML --] [-- VAR.ImageAlign --]></a
[-- ELSE --]
img [-- PRODUCT.Graphic REMOVE_HTML --] [-- VAR.ImageAlign --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.ImageAlignment center --]
/center
[-- END_IF --]

[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
#do nothing
[-- ELSE --]
/td> <!-- This closes the product graphic cell --
td valign="top"> <!-- This opens the text cell --
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT NAME #
####################
[-- 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.NameSize End --][-- PRODUCT.NameStyle End --]<br
[-- END_IF --]

########################
# PRODUCT SUBPRODUCTS #
########################
[-- IF PRODUCT.Subproduct --]
# Product has subproducts, so just show description for this product
# and then loop through subproducts
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br

[-- VAR.MoreInfo no --]

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

[-- ELSE --]
# Product does not have subproducts

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a sale
price
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
br
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]


####################
# PRODUCT SKU #
####################
[--IF PRODUCT.DisplaySKU --]
[-- PRODUCT.SKUSize Begin --][-- PRODUCT.SKUStyle Begin --][--
PRODUCT.SKU --][-- PRODUCT.SKUSize End --][-- PRODUCT.SKUStyle End --]<br
[--End_If--]


########################
# PRODUCT DESCRIPTION #
########################
# Product Description
[-- IF PRODUCT.ProductDescription --]
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- END_IF --]

[-- IF VAR.Form no --]
a href="[--PRODUCT.AddToCartURL--]"><img src="media/buyit.gif"
height=26 width=84 border=0></a
[-- ELSE --]
# <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 --]

[-- IF VAR.Options yes --]
[-- IF PRODUCT.OptionText --]
[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

P><font face="Verdana, Arial, Helvetica, sans-serif">Check to Buy It</font
input type=checkbox name=itemnum value=[-- PRODUCT.RECORDNUMBER --]
br
[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

# <br><input type=image src="media/buyit.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart"
# <input type=image src="http://www.swtrading.net/media/view_cart.gif"
width=84 height=26 border=0 align="absbottom" name="Add to Cart"
alt="view_cart.gif" hspace=3 vspace=3 border=0 align="bottom" border="0"
name="View Cart" alt="View Cart"
# </form

[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]



###########################
# PRODUCT GRAPHIC #
# align=right, wrap=off #
###########################
[-- IF VAR.TableLayout yes --]
/td> <!-- Close cell for product name and description --
# if image align=right, put graphic in cell here
[-- IF PRODUCT.ImageAlignment right --]
td valign="top"
[-- IF PRODUCT.DisplayMoreInformationPage --]
a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
/td
[-- END_IF --]
/tr
/table
[-- END_IF --]

[-- END_DEFINE PRODUCT--]


############################
[-- DEFINE MORE_INFO_PAGE--]
############################
[-- VAR.MoreInfo yes --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- VAR.Quantity yes --]
html
head
title>[-- PRODUCT.Name Remove_HTML --] at [-- STORE.Name
Remove_HTML --]</title
style type"text/css"
!--
body, p, h1, h2, h3, td, div, ol, ul, dl {
font-family: Arial, Verdana, Helvetica, sans-serif;
}

body {
margin: 0em;
color: [-- MORE_INFO.TextColor --];
background-color: [-- MORE_INFO.BackgroundColor --];
font-size: 10pt;
}

a:link {
color: #[-- MORE_INFO.LinkColor --];
}
a:visited {
color: #[-- MORE_INFO.VisitedLinkColor --];
}
a:hover {
color: #[-- MORE_INFO.LinkColor --];
}
a:active {
color: #[-- MORE_INFO.ActiveLinkColor --];
}

h1 {
font-size: 18pt;
margin-top: 10px;
margin-bottom: 0pt;
}

h2 {
font-size: 16pt;
margin-top: 8px;
margin-bottom: 0pt;
}

h3 {
font-size: 14pt;
margin-top: 8px;
margin-bottom: 0pt;
}

table.header
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_top.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 154}

table.footer
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_bottom.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 160}

table.middle {
background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_middle.gif);
background-position: top left;
background-repeat: repeat-y;
width: 800;
}

table.name
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_banner.gif);
background-position: center center;
background-repeat: no-repeat;
border: 0pt;
width: 400;
height: 50}

td.name
{ text-align: center;
vertical-align: middle;
font-size: 18pt;
font-weight: bold}

td.graphic
{ text-align: center;
padding-top: 15}

table.qp_header {
font-size: 10pt;
}

p.Space {
font-size: 6pt;
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
}
--
/style

/head

body marginwidth="0" marginheight="0"

font face="sans-serif"

!--********************--
!--*** Header Table ***--
!--********************--

table class="header"
[-- IF MORE_INFO.DisplayPageHeader --]
tr
td class="graphic" colspan="3"
[-- HEADER --]
/td
/tr
[-- END_IF --]

tr
td align="center"

table cellpadding="0" cellspacing="0" border="0"
tr

/tr
/table
div align="center"

table class="name"
tr><td class="name"
[-- PRODUCT.Name --]
/td></tr
/table
/div

/td
/tr
/table


!--********************--
!-- Begin Middle Table --
!--********************--
div align="center"
table class="middle"
tr
td width="8">&nbsp;</td> <!-- left side spacer --
td align="center"
[-- PRODUCT.MoreInformationGraphic --]
p
small>[-- PRODUCT.SKU --]</small
/td
td width="8">&nbsp;</td> <!-- right side spacer --
/tr

tr
td width="8">&nbsp;</td> <!-- left side spacer --
td align="center"
table
tr
td
[-- PRODUCT.MoreInformationText --]
/div
/td
/tr
/p

[-- IF PRODUCT.Subproduct --]
# Product has subproducts
tr
td
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]

[-- ELSE --]
# Product does not have subproducts
tr
td

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a sale
price
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
br
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
div align="center"
[-- IF PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- END_IF --]

[-- IF VAR.Form 0 --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]"><img
src="media/buyit.gif" height=26 width=84 border=0></a
[-- ELSE --]
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 --]

[-- IF VAR.Options yes --]
[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

input type=image src="media/buyit.gif" height=26 width=84 border=0
align="absbottom" name="Add to Cart" alt="Add to Cart"
/form
[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]
/font
/body
/html
/div


!--********************--
!-- Begin Footer Table --
!--********************--
table class="footer"
tr
td align="center"
[--IF MORE_INFO.DisplayPageFooter--]
[-- FOOTER --]
[--END_IF--]
/td
/tr
tr

/tr
/table

[-- VAR.MoreInfo "" --]
[-- END_DEFINE MORE_INFO_PAGE--]

Jim
 

Re: Get rid of spaces

Postby NuQ » Mon May 17, 2004 9:03 am

Thank you very much, Jim. As you can tell, I'm not a programmer! I
appreciate both of the replies and will use the advice given!


"Jim" <jstavast@xmission.com> wrote in message
news:c842b6$qu8$1@support.shopsite.com...
I finally got the page to load using IE it never did finish loading
using Mozilla.

The source show <p class="Space">&nbsp;</p> before and after the
quantity pricing table as well as an additional <p> after the table. I
can not see where the "Space" style is defined in the page. If I copy
the style sheet containing the Space define from the moreinfo section of
the template and paste it into the html code for the page the spacing
becomes much smaller. If I remove that altogether then the spacing
becomes minimal. So either add the style sheet to the page template or
remove the <p class="Space">&nbsp;</p> code from the product template.

Jim

NuQ wrote:

http://www.swtrading.net/zzJJTest2.html

I've hacked together a Product Template and Page Template in order to
implement the Multi-Product [Add to Cart] Button.

I basically started with the Stained Glass template and hacked away.
BTW,
the More Info page still looks like crap, but I'm working on it.

I need to get rid of the spaces or carriage return or whatever between
the
description and the Quantity Pricing and the spaces between the Quantity
Pricing and the Checkbox/Quantity.

I don't see how to control this in the templates.

Here's my template...(there's left over stuff still in there)

# Multi-Prod by JTJ

#######################
[--DEFINE SUBPRODUCT--]
#######################
[-- VAR.SubForm no --]
[-- VAR.SubOptions no --]
[-- VAR.SubQuantity no --]

#######################
# Subproduct Name #
#######################
[-- IF PRODUCT.DisplayMoreInformationPage --]
font size="4" color="#000066">•</font> <a href="[--
OUTPUT_DIRECTORY_URL --]/[-- PRODUCT.MoreInformationFileName --]">[--
PRODUCT.Name --]</a
[-- ELSE --]20DISPLAY_TAG
font size="4" color="#000066">•</font> [-- PRODUCT.Name --]
[-- END_IF --]
&nbsp;&nbsp;

#######################
# Subproduct Price #
#######################
[--IF PRODUCT.SaleOn--]
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize
Begin --][-- PRODUCT.PriceStyle Begin --][-- PRODUCT.SaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.SubForm yes --]
[-- VAR.SubOptions yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.SubForm yes --]
[-- VAR.SubQuantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF VAR.SubForm no --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]&super=[--
PRODUCT.Parent --]"><img src="media/buyitall.gif" height=26 width=84
border=0></a><br
[-- ELSE --]
form action="[-- SHOPPING_CART_URL BASE --]/order.cgi"
style="display:inline" method=post
input type=hidden name=storeid value=[-- STORE_ID --]
input type=hidden name="super" value="[-- Product.Parent --]"
input type=hidden name=dbname value=products
input type=hidden name=function value=add
input type=hidden name=itemnum value=[-- PRODUCT.RecordNumber --]
[-- IF VAR.SubOptions yes --]
br>[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.SubQuantity yes --]
[-- IF VAR.SubOptions no --]
br
[-- END_IF --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]
input type=image src="media/buyitall.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart"
/form><br
[-- END_IF --]

###########################
[--END_DEFINE SUBPRODUCT--]
###########################



####################
[--DEFINE PRODUCT--]
####################
### Set a bunch of variables ###
[-- VAR.TableLayout no --]
[-- VAR.Form no --]
[-- VAR.Options no --]
[-- VAR.Quantity no --]
[-- VAR.Graphic no --]
[-- IF PRODUCT.TextWrap On --]
[-- VAR.wrap on --]
[-- ELSE --]
[-- VAR.wrap off --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment center --]
[-- VAR.wrap on --]
[-- END_IF --]
[-- IF PRODUCT.ImageAlignment right --]
[-- VAR.ImageAlign align=right --]
[-- ELSE_IF PRODUCT.ImageAlignment left --]
[-- VAR.ImageAlign align=left --]
[-- ELSE --]
[-- VAR.ImageAlign "" --]
[-- END_IF --]
[-- IF PRODUCT.DisplayGraphic--]
[-- IF PRODUCT.Graphic --]
[-- VAR.Graphic yes --]
[-- END_IF --]
[-- END_IF --]
# A table layout is only required if all these conditions are true:
## there is a graphic,
## the graphic is to be displayed,
## text wrap is off,
## image alignment is left or right (can be determined by VAR.wrap
value)
[-- IF VAR.Graphic yes --]
[-- IF VAR.wrap off --]
[-- VAR.TableLayout yes --]
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT GRAPHIC #
####################
[-- IF VAR.TableLayout yes --]
table cellspacing="0" border="0"
tr
td valign="top"
[-- ELSE --]
[-- IF PRODUCT.ImageAlignment center --]
center
[-- END_IF --]
[-- END_IF --]

[-- IF VAR.Graphic yes --]
[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
# do nothing because graphic is placed later
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
a href="[-- PRODUCT.MoreInfoURL --]">[--
PRODUCT.Graphic --]</a
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
[-- END_IF --]
[-- ELSE --]
[-- IF PRODUCT.DisplayMoreInformationPage--]
a href="[-- PRODUCT.MoreInfoURL --]"><img [-- PRODUCT.Graphic
REMOVE_HTML --] [-- VAR.ImageAlign --]></a
[-- ELSE --]
img [-- PRODUCT.Graphic REMOVE_HTML --] [-- VAR.ImageAlign --]
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

[-- IF PRODUCT.ImageAlignment center --]
/center
[-- END_IF --]

[-- IF VAR.TableLayout yes --]
[-- IF PRODUCT.ImageAlignment right --]
#do nothing
[-- ELSE --]
/td> <!-- This closes the product graphic cell --
td valign="top"> <!-- This opens the text cell --
[-- END_IF --]
[-- END_IF --]

####################
# PRODUCT NAME #
####################
[-- 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.NameSize End --][-- PRODUCT.NameStyle End --]<br
[-- END_IF --]

########################
# PRODUCT SUBPRODUCTS #
########################
[-- IF PRODUCT.Subproduct --]
# Product has subproducts, so just show description for this product
# and then loop through subproducts
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br

[-- VAR.MoreInfo no --]

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

[-- ELSE --]
# Product does not have subproducts

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a
sale
price
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize
Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
br
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price
displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]


####################
# PRODUCT SKU #
####################
[--IF PRODUCT.DisplaySKU --]
[-- PRODUCT.SKUSize Begin --][-- PRODUCT.SKUStyle Begin --][--
PRODUCT.SKU --][-- PRODUCT.SKUSize End --][-- PRODUCT.SKUStyle
End --]<br
[--End_If--]


########################
# PRODUCT DESCRIPTION #
########################
# Product Description
[-- IF PRODUCT.ProductDescription --]
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle
Begin --][-- PRODUCT.ProductDescription --][-- PRODUCT.DescriptionSize
End --][-- PRODUCT.DescriptionStyle End --]<br
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
[-- IF PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- END_IF --]

[-- IF VAR.Form no --]
a href="[--PRODUCT.AddToCartURL--]"><img src="media/buyit.gif"
height=26 width=84 border=0></a
[-- ELSE --]
# <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 --]

[-- IF VAR.Options yes --]
[-- IF PRODUCT.OptionText --]
[-- PRODUCT.OptionText --]
[-- END_IF --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

P><font face="Verdana, Arial, Helvetica, sans-serif">Check to Buy
It</font
input type=checkbox name=itemnum value=[-- PRODUCT.RECORDNUMBER --]
br
[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

# <br><input type=image src="media/buyit.gif" height=26 width=84
border=0 align="absbottom" name="Add to Cart" alt="Add to Cart"
# <input type=image
src="http://www.swtrading.net/media/view_cart.gif"
width=84 height=26 border=0 align="absbottom" name="Add to Cart"
alt="view_cart.gif" hspace=3 vspace=3 border=0 align="bottom" border="0"
name="View Cart" alt="View Cart"
# </form

[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]



###########################
# PRODUCT GRAPHIC #
# align=right, wrap=off #
###########################
[-- IF VAR.TableLayout yes --]
/td> <!-- Close cell for product name and description --
# if image align=right, put graphic in cell here
[-- IF PRODUCT.ImageAlignment right --]
td valign="top"
[-- IF PRODUCT.DisplayMoreInformationPage --]
a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a
[-- ELSE --]
[-- PRODUCT.Graphic --]
[-- END_IF --]
/td
[-- END_IF --]
/tr
/table
[-- END_IF --]

[-- END_DEFINE PRODUCT--]


############################
[-- DEFINE MORE_INFO_PAGE--]
############################
[-- VAR.MoreInfo yes --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- VAR.Quantity yes --]
html
head
title>[-- PRODUCT.Name Remove_HTML --] at [-- STORE.Name
Remove_HTML --]</title
style type"text/css"
!--
body, p, h1, h2, h3, td, div, ol, ul, dl {
font-family: Arial, Verdana, Helvetica, sans-serif;
}

body {
margin: 0em;
color: [-- MORE_INFO.TextColor --];
background-color: [-- MORE_INFO.BackgroundColor --];
font-size: 10pt;
}

a:link {
color: #[-- MORE_INFO.LinkColor --];
}
a:visited {
color: #[-- MORE_INFO.VisitedLinkColor --];
}
a:hover {
color: #[-- MORE_INFO.LinkColor --];
}
a:active {
color: #[-- MORE_INFO.ActiveLinkColor --];
}

h1 {
font-size: 18pt;
margin-top: 10px;
margin-bottom: 0pt;
}

h2 {
font-size: 16pt;
margin-top: 8px;
margin-bottom: 0pt;
}

h3 {
font-size: 14pt;
margin-top: 8px;
margin-bottom: 0pt;
}

table.header
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_top.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 154}

table.footer
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_bottom.gif);
background-position: top left;
background-repeat: no-repeat;
border: 0pt;
width: 800;
height: 160}

table.middle {
background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_background_middle.gif);
background-position: top left;
background-repeat: repeat-y;
width: 800;
}

table.name
{ background-image: url([-- OUTPUT_DIRECTORY_URL --]/[--
VAR.Media --]/sg_banner.gif);
background-position: center center;
background-repeat: no-repeat;
border: 0pt;
width: 400;
height: 50}

td.name
{ text-align: center;
vertical-align: middle;
font-size: 18pt;
font-weight: bold}

td.graphic
{ text-align: center;
padding-top: 15}

table.qp_header {
font-size: 10pt;
}

p.Space {
font-size: 6pt;
margin-left: 0em;
margin-top: 0em;
margin-bottom: 0em;
}
--
/style

/head

body marginwidth="0" marginheight="0"

font face="sans-serif"

!--********************--
!--*** Header Table ***--
!--********************--

table class="header"
[-- IF MORE_INFO.DisplayPageHeader --]
tr
td class="graphic" colspan="3"
[-- HEADER --]
/td
/tr
[-- END_IF --]

tr
td align="center"

table cellpadding="0" cellspacing="0" border="0"
tr

/tr
/table
div align="center"

table class="name"
tr><td class="name"
[-- PRODUCT.Name --]
/td></tr
/table
/div

/td
/tr
/table


!--********************--
!-- Begin Middle Table --
!--********************--
div align="center"
table class="middle"
tr
td width="8">&nbsp;</td> <!-- left side spacer --
td align="center"
[-- PRODUCT.MoreInformationGraphic --]
p
small>[-- PRODUCT.SKU --]</small
/td
td width="8">&nbsp;</td> <!-- right side spacer --
/tr

tr
td width="8">&nbsp;</td> <!-- left side spacer --
td align="center"
table
tr
td
[-- PRODUCT.MoreInformationText --]
/div
/td
/tr
/p

[-- IF PRODUCT.Subproduct --]
# Product has subproducts
tr
td
[--LOOP SUBPRODUCTS--]
[--SUBPRODUCTS--]
[--END_LOOP SUBPRODUCTS--]

[-- ELSE --]
# Product does not have subproducts
tr
td

####################
# PRODUCT PRICE #
####################
# if merchant wants price displayed
[--IF PRODUCT.DisplayPrice --]
# if merchant wants sale price displayed
[--IF PRODUCT.SaleOn--]
# if price is to be displayed, and product is on sale and there is a
sale
price
[-- IF PRODUCT.SaleAmount --]
strike>[-- PRODUCT.Price --]</strike>&nbsp;&nbsp;[--
PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# likewise for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;<strike>[--
PRODUCT.AltPrice --]</strike>&nbsp;&nbsp;[-- PRODUCT.PriceSize
Begin --][--
PRODUCT.PriceStyle Begin --][-- PRODUCT.AltSaleAmount --][--
PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]&nbsp;[--
STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[--Else--]
# product is not on sale, so just display price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --]
[-- PRODUCT.Price --]
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.AltPrice --]
[-- END_IF --]
[-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
br
[-- END_IF --]
[-- ELSE --]
# merchant does not want price displayed, but does want sale price
displayed
[--IF PRODUCT.SaleOn--]
# check to make sure that a sale price exists
[-- IF PRODUCT.SaleAmount --]
# display sale price, but not regular price
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle
Begin --][--
PRODUCT.SaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle
End --]&nbsp;[-- STORE.OnSaleText --]
# same for alternate price
[--IF PRODUCT.AltPrice--]
&nbsp;&nbsp;[-- PRODUCT.PriceSize Begin --][--
PRODUCT.PriceStyle
Begin --][-- PRODUCT.AltSaleAmount --][-- PRODUCT.PriceSize End --][--
PRODUCT.PriceStyle End --]&nbsp;[-- STORE.OnSaleText --]
[-- END_IF --]
br
[-- END_IF --]
[-- END_IF --]
[-- END_IF --]

#######################
# Ordering Options #
#######################
[-- IF PRODUCT.DisplayOrderingOptions --]
[-- VAR.Form yes --]
[-- VAR.Options yes --]
[-- END_IF --]

#######################
# Order Quantity #
#######################
[-- IF PRODUCT.DisplayOrderQuantity checked --]
[-- VAR.Form yes --]
[-- VAR.Quantity yes --]
[-- END_IF --]

#######################
# ADD TO CART BUTTON #
#######################
div align="center"
[-- IF PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- PRODUCT.QuantityPricing --]
p class="Space">&nbsp;</p
[-- END_IF --]

[-- IF VAR.Form 0 --]
&nbsp;&nbsp;<a href="[--PRODUCT.AddToCartURL--]"><img
src="media/buyit.gif" height=26 width=84 border=0></a
[-- ELSE --]
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 --]

[-- IF VAR.Options yes --]
[-- PRODUCT.OptionText --]
[-- ORDER_OPTION_MENU LINE --]
[-- END_IF --]

[-- IF VAR.Quantity yes --]
Quantity <input type=text size=2 name="[--
PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
[-- END_IF --]

input type=image src="media/buyit.gif" height=26 width=84
border=0
align="absbottom" name="Add to Cart" alt="Add to Cart"
/form
[-- END_IF --]

# end the IF PRODUCT.subproducts
[--END_IF--]
/font
/body
/html
/div


!--********************--
!-- Begin Footer Table --
!--********************--
table class="footer"
tr
td align="center"
[--IF MORE_INFO.DisplayPageFooter--]
[-- FOOTER --]
[--END_IF--]
/td
/tr
tr

/tr
/table

[-- VAR.MoreInfo "" --]
[-- END_DEFINE MORE_INFO_PAGE--]

NuQ
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 46 guests