Assigning products to headings in pages

Questions and answers about ShopSite Custom Templates

Assigning products to headings in pages

Postby FredW » Tue Aug 28, 2012 2:53 pm

I have been looking into how to create ShopSite generated pages that can list our products like we do in our existing web site pages. I would like to assign products fall under certain headings on a page. An example can be found on this existing page:http://keithspecialty.com/hvac.parts.Trane_and_American_Standard.htm.

Is there any way using custom templates that this can be accomplished?

Thanks in advance.
FredW
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby Jim » Tue Aug 28, 2012 4:24 pm

This would definitely require custom templates but it could be done.

I'll describe what how I think the site is laid out. Let me know if I am correct or not and then I'll give more details on what would be required.

1. It looks like there is a main page that list main categories ( HVAC, Water pumps, plumbing Supplies, Plumbing Fixtures etc)
2. by each category a list of sub categories in the main category (New equipment, replacement parts, components etc)
3. following that a list of "brands" (American Standard, Armstrong, Burnham etc)
4. each of those "brands" link to a page that has the abbreviated headers (ADP, BKR, BLW, BNR, BRD,etc )
5. the rest of the page content is an alphabetic listing of the products broken up based on the abbreviated header at the top of the page (ADP... adapters, BKR... circuit breakers, BLW... blowers, etc )
6. under each abbreviated header a list of products that fall in that section with the description, price, quantity and item#

So do you want to do all of the steps above, 1,2,3,4,5,6 or just sections 4, 5, 6?

My initial thoughts are That steps 1,2,3,4 would be done by page templates and 5 with products and 6 with subproducts.

There are multiple add to cart buttons on the page with individual input boxes for each product. Would you want the shopper to be able to enter a quantity in multiple products and then press a single add to cart button and have them all added or do you want the shopper to add each item independently?
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby FredW » Wed Aug 29, 2012 9:06 am

Hello Jim,

Thanks for the speedy reply. Your analysis is correct and your questions are thought provoking.

After giving it some thought, I would like to do all the steps, even though in steps 1 through 4 we may change the way the pages are presenting information (insert graphics, more content, etc.). The existing ShopSite templates, I thought, allowed this, even though I have not found one I really like. We want a search box that is larger and on ever page that is easily visible, preferably in the top of the screen. With over 9000 products listed, a search box is a key success factor for our customers to find what they need. I was thinking a custom template would be required for us to deal with the search box as well as accomplishing steps 5 and 6.

Regarding the question of how the shopper adds items to the cart, I think we should continue to have the shopper add each item independently, allowing them to specify a quantity then press the ADD-CART button. However, I did some prototype work with sub-products and saw that, with the template I was using, the shopper could not specify the quantity until they go to the shopping cart. That may be acceptable, but wondered if another template or method would allow the shopper to specify quantity for sub-products.

I'm just starting to educate myself on custom templates and will admit I just scratched the surface. I'm not sure I follow you when you say: "That steps 1,2,3,4 would be done by page templates and 5 with products and 6 with subproducts." Can you point me to a few resources for me to learn about this?

Also, not to confuse the primary question on this post, but I am also trying to figure out how to develop new pages, templates and pages without impacting our existing production pages. For now, we have the buyanywhere implemented in our classic pages, but us the shopsite cart and checkout pages. If I want to try a new template for new shopsite pages, I don't know how to do that without impacting our existing cart and checkout pages. What is the normal way your existing customers do development using new templates without impacting the existing production pages?

Thanks again for your assistance.
FredW

Thanks
Fred
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby Jim » Wed Aug 29, 2012 12:22 pm

The best way to try templates without affecting your existing site would be to get a demo store, upload your products to that store and then create the templates there. Once you have the templates the way you want them you could copy them to your live store and assign the pages/products the appropriate template and publish to make the changes on the live site. You can get a demo store at http://ademostore.com/cgi-bin/ssdemos/start.cgi?demo=store&storename=evaluate The demos are open for a week but if you need more time you can extend it once or send an email and have it extended longer than that.

I agree that search is important and that isn't hard to implement in a custom template and it can be place any where on the page you would like it.

As far as templates go, if you have the design already laid out, it is generally easier to built the template from that than to try and change one of the ShopSite provided templates to match your look. If you haven't gone through the introducton to Custom Templates at http://www.shopsite.com/templates/tutorial/design_introduction.html that might be a good starting place. There are also several youtube videos on creating custom templates. If you go www.shopsite.com and search for youtube it will bring up a list of video links where you can look for ones on templates.

The page templates would be used for the categorie pages and the one with the abbreviated links across the top would probably be a different page template. To get the abbreviated links at the top you would do a [-- loop products --] and have it call a special product template that just outputs the abbreviations and makes them links to the appropriate product below on the page. Then you would do another [-- loop products --] and call a different product template that outputs the more detailed sections for each product including the name the table header of description, price, quantity etc. Then the individual items below that using a [-- loop subproducts --] section. (Note, instead of having two separate product templates it could be done with a single product template and variables set to execute a section of the template that outputs the abbreviated links and another to output the product details)

For 5, the product template would be used to create each section on the page for a specific manufacture. In your sample page it would be the part that lists the 0... aluminum tube repair kits, ADP... adapters, BKR... circuit breakers, etc. so each of those would be a product and the items listed under them would be subproducts.

Yes it would be possible with subproducts to have a quantity box on the store page so they could add multiple of the same item to the cart at once. In the [-- Define Subproduct --] section of the product template you would just put the form for the add to cart and include the quantity input field in the form.

I'm sure the above is clear as mud so if you have questions just post them.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby FredW » Wed Sep 05, 2012 6:45 am

Hello Jim,

Thanks for the assistance. I got a demo site, uploaded a number of products and have started building prototype pages. I'm initially trying to focus on just getting the products listed under headers within the pages. Can this be accomplished without using custom templates and using subproducts?

This is our number 5 your wrote about:
For 5, the product template would be used to create each section on the page for a specific manufacture. In your sample page it would be the part that lists the 0... aluminum tube repair kits, ADP... adapters, BKR... circuit breakers, etc. so each of those would be a product and the items listed under them would be subproducts.


I created two versions using subproducts, but either I'm missing something basic about subproducts or don't understand how to implement what you wrote about above. You can see my two versions at the following links: http://ademostore.com/ssdemos/ver112/evaluate6/trane-v1.htm and http://ademostore.com/ssdemos/ver112/evaluate6/trane-v2.htm

Am I way off track?

Thanks
Fred
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby Jim » Wed Sep 05, 2012 8:50 am

Can this be accomplished without using custom templates and using subproducts?
No this cannot be done without custom templates since there is no ShopSite provided templates with the functionality you are asking for. As for doing it without subproducts that may be possible but would take a lot more work.

For the product template you would need to do something like this. (Edited to fix several previous issues 9-5-12 Jim)
Code: Select all

[-- DEFINE SUBPRODUCT --]
   <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 --]">
      [-- PRODUCT.NAME --]&nbsp;[-- PRODUCT.SKU --]&nbsp;[--PRODUCT.PRICE--]&nbsp;
      Quantity <input type="text" size="2" name="[-- PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
      <input class="add" type="image" [--ADDIMAGE--]>
   </form><br>
[-- END_DEFINE SUBPRODUCT --]

[-- DEFINE PRODUCT --]
    [-- PRODUCT.name --]<br>[-- PRODUCT.productdescription --]<p>
    [-- LOOP SUBPRODUCTS --]
        [-- SUBPRODUCTS --]
    [-- END_LOOP SUBPRODUCTS --]<p>
[-- END_DEFINE PRODUCT --]

That should put the main product name on one line, the description on the next line, a blank space and each of the subproducts on a separate line under the main product. It could all be done with table elements (or divs) to make things line up but I just put the basics here as an example.

So try try creating a product template with the above content in it and assign it to a product and assign several subproducts to that product. Make sure the main product is assigned to a page and then publish to see how it looks.

PS. I logged into your demo store to look at what you had configured. You were probably logged in so I accidentally bumped you out when I logged in. Sorry. When you logged back in I was logged out. If you create a new user "jim" under Utilities > User Accounts and give it the same password you use and set it to haveAdmin permissions,I will be able to login using that account without bumping you out.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby FredW » Wed Sep 05, 2012 1:04 pm

Hello again Jim,

I tried your customer product template - I may not have it correct, and need to read about where this code goes vrs the htm tags. I tried two variants of it and neither work. See pages:
http://ademostore.com/ssdemos/ver112/evaluate6/trane-v4.htm
and
http://ademostore.com/ssdemos/ver112/evaluate6/trane-v5.htm

You have your own login "Jim" with the same password as I have.

Also, the timeout on this demo account is driving me crazy. Can you remind me where I can increase it?
Thanks
Fred
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby Jim » Wed Sep 05, 2012 1:13 pm

To change the timeout for when you are automatically logged out go to Utilities > User Accounts > Configure and change the Inactive time before being logged out:.

I'll login and see what you have done.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby Jim » Wed Sep 05, 2012 2:04 pm

It looks like there were a couple of issues.
1. I had a couple of the template tags incorrect.
2. When you copied and pasted the sample I posted to the template in the store all of the html tags were converted to their escaped values so <b> became &lt;b&gt; this makes it so the code displays on the store page directly instead of being interpreted by the browser.

I fixed the template tags and replace the code with a text version instead of all the encrypted html values. So here is how the code looks now.
Code: Select all
[-- DEFINE SUBPRODUCT --]
   <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 --]">
      [-- PRODUCT.NAME --]&nbsp;[-- PRODUCT.SKU --]&nbsp;[--PRODUCT.PRICE--]&nbsp;
      Quantity <input type="text" size="2" name="[-- PRODUCT.RecordNumber --]:qnty" value="1" >&nbsp;&nbsp;
      <input class="add" type="image" [--ADDIMAGE--]>
   </form><br>
[-- END_DEFINE SUBPRODUCT --]

[-- DEFINE PRODUCT --]
    [-- PRODUCT.name --]<br>[-- PRODUCT.productdescription --]<p>
    [-- LOOP SUBPRODUCTS --]
        [-- SUBPRODUCTS --]
    [-- END_LOOP SUBPRODUCTS --]<p>
[-- END_DEFINE PRODUCT --]

I then published and now when you go to http://ademostore.com/ssdemos/ver112/evaluate6/trane-v4.htm
you will see all of the subproducts listed individually under the main product. There is still work that can be done to the look but at least you can now see something like you want.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby FredW » Wed Sep 05, 2012 2:29 pm

Jim

That helps a lot.
However, It took me only five minutes to break it and I was not even trying.
I was just assigning your template to more products that had subproducts and assigned them to the same page and when I publish the page, I get this error:
Generating Page [32:HVAC-parts-Trane-v4]...
Adding Product [ADP... adapters]...
jim [24]: Template Error: LOOP has illegal options SUBPRODUCT
jim [25]: Template Error: Tag not within a LOOP tag
jim [26]: Template Error: END_LOOP tag does not have a matching LOOP tag
Adding Product [BKR... circuit breakers]...
jim [24]: Template Error: LOOP has illegal options SUBPRODUCT
jim [25]: Template Error: Tag not within a LOOP tag
jim [26]: Template Error: END_LOOP tag does not have a matching LOOP tag
Adding Product [BLW ... Blowers v2]...
jim [24]: Template Error: LOOP has illegal options SUBPRODUCT
jim [25]: Template Error: Tag not within a LOOP tag
jim [26]: Template Error: END_LOOP tag does not have a matching LOOP tag

I looked at your template, but didn't change anything, so I will admit I'm more confused than before
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby Jim » Wed Sep 05, 2012 2:51 pm

I had modified your template to fix it after making a backup of it. The jim one still had the original problems in it. I fixed the jim template so it has the correct code and published with out any errors. So the pages should look better now.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby FredW » Wed Sep 05, 2012 7:17 pm

Thanks Jim,
I can work with this.
You have been a great help.\

FredW
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby FredW » Sat Sep 08, 2012 10:38 am

Jim,

I want to thank your for your help. Due to your help, I was able to overcome some big hurdles in getting our legacy website into ShopSite generated pages. I have a lot more work to do, but you have given me information that allowed me to accomplish some major achievements.

I have already been uploading products from our internal database for the last two months. It is great feature and now I can also use it to generate new products that I can use assign subproducts to. Also, I have never tried uploading pages. Within just less 30 minutes of prep work with very simple tools on my PC, I was able to upload and create over 200 pages in the demo site, and I can use this technique to upload most all of our pages from our legacy html code to ShopSite pages. That's great!

Also, with your helping me get started on custom product and custom page templates, I can now move forward to customize our site to fit our needs. I'm sure I'll have more questions, but for now, I just want to thank you. Tonight, I will sleep much better!

FredW
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Re: Assigning products to headings in pages

Postby Jim » Sat Sep 08, 2012 11:13 am

Glad to help.
Jim
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Assigning products to headings in pages

Postby FredW » Sat Sep 08, 2012 11:51 am

And you work on Saturday too?

Easy question: Why are the three columns in my prototype page not equal? (http://ademostore.com/ssdemos/ver112/evaluate6/hvac.oil_burner.nozzles.htm)

I just change the number of columns from 1 to three. If I have four columns they are also not equal. Must be some setting that is causing this, huh?

Fred
FredW
 
Posts: 188
Joined: Mon Apr 02, 2012 2:07 pm

Next

Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 45 guests

cron