aftabn10 Posted August 18, 2011 Posted August 18, 2011 Hi, I was wondering if somebody can help, I have managed to install the following add-on http://addons.oscommerce.com/info/7914 but was wondering if it is possible to change to input field to a dropdown. I am aware that I need to change the 'tep_draw_input_field' to 'tep_draw_pull_down_menu' but this then shows a dropdown but with no values. Would i need to add anything into the application_top file? If somebody could please help or guide me as to how I can get this changed. Would really appreciate it. Thanks in advance.
aftabn10 Posted September 17, 2011 Author Posted September 17, 2011 ok i have managed to write the following code in the product info page: <?php $quantity_array = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11");?> <?php echo tep_draw_pull_down_menu('cart_quantity', $quantity_array);?> but when viewing this in a browser the dropdown box shows up but the values 10 and 11 show up as 1. Any ideas on where i have gone wrong. Would really appreciate it if somebody could help.
♥kymation Posted September 18, 2011 Posted September 18, 2011 Your array is lacking the value arrays inside. Try this: $quantity_array = array( array( 'id' => '1', 'text' => '1'), array( 'id' => '2', 'text' => '2'), array( 'id' => '3', 'text' => '3'), array( 'id' => '4', 'text' => '4'), array( 'id' => '5', 'text' => '5'), array( 'id' => '6', 'text' => '6'), array( 'id' => '7', 'text' => '7'), array( 'id' => '8', 'text' => '8'), array( 'id' => '9', 'text' => '9'), array( 'id' => '10', 'text' => '10'), array( 'id' => '11', 'text' => '11') ); Regards Jim See my profile for a list of my addons and ways to get support.
aftabn10 Posted September 18, 2011 Author Posted September 18, 2011 Thanks Jim, that works brilliantly! really appreciate all your help.
peteravu Posted September 19, 2011 Posted September 19, 2011 Is it possible instead of at dropdown to make so there will be one quantity box for each attributes? In my case: Product xxxxx one quantity box for red (attribute1) one box for orange (attribute2) one box for yellow (attribute 3) and so on. Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
aftabn10 Posted September 20, 2011 Author Posted September 20, 2011 peteravu, apologies not sure how to do that, will have a play around and see if i can help
peteravu Posted September 21, 2011 Posted September 21, 2011 peteravu, apologies not sure how to do that, will have a play around and see if i can help Thanks Aftab, I really appreciate if you can help Thanks to all that contributed to separate_price_per_customers_4.2.2_for_2.3.1, Add Multiple Products with plus/minus buttons, One Page Checkout for 2.3.1, Multi Attribute V2, Login Box Club osCommerce Shipping Date Chooser for 2.3.1, Quickly Update Product Stock 3.8.5 Español and order number in email subject Forum, Thanks Designing New Themes the Easy Way, how-to-set-backgrounds. my contributions Add Multiple Product In Product Listing 2.3.1 v.1.0 and Multiple Attribute entry boxes in product info page v1.0 for 2.3.1
OSC-Sevilla Posted October 3, 2011 Posted October 3, 2011 NO products adding to cart with "0" quantity - error with the Aplications_top.php code: open: catalog/includes/application_top.php find: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); replace with: <!--- BOF: Quantity Input Field mod --> $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']); <!--- END: Quantity Input Field mod --> THE ORIGIONAL CODE WORKS FINE - CAN SOMEONE TEST THIS SO I KNOW IM NOT THE ONLY ONE. NEED TO SOLVE THIS ISSUE! MANY THANKS
Guest Posted October 3, 2011 Posted October 3, 2011 I had originally removed the quantity box that came with osc v2.3.1 because it was listing the total amount in the product stock. If there were 20 products in stock, it would list 1-20 as the customer could select to order. I added this add-on, and it only adds 1 product to the cart. I then changed 'cart_quantity' to 'product_quantity' just to see if it changed, but nothing happened. I included Gemma's thing as well, but still only one product gets added.
Guest Posted October 3, 2011 Posted October 3, 2011 Huh, my original post must have gotten deleted or something... anyway... In my original osc 2.3.1 I commented-out the drop-down for the product quantity because it kept suggesting however many I had in stock. If I had 200 in stock for something, it would display 1-200 in the drop-down. I put this one in, and it displays nicely, but it only adds one product to the cart. I also tried Gemma's suggestion, but nothing changed that I could tell. I'm wondering how to get this to add the appropriate number to the cart. Thanks... -------------------- Okay, now the original post appeared above this, so sorry for the double-post...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.