Text in QTY input box

General ShopSite user discussion

Text in QTY input box

Postby LaurenH » Tue Jul 02, 2013 8:09 am

I have some of my products set up to use a QTY input box. The default for them shows the text of "<!-- Empty field [MinimumQuantity] -->" when you pull up the page, which you then have to highlight and delete before entering your desired QTY. How do i get rid of that?
LaurenH
 
Posts: 23
Joined: Thu May 02, 2013 12:35 pm

Re: Text in QTY input box

Postby Jim » Tue Jul 02, 2013 12:18 pm

What version and product level of ShopSite do you have? I think only the Pro level of ShopSite has the minimum order quantity so if you have a Manager level store it would not have the data used by the [MinimumQuantity] tag so that would cause the comment message that you are seeing. It that is the case you would probably need to edit the template and remove the template tag that calls for the minimum quantity and replace it with a 1 or what ever quantity you want the default value to be.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Text in QTY input box

Postby LaurenH » Mon Jul 08, 2013 8:42 am

I have ShopSite® Manager 11 sp1 r2.
LaurenH
 
Posts: 23
Joined: Thu May 02, 2013 12:35 pm

Re: Text in QTY input box

Postby LaurenH » Mon Jul 08, 2013 8:43 am

Would I need to edit the product templates or the page templates?
LaurenH
 
Posts: 23
Joined: Thu May 02, 2013 12:35 pm

Re: Text in QTY input box

Postby Jim » Mon Jul 08, 2013 10:18 am

It would be either the Product template or an include file that is used by the Product template. What theme do you have selected for your store? What is the Page template assigned for the page the product is on and product template that is assigned to the product? (Note that some Page templates override the Product template so you really need to know both to be able to find the file you need to edit.

See http://www.shopsite.com/templates/cookbook/builtintemplates.shtml This page contains information about what files each theme uses so that might give you information to know which file needs to be edited.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Text in QTY input box

Postby LaurenH » Tue Jul 09, 2013 5:38 am

I am using the Line sections theme, the pages template is multi-use page, and the product templates are multi-use-product.sst
I tried editing the product template but it didnt work.
LaurenH
 
Posts: 23
Joined: Thu May 02, 2013 12:35 pm

Re: Text in QTY input box

Postby Jim » Tue Jul 09, 2013 8:59 am

Please post the section(s) of the template that you changed. Also you
must make sure that the file name of the file you changed is exactly the
same as the file name that ShopSite is using. You can't copy a ShopSite
template from the backoffice and give it the same name as the original
but once you have a copy in the merchant template area you can then make
another copy and give it the same name as ShopSite had.

Here is the code from the Multi-Use-Product.sst
Code: Select all
  [-- 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>
  [-- END_IF --]

I would change it to be
Code: Select all
 [-- IF product.DisplayOrderQuantity? --]
    <span class="pr_qty">[-- STORE.Quantity --]: <input type=text size=2
name="[-- PRODUCT.RECORDNUMBER --]:qnty" value="1"></span>
  [-- END_IF --]


Or if you always want the quantity field to display avoid the IF statements and just use
Code: Select all
<span class="pr_qty">[-- STORE.Quantity --]: <input type=text size=2
name="[-- PRODUCT.RECORDNUMBER --]:qnty" value="1"></span>



Note that you must also make similar changes to the form which displays on the field on the moreinfo page.
I think the template that has that information is an include file Multi-Use-More-Info-Content.sst

One helpful feature when trying to find out what file is used to display certain content is found under Utilities > Publish. Check the box "Insert an html comment before each include file " and then an html comment line listing the file being used will be output in the html of generated pages. It will look something like the following with a start and end statement to let you know what is in each include file.
Code: Select all
<!-- ***** Start of Include: [sc] Multi-Use-Page-Vars.sst -->
  html code is here
<!-- ***** End of Include:  Multi-Use-Page-Vars.sst -->
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Text in QTY input box

Postby LaurenH » Wed Jul 10, 2013 6:48 am

I changed this:
[-- 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>
[-- END_IF --]

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

and it took all the QTY Input boxes off my products, and also deleted the Add To Cart Buttons. I also tried just changing this portion of the original code:
[-- IF PRODUCT.MinimumQuantity "0" --] to [-- IF PRODUCT.MinimumQuantity "1" --] and that just didn't do anything.
LaurenH
 
Posts: 23
Joined: Thu May 02, 2013 12:35 pm

Re: Text in QTY input box

Postby Jim » Wed Jul 10, 2013 9:42 am

See the PM I sent you.
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 52 guests

cron