Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fast & easy shopping feature


mattias2

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

Link to comment
Share on other sites

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 by mattias2
Link to comment
Share on other sites

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 by gabbertje
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...
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

 

 

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.

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...