hing Posted December 3, 2003 Share Posted December 3, 2003 I've been using oscommerce with great success and thanks to a lot of people who made this & various people doing their contributions. I thought I should contribute a little bit and save someone time also. Like all things, please verify my changes before putting into your website. backup first, but it works for me. There is a bug in the gift/coupon voucher contribution. Category restriction doesn't work. Here is the bug fix. modify catalog/includes/modules/order_total/ot_coupon.php for function calculate_credit: } else { $cat_ids = split("[,]", $get_result['restrict_to_categories']); for ($i=0; $i<sizeof($order->products); $i++) { $my_path = tep_get_product_path(tep_get_prid($order->products[$i]['id'])); $sub_cat_ids = split("[_]", $my_path); for ($iii = 0; $iii < count($sub_cat_ids); $iii++) { for ($ii = 0; $ii < count($cat_ids); $ii++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { if ($get_result['coupon_type'] == 'P') { // taken out bugfix category restriction $od_amount = round($amount*10)/10*$c_deduct/100; $pr_c = $order->products[$i]['final_price']*$order->products[$i]['qty']; $pod_amount = round($pr_c*10)/10*$c_deduct/100; $od_amount = $od_amount + $pod_amount; // <- I added this $iii = count($sub_cat_ids); // <- I added this $ii = count($cat_ids); // <- I added this } else { $od_amount = $c_deduct; $iii = count($sub_cat_ids); // strictly speaking, not necessary $ii = count($cat_ids); // but it's faster. } } } Link to comment Share on other sites More sharing options...
busonero Posted December 3, 2003 Share Posted December 3, 2003 Hi ! I 've been trying to install this contribution version 5.06 all the day and i didn't geit working. just uploaded old backup. must try again :-) and looking for known bugs :-) is this for version 5.06 ? any other known bug ? thank you roberto Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.