Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Quantity product info box and OSCCART

osccart osc cart ajax quantity

  • You cannot reply to this topic
No replies to this topic

#1 StephenAdrianRathbone

  • Community Member
  • 18 posts

Posted 19 September 2011, 09:45

Hi Guys,

I have a quantity box on my product info page and also OSC Cart, however this two are not working together (quanity box doesn't work).

The quantity box is this simple file edit:
FILE:includes/modules/product_listing.php
replace:
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
break;
}
 
With:
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
$lc_text = tep_draw_form('buy_now' . $listing['products_id'], tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']), 'POST') . tep_draw_input_field('list_quantity', '1', 'size=2') . tep_image_submit('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</form> ';
break;
}

Also a minor change to application_top to add quantity not +1.

The OSC Cart is from the contribution OSC to CSS (v2.2) - http://addons.oscommerce.com/info/7263

Any help appreciated.

Edited by StephenAdrianRathbone, 19 September 2011, 09:47.