Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

buy more than 1 item in "buy it now" button


arbocenc

Recommended Posts

Hello,

 

Is there any contribution or way to add a input box before the "buy it now" button, that let customers buy, for exemple 3 items? I would need it in the normal products list.

 

I've found a script for doing that in the "product information window", but I don't know how do it in the "standar products list" window.

 

The script is the next:

 

Author: blue dog

Date: 07-25-02 18:40

 

Okey dokey,

 

BTW dont thank me, thank Geert-Jan Leerentveld for this :)

 

 

Insert the following in product_info.php:

<input type="text" name="cart_quantity" value="1" maxlength="2" size="2">

just before:

<input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>"><?php echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>

Then go to application_top.php and change:

$cart->get_quantity($HTTP_POST_VARS['products_id'])+1

To:

$cart->get_quantity($HTTP_POST_VARS['products_id'])+($HTTP_POST_VARS['cart_quantity'])

---------------------------------------------------------------------

You might need to 'wiggle' the layout a bit but it's a brilliantly simple mod!

 

Thanks,

 

Joan

[email protected]

www.delaterra.net

organic food in Catalonia

Link to comment
Share on other sites

Hi,

 

I think FAQ is wrong (probably it was right a few months ago). FAQ tell about changing some lines in /includes/modules/product_listing.php, but lines to change are not the same that FAQ's ones. :-(

 

Does anybody know the right way to change the script?

 

Thanks,

 

Joan

[email protected]

www.delaterra.net

organic food in Catalonia

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...