mattias2 Posted November 7, 2003 Share Posted November 7, 2003 I would appreciate if anyone can tell me where I can find the contribution that is used in this shop. http://www.piensatelier.nl/catalog/index.p...f712f5c27e6f67a The feature that I am looking for is to be able to adjust the qty direct from products page without having to go to shopping cart everytime. The above shop has a perfect example of what I'm looking for. Thanks Quote Link to comment Share on other sites More sharing options...
jpf Posted November 7, 2003 Share Posted November 7, 2003 Try: order-drop-down-button-in-shoppingcart: http://www.oscommerce.com/community/contributions,1517 Here you have a drop down button to change the number of products ordered. And the number is changed instantaniously for your billing. So it cannot happen any more, that a customer forgets to press the "update" button and gets the wrong number of articles. Quote Link to comment Share on other sites More sharing options...
chfields Posted November 7, 2003 Share Posted November 7, 2003 I have that installed, but what he is asking about is actually on the main page next to each product, very cool. I just e-mailed the shop owner to find out how he did that. If I get an answer I will post it. Quote Link to comment Share on other sites More sharing options...
chfields Posted November 7, 2003 Share Posted November 7, 2003 I heard back from him and here is the code Please remember to back up before you try!!!!!! In catalog/includes/modules/product_listing.php files about line 147 locate the following lines; Code: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</a> '; break; ......and change to..... Code: case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = tep_draw_form('cart_quantity', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_product')) . '<input type="text" name="quantity" value="1" maxlength="2" size="2"> ' . tep_draw_hidden_field('products_id', $listing['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW) . '</form>'; break; This should give you a quantity box next to your buy now button in product listing pages (ps. make sure you've activated Buy Now button in product listings in the admin panel) Now when u change the quantity value for and click buy now that quantity of the product will be added to your cart! Quote Link to comment Share on other sites More sharing options...
chfields Posted November 7, 2003 Share Posted November 7, 2003 (edited) I installed order-drop-down-button-in-shoppingcart and now whenever I update or change the quantity it goes to the advanced search page.....any ideas??? You can see it at my test site My test site Edited November 7, 2003 by chfields Quote Link to comment Share on other sites More sharing options...
Angie201 Posted November 12, 2003 Share Posted November 12, 2003 Hello, I added the bit of code as above and it works fine, except I can only add 1 item at at time. As the code is for a bead site and you have to be able to purchase 20 beads by typing in 20 in the box... it makes things hard. Can anyone offer any suggestions on how to fix it up? Thanks Angie Quote Link to comment Share on other sites More sharing options...
raijen Posted November 13, 2003 Share Posted November 13, 2003 Angie, I'm having the same problem. Looks the same as the Piensatelier site, it's just not working like theirs is. Rachel Quote Link to comment Share on other sites More sharing options...
Angie201 Posted November 13, 2003 Share Posted November 13, 2003 HI Rachel, I just tried their site and was able to put 5 items in the cart with one click of the buy buttons... so maybe we are doing something wrong with the code.... Can any one offer help or suggestions... I took the code from the post above.. Angie Quote Link to comment Share on other sites More sharing options...
Salvo Posted November 13, 2003 Share Posted November 13, 2003 I was looking for a code like this, and found it. Just intalled and works very well Thank you Quote Link to comment Share on other sites More sharing options...
chfields Posted November 13, 2003 Share Posted November 13, 2003 I installed this and am having the same problem, it will only update 1 at a time. I tried checking the source code from their site, but it looks the same....I may have to pull it out and just use the order-drop-down-button-in-shoppingcart: Quote Link to comment Share on other sites More sharing options...
raijen Posted November 14, 2003 Share Posted November 14, 2003 Slavo, how did you get this code to work? Rachel Quote Link to comment Share on other sites More sharing options...
mattias2 Posted November 15, 2003 Author Share Posted November 15, 2003 (edited) Angie, I think this will help you. Maybe step 1 is not necessary? 1. copy this code near your in_cart button in product_info.php, actually you can add this code anywhere. --------------------------------------------- <input type="text" name="quantity" value="1" maxlength="2" size="2"> -------------------------------------------- 2. search your application_top.php find this code: --------------------------------------------- $HTTP_POST_VARS['id']))+1 -------------------------------------------- replace with this one ------------------------------------------ $HTTP_POST_VARS['id']))+$quantity ------------------------------------------ From this contribution http://www.oscommerce.com/community/contributions,1253 Edited November 15, 2003 by mattias2 Quote Link to comment Share on other sites More sharing options...
raijen Posted November 15, 2003 Share Posted November 15, 2003 Mattias, thanks so much for posting this contribution. With this, Piensatelier's code will work perfectly. Rachel Quote Link to comment Share on other sites More sharing options...
gabbertje Posted November 15, 2003 Share Posted November 15, 2003 (edited) Mattias, thanks so much for posting this contribution.? With this, Piensatelier's code will work perfectly. Rachel Okay everybody, For the record, the provided code is not Piensatelier's code, it has its origin in a contribution to provide a qty box in the product_listing. Just wanted to let you all know :D . P.S. I am the webmaster of Pien's Atelier so I should know! And Mattias, you hit the jackpot with the change in application_top.php, that was the one thing missing. Edited November 15, 2003 by gabbertje Quote Link to comment Share on other sites More sharing options...
Angie201 Posted November 15, 2003 Share Posted November 15, 2003 Thank you for the additional code to make the code work!! I will try it today, BTW gabbertje very nice site! Angie Quote Link to comment Share on other sites More sharing options...
Angie201 Posted November 21, 2003 Share Posted November 21, 2003 Ok it works for me on the page with all the products listed down the page, but now when I open the individual product page to see more information and order from there it does not add the product to the cart.... How do I put the text box in there? Thanks for your help yet again :) Angie Quote Link to comment Share on other sites More sharing options...
raijen Posted November 21, 2003 Share Posted November 21, 2003 Angie, did you add this code on your product_info.php page? <input type="text" name="quantity" value="1" maxlength="2" size="2"> I almost missed it the first time. Rachel Quote Link to comment Share on other sites More sharing options...
Alvinius Posted March 13, 2005 Share Posted March 13, 2005 Angie, did you add this code on your product_info.php page? <input type="text" name="quantity" value="1" maxlength="2" size="2"> I almost missed it the first time. Rachel <{POST_SNAPBACK}> How can I put this code into product_info.php ? When I do the php file fails, and screen gets empty. Is it some cind of syntax in addition to the code ? thx. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.