subproduct images

General ShopSite user discussion

subproduct images

Postby Capt.Goodvibes » Mon Nov 13, 2006 5:51 pm

Ok so I thought I had this working but...

I would like the subproduct definition to mimic the product definition. But... cutting and pasting the contents of the [-- DEFINE PRODUCT --] section into the [-- DEFINE SUBPRODUCT --] and removing the subproduct references (since this is now a subprocudt itself), isn't working.

This is from the product template. It was copied from the default template. I added the description and image sections but they don't seem to work.



Code: Select all
# Tab Product Template

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

#######################
#  Subproduct Name    #
#######################
[-- IF PRODUCT.DisplayMoreInformationPage --]
  <font size="4" color="[-- VAR.HexColor --]">•</font> <a href="[-- OUTPUT_DIRECTORY_URL --]/[-- PRODUCT.MoreInformationFileName --]">[-- PRODUCT.Name --]</a>
[-- ELSE --]
  <font size="4" color="[-- VAR.HexColor --]">•</font> <strong>[-- PRODUCT.Name --]</strong>
[-- 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 --]
  <span style="color:#ee0000">[-- PRODUCT.Price --]</span>
  [-- IF PRODUCT.AltPrice --]
    &nbsp;&nbsp;[-- PRODUCT.AltPrice --]
  [-- END_IF --]
  [-- PRODUCT.PriceSize End --][-- PRODUCT.PriceStyle End --]
[-- END_IF --]


##########################
# SubProduct Description #
##########################
[-- IF PRODUCT.ProductDescription --]
<br />[-- PRODUCT.ProductDescription --]<br />&nbsp;<br />
[-- END_IF --]

####################
# subproduct image #
####################
[-- IF PRODUCT.DisplayMoreInformationPage--]
  <a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
[-- ELSE --]
  [-- PRODUCT.Graphic --]
[-- END_IF --]



Advice?
Capt.Goodvibes
 
Posts: 18
Joined: Fri Nov 10, 2006 5:36 pm

Postby Jim » Mon Nov 13, 2006 8:37 pm

What do you mean by "they don't seem to work" Does nothing show up on the page? Put some plain text in the sections that don't seem like they are working and see if it shows up on the page. That will tell you if the code is actually being called.

I presume that in the main Product section of the template you have a loop subproducts section

Do you have an [-- end_define subproduct --] tag? there isn't one in your sample code.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Postby Capt.Goodvibes » Fri Nov 17, 2006 12:06 pm

Jim wrote:What do you mean by "they don't seem to work" Does nothing show up on the page? Put some plain text in the sections that don't seem like they are working and see if it shows up on the page. That will tell you if the code is actually being called.

I presume that in the main Product section of the template you have a loop subproducts section

Do you have an [-- end_define subproduct --] tag? there isn't one in your sample code.


Yes the end tags are there. Does my code look correct to add photo and description? does the subproduct have different tags for photo and description?



Only the product title( which I want as a header ) and the subproduct titles, prices, and add to cart buttons are showing up. I want to also include the photo and description for the subproducts. They are what is actually what is for sale. See here there are only 4 "products" on the page but actually each sub-product has the button, and should have the photo and description. http://www.hackerpipes.com/products/harley.php

I also want to add an anchor to each "product" so I can have a text menu at the top of the page to navigate to each "product".

I'll add some text in the loops to check if they are working.
Code: Select all
##########################
# SubProduct Description #
##########################
[-- IF PRODUCT.ProductDescription --]
<br />[-- PRODUCT.ProductDescription --]<br />&nbsp;<br />
[-- END_IF --]

####################
# subproduct image #
####################
[-- IF PRODUCT.DisplayMoreInformationPage--]
  <a href="[-- PRODUCT.MoreInfoURL --]">[-- PRODUCT.Graphic --]</a>
[-- ELSE --]
  [-- PRODUCT.Graphic --]
[-- END_IF --]
Capt.Goodvibes
 
Posts: 18
Joined: Fri Nov 10, 2006 5:36 pm

Postby Capt.Goodvibes » Fri Nov 17, 2006 12:22 pm

I think I got it working. I added a
Code: Select all
[-- IF PRODUCT.Graphic --]

to enclose the photo definition and somehow that helped the description show up as well. Howdy Doody!

I only work on this site Mondays and Fridays so I must have percolated enough this week. :D
Capt.Goodvibes
 
Posts: 18
Joined: Fri Nov 10, 2006 5:36 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 140 guests

cron