Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

Hi, I've installed CCGV and have tried several times to send myself a gift voucher from admin. The email goes through with a voucher code, but when I go to redeem it, I get the following message:

The Gift Voucher number may be invalid or has already been redeemed. To contact the shop owner please use the Contact Page

Any idea where this problem is occurring?

Thank you!

Best,

Allison

 

pergolina.com/catalog

Share this post


Link to post
Share on other sites

I have CCGV and points rewards both working. The only problem is if points AND vouchers cover the order customers are still asked for a payment method. I have the mod written and it almost works, except if points are used and not vouchers and it does not cover the order, it does not prompt for payment method.

 

What I need is a simple way to determine if vouchers are/aren't being used, in checkout confirmation. It looks like $gv_payment_amount is calculated reguardless if vouchers are being used or not.

Here is what I have so far:

 

IF CCGV installed, see if points and vouchers cover order total(only if both points and vouchers are both used)

 

1. in catalog/includes/classes/order-total.php

***FIND:***

// #################### Begin Added CGV JONYO ######################

global $payment, $order, $credit_covers, $customer_id;

// #################### End Added CGV JONYO ######################

 

***CHANGE TO:***

// #################### Begin Added CGV JONYO ######################

// $gv_payment_amount added for Points and Rewards CCGV Compatibility

global $payment, $order, $credit_covers, $customer_id, $gv_payment_amount;

// #################### End Added CGV JONYO ######################

 

 

 

2. In catalog/checkout_confirmation.php

 

***FIND:***

##### Points/Rewards Module V2.00 check for error BOF #######

 

if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && USE_REDEEM_SYSTEM == 'true') {

 

 

***ADD AFTER:***

// BOF Points and Rewards & CCGV added

(tep_calc_shopping_pvalue($customer_shopping_points_spending)<=($order->info['total']-$gv_payment_amount)) ? $ccgvpoints_covers = false : $ccgvpoints_covers =true;

// EOF Points and Rewards & CCGV added

 

 

***FIND:***

if ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) && (!$credit_covers) && (!$point_covers)) {

 

 

***CHANGE TO:***

if ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) && (!$credit_covers) && (!$point_covers) && (!$ccgvpoints_covers)) {

 

 

***FIND:***

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers_order) && (!$point_covers)) {

 

 

***CHANGE TO:***

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers_order) && (!$point_covers) && (!$ccgvpoints_covers)) {

Share this post


Link to post
Share on other sites

IF CCGV installed, see if points and vouchers cover order total together(only if both points and vouchers are both used).

 

1. in catalog/includes/classes/order-total.php

***FIND:***

// #################### Begin Added CGV JONYO ######################

global $payment, $order, $credit_covers, $customer_id;

// #################### End Added CGV JONYO ######################

 

***CHANGE TO:***

// #################### Begin Added CGV JONYO ######################

// $gv_payment_amount added for Points and Rewards CCGV Compatibility

global $payment, $order, $credit_covers, $customer_id, $gv_payment_amount;

// #################### End Added CGV JONYO ######################

 

 

 

2. In catalog/checkout_confirmation.php

 

***FIND:***

##### Points/Rewards Module V2.00 check for error BOF #######

 

if (isset($HTTP_POST_VARS['customer_shopping_points_spending']) && USE_REDEEM_SYSTEM == 'true') {

 

 

***ADD AFTER:***

// BOF Points and Rewards & CCGV covers

if (tep_session_is_registered('cot_gv') && ($cot_gv=='on')){

(tep_calc_shopping_pvalue($customer_shopping_points_spending)<=($order->info['total']-$gv_payment_amount)) ? $ccgvpoints_covers = false : $ccgvpoints_covers =true;

}

// EOF Points and Rewards & CCGV covers

 

 

***FIND:***

if ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) && (!$credit_covers) && (!$point_covers)) {

 

 

***CHANGE TO:***

if ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) && (!$credit_covers) && (!$point_covers) && (!$ccgvpoints_covers)) {

 

 

***FIND:***

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers_order) && (!$point_covers)) {

 

 

***CHANGE TO:***

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers_order) && (!$point_covers) && (!$ccgvpoints_covers)) {

Share this post


Link to post
Share on other sites

Hi Guys,

 

If installed this great contribution, and it works well, exept one thing.

 

The error and succes messages are not comming up, on the page checkout_payment.php.

 

redemption.jpg

 

Does anybody know the problem?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi all.

 

I've a strange problem

 

After I've inserted the redeem code, in the checkout_payment.php page, the script always return me the same text

 

Coupon Redemption

 

I've searched and I've found that's

 

define('MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR', 'Coupon Redemption');

 

The strange thing is that the url bar seems to be correct, so if I try to insert a wrong code the url is

 

http://[MY URL]/checkout_payment.php?payment_error=ot_coupon&error=Invalid+Coupon+Code

 

but the message on the checkout_payment is

 

Coupon Redemption

 

And if I insert the right code I've the same result, the url bar report the correct url, and the box message is always Coupon Redemption, and the value of the coupon is correctly added to the process.....

 

I've also tested the same file on one clean oscommerce and here ther's no error.........I think that I've make the integration well but I don't

 

Where I had to look to found the error....

Edited by Chryses

Share this post


Link to post
Share on other sites

I'm having a problem with version 5.18. The order seems correct... on a $30 order ,for example, with a coupon worth $10, the order total shows the $10 coupon and then a $20 order total. The problem is that the transaction being sent to the payment merchant is for $30.

Edited by baalwww

Share this post


Link to post
Share on other sites

could be placement of the order total and coupon, if the coupon is placed after order total on display, then merchant will get 30 and not 20.

 

I'm having a problem with version 5.18. The order seems correct... on a $30 order ,for example, with a coupon worth $10, the order total shows the $10 coupon and then a $20 order total. The problem is that the transaction being sent to the payment merchant is for $30.

John Oligario

 

Knowledge Base Contributions

Share this post


Link to post
Share on other sites

I have installed the 5.19 version without any fixed as recommended by Leslie and am getting the following error when I as a customer send a voucher to someone (I have already purchased as a customer and released my gift card as the admin so am just drawing from my balance as a customer).

 

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /home/a8848010/public_html/yellowstar/includes/functions/database.php on line 114

 

This is on gv_send.php page

 

the gift voucher is there and I can redeem it using the voucher code, so not sure where the error is... this is what lines 113/114 say

function tep_db_insert_id($link = 'db_link') {

global $$link;

 

Any help...

Also I know this is probably a dumb newbie question but when I checkout and use from the voucher balance it only deducts the order value, not the shipping amount so the customer still owes shipping even if the available voucher is much more than the actual costs of the order total...I followed the ordering in the User manual (I read it!).

 

Any suggestions

Kara

Share this post


Link to post
Share on other sites
I have installed the 5.19 version without any fixed as recommended by Leslie and am getting the following error when I as a customer send a voucher to someone (I have already purchased as a customer and released my gift card as the admin so am just drawing from my balance as a customer).

 

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /home/a8848010/public_html/yellowstar/includes/functions/database.php on line 114

 

This is on gv_send.php page

 

the gift voucher is there and I can redeem it using the voucher code, so not sure where the error is... this is what lines 113/114 say

function tep_db_insert_id($link = 'db_link') {

global $$link;

 

Any help...

Also I know this is probably a dumb newbie question but when I checkout and use from the voucher balance it only deducts the order value, not the shipping amount so the customer still owes shipping even if the available voucher is much more than the actual costs of the order total...I followed the ordering in the User manual (I read it!).

 

Any suggestions

Kara

 

Fixed the dumb newbie question - still getting the other error

Share this post


Link to post
Share on other sites
could be placement of the order total and coupon, if the coupon is placed after order total on display, then merchant will get 30 and not 20.

 

The coupon comes after the subtotal and before the total. The total shows correctly... but the transaction going to the merchant is not the same number.

Share this post


Link to post
Share on other sites

Does it work under ie6 or firefox?


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
Does it work under ie6 or firefox?

 

Hello

 

Thanks a lot for your answer.

 

I don't know under IE6 but it works perfectly under Mozilla Firefox.

 

Thanks again.

 

Florent

Share this post


Link to post
Share on other sites
Hello

 

Thanks a lot for your answer.

 

I don't know under IE6 but it works perfectly under Mozilla Firefox.

 

Thanks again.

 

Florent

I can't read the file you posted in a way that makes sense. However, the part that deal with the continue button looks like (and is unaffected by the contrib):

 

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>

 

<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

 

I don't use IE7, so I do not know. You could look at page 232 of this thread and see if that helps.

Edited by Coopco

The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites
The coupon comes after the subtotal and before the total. The total shows correctly... but the transaction going to the merchant is not the same number.

 

ok, here's the problem as I see it. The files that come with this contrib don't include any modifications for catalog/includes/classes/order.php, and when the payment module is called (Authorize.net in this case), it's $order->info['total'] that is being used to pass the amount. Since the class was never modified, the order total calculation in it (as opposed to class order_total) does not incorporate the gift voucher amount, and the amount passed to the merchant is wrong.

 

When the order class is instantiated, and the order total calculated, where would it be able

Share this post


Link to post
Share on other sites
When the order class is instantiated, and the order total calculated, where would it be able

 

...to retrieve the gift voucher info from (db I presume), and should it have to?? I assume this contrib has been working, but how it works in light of this really has me baffled.

Edited by baalwww

Share this post


Link to post
Share on other sites
Hi Guys,

 

If installed this great contribution, and it works well, exept one thing.

 

The error and succes messages are not comming up, on the page checkout_payment.php.

 

redemption.jpg

 

Does anybody know the problem?

 

Thanks in advance!

 

Does anybody know an solution?

This error driving me crazy

Share this post


Link to post
Share on other sites

Hi All,

 

I've look through this forum and Separate Pricing Per Customer, but can't find a solution. I have CCVG (from June 2007) and SPPC (version 4.11) installed. I just noticed that my coupons are discounting based on the pricing in customer group 0 rather than on the pricing in the appropriate customer group.

 

I think that the error is coming from: function get_product_price($product_id) in ot_coupon.php in order total modules - like it is doing a query on the product file price rather than the SPPC group price.

 

Does anyone know how to fix this issue? I tried using the query from shopping_cart.php in classes, but I really don't know what I am doing.

 

Any help would be greatly appreciated!

 

Tony

Share this post


Link to post
Share on other sites

Hi all,

 

Well, I fixed the issue - I guess that CCVG has had a lot of input re. updates, and one of the changes to the ot_coupon.php broke it by not using the correct product price variable. The fix was a simple uncomment out an old line of code and to comment out the new line.

 

thanks.

 

Tony

Share this post


Link to post
Share on other sites

Hi, anyone can tell me where to find the manual installation instruction for the 5.18? I trying to follow the one for 5.16 which is not working for CR2 version. thank you for your help.

ken

Share this post


Link to post
Share on other sites

Can't get coupon box to display (using 5.19) ... the admin seems set up prefectly, but in trying to get the coupon box to display, it simply won't. Does anyone have a suggestion about troubleshooting on the front end? Anything to toggle on or off in the code to get it to reveal the problem somewhere?

 

Any suggestions appreciated.

Share this post


Link to post
Share on other sites
Hi, anyone can tell me where to find the manual installation instruction for the 5.18? I trying to follow the one for 5.16 which is not working for CR2 version. thank you for your help.

ken

Does post 4611 help?


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Is there a specific reason why the the Gift Vouchers (-) module has a default sort order of 740?

The default sort order for the Totals module is 10.

 

The DC and GV modules should be before the Total for proper price calculation at checkout.

At least for merchant gateways the GV credit is never applied since the Total is the value that is passed on and it never includes the GV.

Share this post


Link to post
Share on other sites

I just installed this mod and now when i go to my store all I get is the heading and column left. I don't get any messages on my site for some reason. I hope this is a simple fix. I have reinstalled this mod. 3 times to see if it would fix anything,

thanks

 

David

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×