Page 1 of 1

Add Qty input box to subproducts

PostPosted: Wed Oct 10, 2018 12:42 pm
by shpste
Currently products that do not contain sub-products have Qty: with an input box next to it, followed by an Add to Cart button.

I'd like for products that contain multiple sub-products to show the Qty: with the input box next to each sub product.

I've dug through the forums here, but I'm having trouble finding a solution.

Running ShopSite® Pro 14.0 r2 using the theme/template page BB-ProductPageContent-WithMenus.sst

Any help would be appreciated. Thanks!

Re: Add Qty input box to subproducts

PostPosted: Thu Oct 25, 2018 9:41 am
by cyoung
You would need to edit the DEFINE SUBPRODUCT section in whichever template your subproducts are using. Typically the template the subproducts are using is the same template that all products are using, however with custom templates or specialty templates that are built into ShopSite a different subproduct template is specified. The BB-** themes have variables in their product templates to display the subproducts with either radio buttons, checkboxes or in a pull down menu. Most themes display the subproducts with radio buttons by default. If your subproducts are displayed with radio buttons currently, then you will want to edit the BB-Product.sst template (this is the default BB product template which has the default subproduct display). To edit this template go to Merchandising > Custom Templates > Page/Product > Copy ShopSite Template. Make a copy of the BB-Product.sst template, name it whatever you want. Save. Then make a copy of your copy and rename it the exact same name as the original. This will make it so that your copy overrides the original. Now you can edit the template.

In the template, on the 5th line of so, you will see the following code.

[-- ELSE --]<span class="bb-sub"><input type="[-- VAR.SubProductType --]" name="itemnum" value="[-- PRODUCT.RecordNumber --]"> .... then a whole bunch more code after this.


Add in the code in bold-blue below.

[-- ELSE --]<span class="bb-sub"><input type="[-- VAR.SubProductType --]" name="itemnum" value="[-- PRODUCT.RecordNumber --]"> Qty: <input type="text" value="1" name="[-- PRODUCT.RecordNumber --]:qnty">

Re: Add Qty input box to subproducts

PostPosted: Fri Oct 26, 2018 7:19 am
by shpste
Thanks for your help, that worked great!!

cyoung wrote:You would need to edit the DEFINE SUBPRODUCT section in whichever template your subproducts are using. Typically the template the subproducts are using is the same template that all products are using, however with custom templates or specialty templates that are built into ShopSite a different subproduct template is specified. The BB-** themes have variables in their product templates to display the subproducts with either radio buttons, checkboxes or in a pull down menu. Most themes display the subproducts with radio buttons by default. If your subproducts are displayed with radio buttons currently, then you will want to edit the BB-Product.sst template (this is the default BB product template which has the default subproduct display). To edit this template go to Merchandising > Custom Templates > Page/Product > Copy ShopSite Template. Make a copy of the BB-Product.sst template, name it whatever you want. Save. Then make a copy of your copy and rename it the exact same name as the original. This will make it so that your copy overrides the original. Now you can edit the template.

In the template, on the 5th line of so, you will see the following code.

[-- ELSE --]<span class="bb-sub"><input type="[-- VAR.SubProductType --]" name="itemnum" value="[-- PRODUCT.RecordNumber --]"> .... then a whole bunch more code after this.


Add in the code in bold-blue below.

[-- ELSE --]<span class="bb-sub"><input type="[-- VAR.SubProductType --]" name="itemnum" value="[-- PRODUCT.RecordNumber --]"> Qty: <input type="text" value="1" name="[-- PRODUCT.RecordNumber --]:qnty">