PDA

View Full Version : Quantity Box in Product Listing v1.0



michael_s
10-19-2007, 03:25 PM
With the newest version of OSC, it's really easy to add a quantity box and change the "buy now" button to an add to cart button. This allows your customer to add 1,2,3... of the same item to their cart with one click of the "add to cart" button. I don't know exactly how old version 1 is but here is all you have to do.

in catalogincludesmodulesproduct_listing

Find

case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . ' (http://www.oscmax.com/forums/' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . ') ';
break;
}

Replace with

case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '
' . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '';
break;
}


That's it. You're done. Enjoy.

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