Jump to content

How to change the Quantity default


Recommended Posts

Guest charleycrowe
Posted

I have my store setup and when you go to view a product at the bottom of the page Quantity is set to 1 by default (next to 'Add to Basket'). How do I change the default on this? I looked in view_product.php but I couldn't tell if this is where to change it. Can someone tell me how to change this and also where the lines of code are that need to be changed?

Thank you in advance.

Chell

Posted

I assume you are using v3.x

this value is in the viewProd.tpl

find a line that looks like this

<input name="quan" type="text" value="1" size="2" class="textbox" style="text-align:center;" />
 and change 
value="1"
 to 
value="2"

that's it.

good luck

Posted

Hey goober you beat me to it :innocent: I was just writing the same thing, checked it and saw you posted already lol

Anyway...

this post is in CC 3 ;however, the view_product.php is from version 2.... therefore I will also give you the code for cc2 which is pretty much the same:

Around line 221 in view_product.php you will find this:

    <td height=\"30\" align=\"right\" valign=\"middle\" background=\"images/grey_bev.gif\">$la_order_quan: <INPUT TYPE=\"text\" class=\"textbox\" size=\"3\" value=\"1\" name=\"quan\"></td>

Change the value marked in red....

Guest charleycrowe
Posted

I'm using Cubecart Version 3.02 and I found viewProduct.inc.php but this doesn't look like where I need to make the change. There is no code like what either of you suggested. Is there another ViewProduct where the changes need to be made? If so, where?

Posted

I'm using Cubecart Version 3.02 and I found viewProduct.inc.php but this doesn't look like where I need to make the change.  There is no code like what either of you suggested.  Is there another ViewProduct where the changes need to be made?  If so, where?

in your root directory you can find viewProd.tpl here:

skins\Classic\styleTemplates\content

and the code is at line 64....

Guest charleycrowe
Posted

Oh Thank You, Thank You, Thank You! :innocent::D:D:D

Well that's one minor detail out of the way.

  • 3 weeks later...
Guest bigsnow
Posted

Hi Guys

i am trying to figure out how to change the quantity default i would like to be able to set the qty to whatever i need it to be

i searched the boards first and read this post but i cannot find half the stuff you guys are talkign bout like i dont have any tpl files in my directory

i did go to view_product.php and change the value to 2 like this post said it didnt work and im just lost

please help

ok i figured out that all that did was make it add 2 to cart

basically what i need is to be able to enter product qty & not allow check out when item is out of stock is this possible with this cart ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...