Jump to content


Corporate Sponsors


Latest News: (loading..)

How to remove the quantity input box displayed in My Cart

remove quantity input box my cart quantity box

  • You cannot reply to this topic
4 replies to this topic

#1 KatelynHuynh

  • Community Member
  • 5 posts
  • Real Name:Katelyn Huynh

Posted 19 January 2012, 21:41

Hi I'm new to oscommerce and recently downloaded the latest one. I sell one of a kind used clothing but I don't need the quantity input box that is seen in the "What's in my cart". How do I get rid of it?

#2 KatelynHuynh

  • Community Member
  • 5 posts
  • Real Name:Katelyn Huynh

Posted 19 January 2012, 22:09

Nevermind! Figured it out!

In shopping_cart.php at around line 97 this is what I commented out:

$products_name .= '<br /><br />' . /* tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . */ '&nbsp;&nbsp;&nbsp; <a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product') . '">Remove</a>';


I also got rid of the word "or"

Edited by KatelynHuynh, 19 January 2012, 22:24.


#3 KatelynHuynh

  • Community Member
  • 5 posts
  • Real Name:Katelyn Huynh

Posted 25 January 2012, 07:21

Oh no! For some reason the modified code causes the checkout and account pages to go blank!

Edited by KatelynHuynh, 25 January 2012, 07:23.


#4 multimixer

  • Community Sponsor
  • 3,596 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 25 January 2012, 07:49

View PostKatelynHuynh, on 25 January 2012, 07:21, said:

Oh no! For some reason the modified code causes the checkout and account pages to go blank!

Of course this don't work, the "some reason" you are wondering about is, that you removed (commented) also the products id, so the form isn't submitting that, the checkout does not "know" what product you are talking about

I would do it in following way

Replace this
 tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"')
by this
tep_draw_hidden_field('cart_quantity[]', $products[$i]['quantity'])

and uncomment the rest of the code

What you can do is to comment (remove) the update button only,
tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh')

Looking for a way to create your own osCommerce template ? click

#5 femalegreenuser

  • Community Member
  • 20 posts
  • Real Name:Tina
  • Gender:Female
  • Location:Suffolk, UK

Posted 02 February 2012, 15:40

Thanks sooooooo much "multimixer". You've also helped this lurker.