PDA

View Full Version : Add Quantity to Listings



michael_s
04-23-2011, 06:54 AM
(nothing more in .zip)

product_listing.php near line 200 :

case 'PRODUCT_LIST_BUY_NOW':
$prod_list_contents .= ' ' . tep_draw_form('buy_now',

tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'products_id')) .

'action=buy_now&products_id='. $listing[$x]['products_id']), 'POST') . '' . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart',

null, 'primary') . '';
break;


application_top.php near line 380 :

case 'buy_now' : if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' .

$HTTP_GET_VARS['products_id']));
} else {
$cart->add_cart($HTTP_GET_VARS

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

$HTTP_POST_VARS['id']);
}


More... (http://addons.oscommerce.com/info/2113)