Jump to content
Sign in to follow this  
mattias2

Fast & easy shopping feature

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

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 by chfields

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Angie, I'm having the same problem. Looks the same as the Piensatelier site, it's just not working like theirs is.

 

Rachel

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I was looking for a code like this, and found it.

Just intalled and works very well

 

Thank you

Share this post


Link to post
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:

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Mattias, thanks so much for posting this contribution. With this, Piensatelier's code will work perfectly.

 

Rachel

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×