Subproducts and quantity

General ShopSite user discussion

Subproducts and quantity

Postby FredW » Mon Mar 18, 2013 8:31 am

Hello Folks,

I have searched the help text and forum for my answer and can't find it.

Is there a way to display the order quantity box for sub-products? I have not been able to find out how. Have set the option on to display the quantity for both the main product and all the associate sub-products, and the quantity box still does not display.

I am using the multi-Use-Products.sst for the product template for both main and sub-products.

The page is http://keithdemo.keithspecialty.com/plum.cpvc_and_fittings.htm

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

Re: Subproducts and quantity

Postby Jim » Mon Mar 18, 2013 9:25 am

Are the subproducts the items in the dropdown list, i.e main product is CPVC - Pipe and subproduct are 1/2" cpvc, 3/4" cpvc, 1" cpvc ? If that is the case then no it is not possible to have the quantity box by each subproduct since you can't put the quantity box in the pulldown.

If you had the products displayed as separate line items it would be possible to have a quantity box with each option. This would involve either modifying the code for the subproduct in the template. I don't know if there is a template that has the subproducts displayed as line items with checkboxes but it would be possible to create one.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Subproducts and quantity

Postby ShopSite Nicole » Mon Mar 18, 2013 9:59 am

The steps below are outlined in the Custom Template Cookbook (I used these steps on the Solid Block Theme, but the instructions can be used for any theme which is based on the Multi-Use templates). Editing your current theme to use checkboxes instead of a pull-down menu can be done in this way (provided you are using all of the templates associated with your chosen ShopSite theme):

First, go to Merchandising > Custom Templates > Includes > Copy ShopSite Include, and make a copy of the Multi-Use-Theme-Select.sst include file. You will need to give it a new name (i.e. Multi-Use-Theme-Select2.sst).

Second, In this include, you will find [-- VAR.SubproductDisplay "select" --]. This VAR tag determines how the subproducts are displayed for the products in your store. "Select" means that they are displayed in a pull down menu. You can change the text "select" to "radio" to have the subproducts be radio buttons, "checkbox" to have the subproducts displayed with checkboxes to add multiple subproducts to the cart at once, or "table" which will display the subproducts in a table format, each with its own add to cart button.

Third, make a copy of YOUR copy and name it the exact same name as the original once you are ready to use it in your store (using the example above, you would remove the 2) You can then remove your copy (the copy which does not have the exact same name as the original).

Once you have done that, you may need to edit the product template so that a quantity input box is displayed for each subproduct. I was able to do this in my demo store by inserting the following into the "checkbox" code for the subproduct portion of the product template:

[-- IF product.DisplayOrderQuantity? --]
<span class="pr_qty">[-- STORE.Quantity --]: <input type=text size=2 name="[-- PRODUCT.RECORDNUMBER --]:qnty" value="[-- IF PRODUCT.MinimumQuantity "0" --]1[-- ELSE_IF PRODUCT.MinimumQuantity "" --]1[-- ELSE --][-- PRODUCT.MinimumQuantity --][-- END_IF --]"></span>

You may need to work with the code further to make certain it displays how you want.

NOTE: when you edit templates, always make sure to do a complete regeneration of your store once you are ready for the templates to be used (Utilities > Publish > Renegerate).
ShopSite Nicole
 
Posts: 184
Joined: Thu Jan 14, 2010 10:30 am
Location: Utah

Re: Subproducts and quantity

Postby ShopSite Nicole » Mon Mar 18, 2013 10:05 am

http://www.shopsite.com/templates/cookbook/builtintemplates-solidblock.shtml

Theme Tips and Tricks section
ShopSite Nicole
 
Posts: 184
Joined: Thu Jan 14, 2010 10:30 am
Location: Utah

Re: Subproducts and quantity

Postby FredW » Mon Mar 18, 2013 12:06 pm

Thanks Nichol and Jim.

I will look into your suggestions.

I'm not sure which is the greater challenge: building our website without using any customization of templates, or master the art of template customization.

I'm a believer that customization will be needed someday, I just didn't want to do it to get the site initially built with using ShopSite.

As always, your input is appreciated.

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

Re: Subproducts and quantity

Postby SmokinVapor » Sat May 18, 2013 10:15 am

I was trying to set up individual products to work with checkbox while the others on that page would have text/drop down menu.. I pasted the [VAR.subproducts..] code into the page template and added the other coding to the product template thinking it would recognize the line and apply so I could select the template just for those products that need the checkbox and quantity buttons. It doesn't seem to work and defaults back to "text" dropdown menu. Is there a code I can use to add to the theme I am using to make an option for the product or another way to accomplish this?
Thanks,
Chase
SmokinVapor
 
Posts: 1
Joined: Fri May 17, 2013 1:33 pm

Re: Subproducts and quantity

Postby Jim » Sat May 18, 2013 12:35 pm

It is possible that the page template that you are using is forcing a particular Product template to be used for all products on the page. In the page template there will be a section something like this.
[-- LOOP Products --]
[-- PRODUCT template-name --]
[-- END_LOOP Products --]

If you find something like that in your template where there is a template-name specified you can change the template so it will use the template that is assigned to the individual products by removing the template-name. It would then look like

[-- LOOP Products --]
[-- PRODUCT --]
[-- END_LOOP Products --]

If you are using a ShopSite template you will need to make a copy of it under Merchandising > Custom Templates > Pages and then edit that template to make the change and then make another copy of it and give it the same template name that it had previously. (You can't copy a template to the same name directly when you make the first copy)
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 40 guests