How do I add products into my custom template.

General ShopSite user discussion

How do I add products into my custom template.

Postby jontaco » Wed Apr 23, 2008 9:16 am

Overall, products have me very confused.

I am having problems getting my products to show up in my custom template pages.

I have checked off everything that I can think of to solve this-

-Products have been added to Shopsite.
-Products are added to pages.
-Product template is in place.
-And product template has been added to all my products.
-Tried adding product loops to text1 field in page content

My products will show up well enough in any of the predefined templates that come with shopsite, but not in my own templatee.


For instance, I'm totally lost as to where [--LOOP PRODUCTS--] or [--LOOP LINKS --] go. This is the code that generates my product tables right?

Are there any samples of a simple product page I can look at, and NOT a page that has been generated (e.g. By clicking View-Source), but a page that contains ungenerated SS definitions that I could follow?
jontaco
 
Posts: 39
Joined: Sun Apr 20, 2008 8:05 pm
Location: Huntsville, AL

Postby loren_d_c » Wed Apr 23, 2008 9:55 am

The [-- LOOP PRODUCTS --] will NOT work if placed in any of the ShopSite backoffice edit fields (neither will any other custom template tag). This tag will only be evaluated if it is in the custom template itself.

A complete [-- LOOP PRODUCTS --] loop must be within the [-- DEFINE PAGE --] section of your custom page template. See the description and example in the online help at:

http://www.shopsite.com/templates/examples/page-06-products.html

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Thanks. Heres one more question

Postby jontaco » Wed Apr 23, 2008 10:22 am

Makes a little more sense now.

BUT if my

[-- LOOP PRODUCTS PAGE.Columns --]
[-- END_LOOP PRODUCTS --]

definition must be placed in a custom page template, does this necessitate making a separate page template for product pages and non-product pages (1 normal page template and 1 product page template, in other words?)

Thanks
jontaco
 
Posts: 39
Joined: Sun Apr 20, 2008 8:05 pm
Location: Huntsville, AL

Postby loren_d_c » Wed Apr 23, 2008 11:10 am

Not necessarily. If there are no products assigned to a specific page that is being generated by the template, the [-- LOOP PRODUCTS --] loop is just ignored. So you can use it for both, if your layouts for the two types of pages are similar.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere


Return to User Forum

Who is online

Users browsing this forum: No registered users and 9 guests