Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

is there a way to disable the quantity


billybrag

Recommended Posts

Posted

all the items i sell are unique, is there a way to remove the option of having more than one in the cart?

 

cheers all

"because it'll hurt more"- the greatest film of all time?

Posted

i have searched through tthe whole of the admin and cant find any simple options so im guessing it must be coding?! anyone know where it is?

"because it'll hurt more"- the greatest film of all time?

Posted

there must be a way of disabling this, or locking the box?

"because it'll hurt more"- the greatest film of all time?

Posted
all the items i sell are unique, is there a way to remove the option of having more than one in the cart?

 

cheers all

When you add your product to your shop give it a quantity of one and then in your admin do not allow ordering of unstocked products.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Posted

yeah, but the user can still fiddle with the quantity box, which has no meaning, but to display the out of stock warning, if i cant get rid of it, can i just "lock" it?

"because it'll hurt more"- the greatest film of all time?

Posted

In admin under configuration-stock set Allow Checkout to False

Posted

that will stop them from buying extra yes, but it wont stop them trying! does anyone know where abouts the box is created and i can try to lock it.

 

cheers

"because it'll hurt more"- the greatest film of all time?

Posted

the box is created in shopping_cart.php.....

 

in my setup it is around line 172, look for this:

 

$info_box_contents[$cur_row][] = array('align' => 'center',
                                            'params' => 'class="productListing-data" valign="top"',
                                            'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

it is the 'text' => tep_draw_input_field above

 

I do not know how to "lock" it - in fact it is what I am looking for now

 

It would be nice to just have the quantity displayed, not as an input field

 

you can hide it by changing tep_draw_input_field

 

to

 

tep_draw_hidden_field

 

but that's not going to work for me either

 

If you figure it out, please post your findings so I can use it also

 

Thanks

Posted

OK I found it......

 

in shopping_cart.php change this:

 

around line 172 in my setup

 

$info_box_contents[$cur_row][] = array('align' => 'center',
                                            'params' => 'class="productListing-data" valign="top"',
                                            'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

to this:

 

$info_box_contents[$cur_row][] = array('align' => 'center',
                                            'params' => 'class="productListing-data" valign="top"',
                                            'text' => $products[$i]['quantity'] . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

Now the cart should simply display the quantity ordered without giving the customer the option to change the quantity in the cart.

 

I tested going thru the ordering process and it works for my setup.

Posted

not much you can do with people trying to buy more than what you have, it only shows as an error on their end

  • 2 weeks later...
Posted

if you hide the box of quantity selection, even so your customers will be able to add items to the cart. it just is enough they click several times in the add cart.

To if it have always the same quantity for all the products, you should edit shopping_cart.php, in includes/classes/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...