Product Template Code Help

General ShopSite user discussion

Product Template Code Help

Postby crickart » Thu Nov 19, 2009 2:29 pm

HELP

whats wrong here? Been looking at it to long!

trying to get: SKU, Name, Description, Price, ADD to Cart Button. All in individual cells in a 5 cell single row table.

with the following code I have NO visiable table, and ADD to Cart button is "not defined"

EEEERRRRRRRRRRR :twisted:

[-- DEFINE PRODUCT --]

<table border="4" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="71%" id="AutoNumber1">

<tr>
<td width="20%">
[-- IF PRODUCT.DisplaySKU --]
<br>
[-- PRODUCT.SKUSize Begin --][-- PRODUCT.SKUStyle Begin --]
[-- PRODUCT.SKU --]
[-- PRODUCT.SKUStyle End --][-- PRODUCT.SKUSize End --]
[-- END_IF --]
</td>


<td width="20%">
[-- IF PRODUCT.DisplayName --]
[-- PRODUCT.NameSize Begin --][-- PRODUCT.NameStyle Begin --]
[-- PRODUCT.Name --]
[-- PRODUCT.NameStyle End --][-- PRODUCT.NameSize End --]
[-- END_IF --]
</td>


<td width="20%">
[-- IF PRODUCT.ProductDescription --]
<br>
[-- PRODUCT.DescriptionSize Begin --][-- PRODUCT.DescriptionStyle Begin --]
[-- PRODUCT.ProductDescription --]
[-- PRODUCT.DescriptionStyle End --][-- PRODUCT.DescriptionSize End --]
[-- END_IF --]
</td>


<td width="20%">
[-- IF PRODUCT.DisplayPrice --]
<br>
[-- IF VAR.SaleOn "yes" --]
<strike>[-- PRODUCT.Price --]</strike>
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][-- PRODUCT.SaleAmount --][-- PRODUCT.PriceStyle End --][-- PRODUCT.PriceSize End --]
[-- STORE.OnSaleText --]

[-- ELSE --]
# product is not on sale
[-- PRODUCT.PriceSize Begin --][-- PRODUCT.PriceStyle Begin --][-- PRODUCT.Price --][-- PRODUCT.PriceStyle End --][-- PRODUCT.PriceSize End --]
[-- END_IF --]
[-- END_IF --]
</td>



<td width="20%">
<!-- Add to Cart Button -->
[-- IF AddImage? --]
<td class="pr_addtocart_button"><input class="pr_addtocart_button" type="image" value="submit" [-- AddImage --] alt="[-- VAR.pr_addtocart_text --]"></td>
[-- ELSE --]
<td class="pr_addtocart_button"><input class="pr_addtocart_button" type="submit" value="[-- AddText --]"></td>
[-- END_IF --]
</td>
</tr>
</table>
[-- END_DEFINE PRODUCT --]
crickart
 
Posts: 4
Joined: Sun Nov 08, 2009 1:25 pm
Location: florida

Postby Jim » Fri Nov 20, 2009 2:37 pm

Did you get this working yet?

This part should be in your page template just before the [-- Loop Products --] tag
Code: Select all
 
<table border="4" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111" width="71%" id="AutoNumber1">

and then after the [-- End_Loop Products --]
you would put this
Code: Select all
</table>


Note that the tags like [-- PRODUCT.SKUSize Begin --] and [-- PRODUCT.SKUStyle Begin --] aren't really needed in your custom template if you include styles for the elements. These just make it so it uses the font size from the product layout settings screen. Most people would prefer to use styles.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 105 guests