Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

Okay,

So it seems that whatever payment I have selected previous to clicking on the redeem gv checkbox will be the payment gateway. However, with an amount of $0.00, the payment gateways will not accept it. Ideally, it should be smart enough and just deduct the amount from the gift voucher and redirect the user to the success page after confirmation, instead of directing them to the payment processor.

Anyone have any ideas on this?

 

Thanks!

Andrew

Share this post


Link to post
Share on other sites

My coupons were working fine and now they are calculating correctly, but throwing an error. ie: the pink box reads "ERROR - $13.10 on orders greater than $30.00" for a coupon that discounts by 15% for spending $30 or more. Everything works, but it is displaying an error message rather than a success message. Anyone know any workaround even to replace the message if nothing else??

 

thanks for any suggestions.

Share this post


Link to post
Share on other sites

Hi there... am using this fantastic contrib, mainly for the gift vouchers. am coming up against one prob tho. on the checkout_payment page, if i enter an incorrect code, a box comes up with 'coupon redemption' at the top, but no text inside it. i've gone round and round in circles on this one. does anyone know any solutions? or even what to search for to find advice? i've been searching for a while, have seen some posts about people having similar probs, but no solutions.

 

thanks

 

~bobsi18~

Share this post


Link to post
Share on other sites
Hi there... am using this fantastic contrib, mainly for the gift vouchers. am coming up against one prob tho. on the checkout_payment page, if i enter an incorrect code, a box comes up with 'coupon redemption' at the top, but no text inside it. i've gone round and round in circles on this one. does anyone know any solutions? or even what to search for to find advice? i've been searching for a while, have seen some posts about people having similar probs, but no solutions.

 

thanks

 

~bobsi18~

got it.... it was to do with the seo contribi'm using... http://forums.oscommerce.com/index.php?sho...mp;#entry898388

Share this post


Link to post
Share on other sites
We've successfully installed the contribution and its working well. My question is,

 

is it possible to have a discount voucher not discount products already on special?

 

For example, Regular price is $50 but the product is on sale for $40. In this scenario the customer wouldn't receive a discount on this product.

 

Is this possible?

 

Mary

Just wondering if anyone has come up with a solution for this one? I really like this contrib, but it's going to be a lot of work to issue coupons and check that nothing from that coupon is already discounted... Any suggestions appreciated :)

~bobsi18~

Share this post


Link to post
Share on other sites

Not sure if this contribution can do what I need it to do so I will ask before I take the task of installing it.

 

My client wants to be able to put on a sale where if a customer buys at least 10 CD's they will all cost 9.99 each. So they save some money but not all CD's cost the same so a set savings per CD will not work.

 

Can this be done?


Samuel Mateo, Jr.

osC 2.2 MS2

Installed Mods:

WYSIWYG HTMLArea 1.7 | Basic Template System 1.0 | osC-Affiliate | OSC-SupportTicket

Featured Products 1.3 | LoginBox 5.2 | LatestNews 1.1.3 | Extras for IE

Share this post


Link to post
Share on other sites

Hello:

 

I installed the full version of CCGV5.16 (8-Feb-2006 version) and have a few bugs that I did not notice any fixes for. I searched the boards and found a few people with the same problems and no fixes. So here goes.

 

Upon checkout ( .../checkout_payment.php is in browser) After selecting payment method check/money order and hit continue I get this error:

 

Fatal error: Cannot redeclare class moneyorder in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/modules/payment/moneyorder.php on line 13

 

Similarily if I use credit card option (I am using Paypal Pro 7.3) I get this error:

 

Fatal error: Cannot redeclare class paypal_wpp in /hsphere/local/home/rodrico/eratoys.com/catalog/includes/modules/payment/paypal_wpp.php on line 23

 

Any ideas?? On the admin side I also have this listed in my module choice for this contrib:

Credit Class Error ----- (under (edit/remove)Credit Class Error, needed with Gift Voucher)

 

Any help would be great.

 

Thanks,

rod

Share this post


Link to post
Share on other sites

Hello just thought I would post a bug fix for a small problem which occur if a customer decide to change is mind and NOT use is gift voucher balance after all.

Basically once the box is ticked, even if you go back to checkout_payment and leave the box unticked, the balance is still used.

Even if you log off and back in, its still registered with the session !

 

Anyway here is the line that need to be added to get rid of this bug:

 

In checkout_payment.php

After:

if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');  //CCG

Add:

if(tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv');  //CCGV

 

And we might as well clean this up in logoff.php also

After

tep_session_unregister('gv_id');

Add

tep_session_unregister('cot_gv');

 

Note that this does not apply to Discount codes, only the gift vouchers

 

I will add this to the lonnnggg list on the contribution site !

Edited by Phocea

Share this post


Link to post
Share on other sites

Little Problem ?

When I set in admin=>configuration=> Discount Coupon - New Account Sign-up Discount Coupon ID#

 

an ID - let`s say '3' (I created this Coupon ID before in Coupon Admin !)

 

than a new customer gets an email which looks like this:

 

 

Sehr geehrter Herr XX,

 

willkommen zu My Webshop.

 

Congratulation, to make your first visit to our online shop a more rewarding experience

below are details of a Discount Coupon created just for you

 

To use the coupon enter the redeem code which is newcustomer during checkout,

after making a purchase

 

Sie k?nnen jetzt unseren Online-Service nutzen. Der Service bietet unter anderem:

 

Kundenwarenkorb - Jeder Artikel bleibt registriert bis Sie zur Kasse gehen, oder die Produkte aus dem Warenkorb entfernen.

Adressbuch - Wir k?nnen jetzt die Produkte zu der von Ihnen ausgesuchten Adresse senden. Der perfekte Weg ein Geburtstagsgeschenk zu versenden.

Vorherige Bestellungen - Sie k?nnen jederzeit Ihre vorherigen Bestellungen ?berpr?fen.

Meinungen ?ber Produkte - Teilen Sie Ihre Meinung zu unseren Produkten mit anderen Kunden.

 

Falls Sie Fragen zu unserem Kunden-Service haben, wenden Sie sich bitte an den Vertrieb:

 

 

But there is no Coupon ID or Coupon Code to see.

 

I tried out the other Version

admin=>configuration=>Gift Voucher - New Account Sign-up Gift Voucher Amount

...and this works; there is a Coupon Code generated automaticly and the amoun which is set there.


OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Share this post


Link to post
Share on other sites

I'm getting down to the nitty gritty, nearly ready to go live, and have noticed a weird bug. My customer has $100 in gift vouchers in their account, all working ok. However, when they go to checkout with only $5 worth of products in their cart, a problem occurs. If they try to pay with the gift voucher (by ticking the 'to be used from gift voucher' box), the checkout_payment page reloads with the url http://www.mysite.com/checkout_payment.php...+for+your+order. There is no error message. If I change the payment method to something else, e.g. credit card, the page goes through to checkout_confirmation, where I am able to edit the payment method to gift voucher and it works fine.

 

Has anyone else come across this? I've tried doing multiple searches, but I can't really figure out what to search for. I do have ultimate SEO urls installed, that was causing issues with something else, I wonder if it's causing problems with this? Any help gratefully appreciated, I really want to go live soon!!!

 

Thanks,

~bobsi18~

Share this post


Link to post
Share on other sites

Hi,

 

I am having a problem with checking out.

 

on the payment page, I am entering the coupon code where it says: "Enter Redeem Code" then I click the Redeem button. It loads and says:

"The coupon has been successfully applied for $10.00 on orders greater than $10.00" and it shows the coupon in the shopping cart menu on the right.

 

Then when I enter my payment info and continue I get this error:

 

"You did not enter a redeem code."

 

Any help would be great.

 

Thanks,

Philip

Share this post


Link to post
Share on other sites
I'm getting down to the nitty gritty, nearly ready to go live, and have noticed a weird bug. My customer has $100 in gift vouchers in their account, all working ok. However, when they go to checkout with only $5 worth of products in their cart, a problem occurs. If they try to pay with the gift voucher (by ticking the 'to be used from gift voucher' box), the checkout_payment page reloads with the url http://www.mysite.com/checkout_payment.php...+for+your+order. There is no error message. If I change the payment method to something else, e.g. credit card, the page goes through to checkout_confirmation, where I am able to edit the payment method to gift voucher and it works fine.

 

Has anyone else come across this? I've tried doing multiple searches, but I can't really figure out what to search for. I do have ultimate SEO urls installed, that was causing issues with something else, I wonder if it's causing problems with this? Any help gratefully appreciated, I really want to go live soon!!!

 

Thanks,

~bobsi18~

Ok, solution to the first part of my problem (checkout_payment.php not showing the errors, only showing them in the URL) can be found here: http://forums.oscommerce.com/index.php?sho...mp;#entry824441. Turned out it was a problem with STS... Still trying to fix part 2 (the page asking me to select a payment method even though my voucher balance covers the total cost)

~bobsi18~

Share this post


Link to post
Share on other sites

Hello,

 

I just installed Credit Class and Gift Vouchers today version 5.16. I installed in using the latest instructions from June 30th.

 

I am getting this error after I installed it.

 

Fatal error: Call to undefined function: clear_posts() in /homepages/18/d169071379/htdocs/catalog/checkout_payment.php on line 91

 

I searched the forums and found this error once before, but it was supposed to be corrected with the new instructions.

 

Here is line 91.

 

$order_total_modules->clear_posts(); // ADDED FOR CREDIT CLASS SYSTEM by Rigadin in v5.13

 

Any help would be appreciated.

 

Thanks,

Steve

Share this post


Link to post
Share on other sites
Hello,

 

I am getting this error after I installed it.

 

Fatal error: Call to undefined function: clear_posts() in /homepages/18/d169071379/htdocs/catalog/checkout_payment.php on line 91

 

$order_total_modules->clear_posts(); // ADDED FOR CREDIT CLASS SYSTEM by Rigadin in v5.13

 

It seems like my site is fixed. I re-uploaded most of the files and rechecked the instructions. This seemed to fix things.

Share this post


Link to post
Share on other sites

I added this and the coupons seem to be working fine for me.

 

But, I can't find where to purchase the gift vouchers. I dor have the Gift Voucher FAQ in the information on my main screen. Do these need to be added as an item somehow? I don't see them anywhere on the site for sale.

 

Thanks,

JB

Share this post


Link to post
Share on other sites

ok, before I go into my original post, I'll edit this for J B:

You have to make gift certificates available in the store. To do this create an item (can be any name, price, etc) and make the model GIFT[something]. So you can do GIFT25, GIFT_25, GIFTtwentyfive, GIFThopethisworks.. as long as the first part of the model number is GIFT. Then assign a price to it and put it in your store. Users can then buy it at cover value and it will be added to their balance. At that point they can send all or part of their balance to an email address.

 

k, ran into a few problems I would like to share with people. don't know if this relates to using REGISTER_GLOBALS = off or what, but CCGV has been the biggest headache to install. I think I got most of it worked out now though.

 

the biggest problem I've had is when doing like

 

if(!tep_session_is_registered('cot_gv')) tep_session_register('cot_gv');

$cot_gv = true;

 

this is not a literal example (well, not exactly) but is an example of what I was dealing with. particularly around line 146 of ot_coupon.php. by moving the assignment ahead of the session registration it fixed having to enter in a coupon code twice to get the coupon (which was shown elsewhere in this thread. I searched for reducion to find it).

 

the second problem, to similar effect, was with gift vouchers. it was harder to nail down because even though the effect was the same it wasn't readily apparent.

 

if I went through and didn't apply a credit, everything was fine. however if I went through and applied a credit, it wouldn't show up. I go through and apply the credit again and it was fine (as in check the checkbox with a balance). the reason it was so hard to nail down was because if I went through with the credit applied but not showing up and then DIDN'T apply the credit, I would still get the credit, until I "didn't apply it" again.

 

the problem is that in collect_post() in order_total.php the section looks like this:

 

if (!tep_session_is_registered($post_var)) tep_session_register($post_var);

// ############ Added CCGV Contribution ##########

$post_var = $HTTP_POST_VARS[$post_var];

// ############ End Added CCGV Contribution ##########

 

now how this actually works is beyond me. it looks pretty typical, however unlike the normal assignment which essentially says

 

tep_session_register('something')

$something = $value

 

this essentially says

 

tep_session_register('something')

$variable = $value

 

so $something never gets registered. luckily the entire point of the tep_session_register() anyway is to link $_SESSION['test'] to $GLOBALS['test'] which in turn is the same as globals $test. so I was able to turn the above into:

 

// ############ Added CCGV Contribution ##########

$GLOBALS[post_var] = $HTTP_POST_VARS[$post_var];

// ############ End Added CCGV Contribution ##########

if (!tep_session_is_registered($post_var)) tep_session_register($post_var);

 

which works perfectly. whew..

 

ok, final bug I have found so far. with all of these changes I've made, I found out (the hard way) that $credit_covers (essentially $GLOBALS['credit_covers']) is checked for NO MATTER WHAT. The problem with this is in the CCGV modded part of payment.php where during each payment method in pre_confirmation_check() it checks to see is $credit_covers is true or not. if it is true it nullifies that payment module. Unfortunately once the payment module is nullified, the order went through successfully without ever going for payment, AND without deducting the credit from their voucher value. The answer is in pre_confirmation_check() in order_total.php (around line 244). here, $credit_covers is checked for EVERY TIME an order_total module is processed. This means $credit_covers will be true as long as the user has credit enough to cover his order, even if he isn't doing it. the answer is to change:

 

$gv_query=tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");

$gv_result=tep_db_fetch_array($gv_query);

$gv_payment_amount = $gv_result['amount'];

 

// if ($order->info['total'] - $total_deductions <= 0 ) {

if ($order->info['total'] - $gv_payment_amount <= 0 ) {

$credit_covers = true;

if(!tep_session_is_registered('credit_covers')) tep_session_register('credit_covers');

}

else{ // belts and suspenders to get rid of credit_covers variable if it gets set once and they put something else in the cart

if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers');

}

 

 

by enclosing a if ($cot_gv) {}

 

around it. this way someone has to specifically say they want to apply their credit for $credit_covers to even be solved for.

 

I really hope this helps someone out. It has taken me the better part of 8 hours to just figure out these three things. The first one was covered in this thread already, but I didn't see the other two touched on.

 

any questions let me know.. again (and to help people searching for this) these fixes are for your coupon code not being accepted the first time, or having to enter it twice to get it accepted, your gift voucher usage status not changing the first time, and having to apply the change twice to get it changed, and people choosing not to use their gift voucher balance to pay for their items when the voucher would cover the entire order but still having the order go through without a request for payment.

 

whew.. the only thing I have left now is that I want to use the shopping cart method with paypal IPN instead of aggregate total. Does anyone know real quick if I can submit a negative value item to paypal as a shopping cart? that way I could just do item_x=Coupon XXXX price_x=-11.95 item_x=Gift Voucher Balance price_x=-25.97.. here goes nothing.

Edited by borghe

Share this post


Link to post
Share on other sites

shoot.. typo in the above fix for the second issue. It should read:

 

// ############ Added CCGV Contribution ##########

$GLOBALS[$post_var] = $HTTP_POST_VARS[$post_var];

// ############ End Added CCGV Contribution ##########

if (!tep_session_is_registered($post_var)) tep_session_register($post_var);

 

the difference is in the post_var located in $GLOBALS[]. it should be $post_var. it isn't in the original post.

Share this post


Link to post
Share on other sites

Ok, I came across one more minor bug. Again I've searched but haven't found anything. rather than spending another 8 hours on this (which I'll have to do without an answer anyway) I figured I would shoot it off in here.

 

Currently with paypal available, a person with a gift voucher balance can avoid getting their balance reduced by not returning to the site. the order goes through just fine, but as is the case with paypal IPN not reducing inventory or anything, the voucher balance is not reduced either. is there an answer already out there for this? now technically I am thinking that I can just remove the apply_credit() call from before_process() and instead just stick it in the ipn.php file itself... I mean if someone uses a voucher and still goes out to paypal they used up their voucher balance. I can stick a variable in "custom" when I send the customer to paypal and when I get the response back just reduce their voucher balance by that much.. so "otgv35.68" will reduce their account balance by 35.68. the only problem I have with this is if their is a noticeable lag between them finishing their order on paypal and when paypal responds with the IPN (granted it would have to be at least a few minutes) this would allow the person time to see the voucher balance in their account and try spending it again before paypal's IPN response was received.

 

uggh.. I don't know. any thoughts on this are welcome.

Share this post


Link to post
Share on other sites

there is, you can move the stock and voucher reduction before the customer goes to paypal. You enable it in the checkout_process.inc.php

Share this post


Link to post
Share on other sites

hmm.. not sure what file you are talking about? checkout_process.php is unfortunately never called in what I'm referring to. paypal ipn has the checkout button post a form directly to paypal. checkout_process.php is only called if/when the customer comes back to your site from paypal. ideally the customer will come back, but all it takes is for someone to realize that they don't have to return for the credit to never be applied.

 

and I was double checking and the same is also true for coupon codes being cashed in. if you have a coupon code that has a per customer limit, if they don't return back to the site they can just use the coupon code over and over.

 

sticking everything in ipn.php seems like the way to go, however I have to first find out exactly how instant IPN is, or more specifically what is the worst case common scenario.

Share this post


Link to post
Share on other sites

I've seen several inquiries so I'm going to throw my hat in. We're using this great contribution (thank you everyone) and like others there will be times that the coupon code will make the price $0.00. I've tried to use a payment module for checking out when $0

http://www.oscommerce.com/community/contri...y,1/search,free

but I need to be able to read the new total as $0 - the new total is still the original price minus the coupon.

Share this post


Link to post
Share on other sites

Thanks borghe. Got the GIFT's added and that seems to work except that when someone buys one now, the amount isn't added to their GV account.

 

Also, I have noticed that the coupon codes also discount the gift vouchers. (this one I might be able to hack a fix on my own.)

 

Any idea on #1?

 

Thanks,

JB

Share this post


Link to post
Share on other sites

I have CCGV 5.16 working now.

I still have one thing on my wishlist:

When I want to sent an email with a gift Voucher, I want to have 2 options:

1) sent is to my customers who have an account (that's possible in 5.16)

2) sent it to all the people who have subscribed in my newsletter (so not only customers). I use the contribution Newsletter & Subscribers for the subscribtions

 

I can't find a way to have point 2 working.

I have tried to change the file admin/gv_mail.php, but whatever I tried is not working.

 

Is there anybody who can help me with this?

 

greetings Claudia

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

×