Contributions

Credit Modules (Category Index)
Search: 

CCGV(trad)

This is a reworking of an older version of CCGV, with bug fixes and security patches applied. It also has some additional features:
1. The ablity to Delete queued gift vouchers from within osCommerce admin.
2. Customers can see their Gift Voucher Balance in their Account page, and send Gift Vouchers from there
3. All Gift Vouchers are now queued. This is no longer an option.
Files are based on osCommerce 2.2 MS2 (updated November 2005).

Vger

Expand All / Collapse All

Fix for products with attributes 4 Mar 2010

Fix for products with attributes, applies to all versions that I'm aware of.

The problem:
Products with attributes are not discounted if you apply a discount for just one category. The reason is the current code strips the attributes prior to doing the cart qty check, the cart cannot find the item because the attribute has been stripped, so it sets the qty as 0 and no discount is applied for that product. I believe this affects regular attributes and definitely affects anyone who uses the option type attributes contribution. Recommended that you combine this with the fix by softagz directly below to fix the mutliple category issue as well.

After a little experimenting I found the fix is simple, just change these two lines of code in includes/modules/order_total/ot_coupon.php

CHANGE
//$pr_c = $order->products[$i]['final_price']*$order->products[$i]['qty'];
$pr_c = $this->product_price($order->products[$i]['id']);

TO:
//$pr_c = $order->products[$i]['final_price']*$order->products[$i]['qty'];
$pr_c = $this->product_price($order->products[$i]['id']);


CHANGE:
function get_product_price($product_id) {
global $cart, $order;
$products_id = tep_get_prid($product_id);
// products price
$qty = $cart->contents[$product_id]['qty'];

TO:
function get_product_price($product_id) {
global $cart, $order;
// products price
$qty = $cart->contents[$product_id]['qty']; $products_id = tep_get_prid($product_id);

Product linked to mulitple categories 5 Apr 2009
CCGV(trad) <? => <?php fix 16 Nov 2008
Tax Recalculation Fix 26 Mar 2008
CCGV (trad) french 28 Feb 2008
Add User Guide into Admin 11 Jan 2008
User Guide Link for Admin 11 Jan 2008
Please ignore update below 22 Jun 2007
Small fix for the virtual product 14 Jun 2007
CCGV(trad) full package 21 May 2007
Small Fix for Mod Below 14 May 2007
Small Fix for Mod Below 14 May 2007
gv_sent.php fix ** ENGLISH / AMERICAN DOLLAR MOD ONLY ** 18 Apr 2007
CCGV(trad) French 3 Feb 2007
Improved coupon edit 23 Nov 2006
CCGV(trad) v1.2 18 Nov 2006
CCGV(trad) 2 Oct 2006
CCGV(trad) 8 Sep 2006
CCGV(trad) 28 Aug 2006
CCGV(trad) 28 May 2006
CCGV(trad) - update 25 May 2006
CCGV(trad) full file set 2 May 2006
CCGV(trad) 30 Apr 2006
CCGV(trad) 12 Apr 2006
Update - full file set 4 Apr 2006
Update 1 Apr 2006
CCGV(trad) 29 Mar 2006

Note: Contributions are used at own risk.