Credit Class & Gift Vouchers (CCGV) for 2.3.1
#61
Posted 12 March 2012, 16:38
Thanks!
#63
Posted 13 March 2012, 06:42
#64
Posted 14 March 2012, 19:50
could you tell me which file are modified for :
" Fixed an issue where a discount coupon is restricted to product but does not calculate price with tax."
i have installed the 10.2 version and i want to try to resolve my probleme with the tax in the checkout files :
when i use coupon the total is ok but not the tax (always the same if i didnt use cupon)
my order total :
1 sub total
2 shipping
3 discoutn coupon
4 voucher
5 tax
6 total
my price are always with tax
thanks for help
#65
Posted 15 March 2012, 21:32
i have a clean 2.3.1 install and now have this module installed. i can purchase a gift voucher and pay for it via the paypal sandbox, but i never see anything appear in the gift voucher queue. it appears as though the order has been processed, with order status processing.
also if i email a gift certificate from the admin console, i can redeem it and apply the credit to a subsequent purchase, so i think the module is functioning correctly apart from the gv queue.
I have run the script order_total_gv.sql
Store Credit
Display Total
true
Sort Order
8
Queue Purchases
true
Include Shipping
false
Include Tax
true
Re-calculate Tax
Credit Note
Tax Class
--none--
Credit including Tax
true
Modules Sort Order Action Discount Coupons 9
StoreCredit 8
Shipping 2
Sub-Total 1 Tax 3
Total 10
is there some specific order tracing I can look at?
any help appreciated as i'm now completely stuck.
Edited by paulwarwicker, 15 March 2012, 21:36.
#66
Posted 17 March 2012, 20:26
I believe it was around line 150 in includes\modules\order_total\ot_coupon.php
replace:
$pr_c = ($order->products[$i]['final_price'] * $order->products[$i]['qty']);
with:
$pr_c = $this->product_price(tep_get_prid($order->products[$i]['id']));
$pr_c = $this->product_price($order->products[$i]['id']);
#67
Posted 17 March 2012, 20:28
Check that your gift voucher product has the Model prefixed with 'GIFT' otherwise it will not be recognised as a gift voucher. For example you could call it GIFT_Voucher or GIFT_10, etc.
#68
Posted 18 March 2012, 12:43
thanks for the reply. the vouchers are already defined with both a product name and product model that are prefixed with "GIFT" (ie GIFT50, GIFT25, etc).
I have diffed all the files between the module source files (NEW_FILES and FILES_TO_MODIFY) and those installed and both are indentical.
I have turned on database queries in the logging but there is nothing that goes near the coupon_gv_table. I can see the order inserted and the product stock quantity is decremented. I have also manually checked the value of the configuration key 'MODULE_ORDER_TOTAL_GV_QUEUE' which is set to true.
I tried adding some debug to ot_gv.php but this method did not look like it was being called, or i was not looking at the right place for output in the browser
function update_credit_account($i, $order_id=0) {
global $order, $customer_id, $insert_id, $REMOTE_ADDR;
print ("in update_credit_account");
if (!$order_id) $order_id = $insert_id;
print ("100");
if (preg_match('/^GIFT/', addslashes($order->products[$i]['model']))) {
print ("101");
$gv_order_amount = ($order->products[$i]['final_price'] * $order->products[$i]['qty']);
if ($this->credit_tax=='true') $gv_order_amount = $gv_order_amount * (100 + $order->products[$i]['tax']) / 100;
$gv_order_amount = $gv_order_amount * 100 / 100;
print ("102");
if (MODULE_ORDER_TOTAL_GV_QUEUE == 'false') {
print ("103");
...
} else {
print ("104");
$gv_insert=tep_db_query("insert into " . TABLE_COUPON_GV_QUEUE . " (customer_id, order_id, amount, date_created, ipaddr) values ('" . $customer_id . "', '" . $insert_id . "', '" . $gv_order_amount . "', NOW(), '" . $REMOTE_ADDR . "')");
Is there some configuration to check that the module is correctly installed?
I have also noticed that if I have manually sent a store credit and redeemed it, it is available at checkout and can be correctly applied to a purchase, but the store credit isn't removed once used. It's available for subsequent purchases!
??
thanks
paul
Edited by paulwarwicker, 18 March 2012, 12:57.
#69
Posted 18 March 2012, 20:24
I have found the problem. After some extensive debugging I have found that the call to $payment_modules->before_process() in checkout_process.php never returns so the gv queue code in checkout_process.php is never run.
I am using the paypal standard payment module. In the file includes/modules/payment/paypal_standard.php the last line of the method before_process() is to redirect the browser session. If I comment out the redirect, I get the gift voucher added to the queue and it resolves the problem about the credit remaining after use. Ultimately I appear to be redirected to checkout_success.php so everything appears to be normal.
includes/modules/payment/paypal_standard.php::before_process()
tep_session_unregister('cart_PayPal_Standard_ID');
//tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
}
Hope this helps someone in future
paul
#70
Posted 18 March 2012, 23:11
anyway it seems less a problem with ccgv and more a problem integrating with paypal standard.
Unless anyone else has experienced this before, I guess I'm going to have to duplicate a chunk of code.
paul
#71
Posted 25 March 2012, 04:20
Sorry I couldnt help. It must be an issue with paypal module. I did have this installed once, before I installed CCGV but removed it when paypal did the dirty on us, will never use them for business again.
I hope you manage to figure it out, good luck.
#72
Posted 28 March 2012, 17:11
I have this module working lovely for the past few weeks but with Paypal playing up ive upgraded to paypal express and now the discounts dont work.
I have no errors showing and it still works with Sagepay, any idea on where i should look, i have a tiny idea it might be on the express page but not knowing what to look for i dont know where to start, ive combed the froums and found nothing that can help so far.
Any help would be fab as i realy dont want to uninstall it coz it rocks :-D
Edited by clippers, 28 March 2012, 17:12.
#73
Posted 30 March 2012, 06:49
Can't really help you with the module but I suggest installing this addon http://addons.oscommerce.com/info/7705/v,23.
This has been invaluable for debugging code, especially when ajax calls and multiple files are involved.
#74
Posted 26 April 2012, 09:14
I'd like to close the gap and only allow credit (e.g., Paypal) payment methods when there's a GV in the cart (to prevent the fraud situation).
One option I see is to modify the payment class and, when there's a GV in the cart, exclude other payment methods. But i'm not seeing how this gets done (in the code). I see a "credit_class" in the order class, but i'm not clear on it's meaning - does this indicate whether the payment method is a credit card?
any ideas/options (or better, a place where this sort of exclusion is already occurring).
thanks very much for any insight!
-Peter
#75
Posted 26 April 2012, 17:56
I installed it but during checkout there is no box to enter the coupon code.
Any suggestions how to resolve this?
#76
Posted 03 May 2012, 05:35
I am not sure if anyone could help me with this.
I have a mod v2.3.1 and had add on theCCGV Credit Class Gift Voucher 6.0.
There are two things that is bugging me and sort of need a quick soln.
A quick background is that we do not have an automated payment gateway. We process the payment manually hence, we update all the order status manually.
So usually if the item is free, once the customer "makes payement" and assuming his total is $0 for his cart, the customer's status will be updated as Payment Processed and the customer can download the digital audio immediately.
1. However, the scenario here is that if the customer redeems the coupon/voucher and the total value is $0 for his cart, the customer's status is still marked as Awaiting Payment. Hence, I am wondering if there is a way to work around that if the total value = $0 and the customer's status will be updated as Payment Processed and the customer can download the digital audio immediately.
2. Is there anyway I can reset the customer's redeem status if they have an issue with the Gift Code.
Thank you in advance.
#77
Posted 06 May 2012, 19:59
I installed this contribution in a clean oscommerce 2.3.1 and all is work fine, but I installed in my store (modified version of 2.3.1) all is working fine, but I have only one problem.
I can redeem the credit if I use the link sent with the email but i'm not able to redeem when I try in Checkout_Payment!! Someone can help me? where file I need to check?
Thanks for your replay
Marco














