Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display The Quantity To Buy In Product Listings


Hellmaker

Recommended Posts

I found this script, but its of old code, i have the v2.2

 

How To Display The Quantity To Buy In Product Listings

 

References in the forum:

http://www.theexchangeproject.org/communit...d/i,7261/t,7261

 

It is possible to display the quantity to buy and the add to cart button right on the product listing, to be able to place the order right from the product listings without having to click for the extended description.

 

In /includes/modules/product_listing.php, replace:

 

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_form = '<form method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_update_product', 'NONSSL') . '">';

$lc_text = ' <input type="hidden" name="cart_quantity" value="1"><input type="hidden" name="products_id" value="' . $listing_values['products_id'] . '">' . tep_image_submit(DIR_WS_IMAGES . 'button_buy_now.gif', TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . ' ';

 

With:

 

case 'PRODUCT_LIST_BUY_NOW':

$lc_align = 'center';

$lc_form = '<form method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_update_product', 'NONSSL') . '">';

$lc_text = ' <input type="text" name="cart_quantity" value="1" maxlength="2" size="2"><input type="hidden" name="products_id" value="' . $listing_values['products_id'] . '">' . tep_image_submit(DIR_WS_IMAGES . 'button_buy_now.gif', TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . ' ';

 

But ofcourse that didnt work, anyone have a clue on how to rewrite this code in productlisting.php. :blink:

Link to comment
Share on other sites

Dont have to rewrite ofcourse if u know a contribution or know how to do it thou. lol

 

I hav a similar problem. I have added 2 radio buttons in a infobox, and want it to work like this:

 

O inkl.tax

O excl.tax

when i aktivate inkl.tax radio button, the page should refresh automatically with inkl.tax. The same to excl.tax to show prices without tax.

 

Any clue ? :ph34r:

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...