Results 1 to 1 of 1
Aug 15, 2010, 15:08 #1
- Join Date
- Mar 2004
- Vancouver, BC
- 0 Post(s)
- 0 Thread(s)
OSCommerece - Products_new.php sort help
I've been struggling with getting a sort function for OSCommerece to work for my products_new.php page.
I'm using this code from the oscommerece contributions: product_sort_v1.7 available at this link: http://www.oscommerce.com/community/contributions,911
This has added sorting for my categories and that's all! But how do I add this function to the products_new.php and index.php pages?
Below I've listed the code to add the quantity box next to the add to cart in products_new.php, however when it's there it won't work, why? This is where I need your help please.
//Code 1 works as usual, available by default, how it's a link and can't seem to figure out how to add the quantity box to it?
$p_buy_now = '<a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a>';
////Code 2 adds quantity box but doesn't work (you click on add and nothing happens with or without imputing a number into the quantity box
$p_buy_now = tep_draw_form('buy_now', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id='. $listing['products_id']), 'POST') . '<table cellSpacing="0" cellPadding="0" width="100%"><tr><td align="right" width="25%">' . tep_draw_input_field('buyqty', '1', 'size=2 maxlength=2') . '</td><td align="center" class="btn1" width="75%" valign="absmiddle">' . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle') . '</td></tr></table></form>';