Jump to content
Sign in to follow this  
Ian

[Contribution] Credit Class/Gift voucher/Discount Coupon v5

Recommended Posts

Hello,

 

nobody there who can help me. It is a big problem since I can not run the shop when a new costumer gets automatically 50 Euro of Gift Voucher in their shopping cart.

 

Another question. When a new costumer singnes in he gets an email saying: 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 %s during checkout. I did not activate coupons in order_total and I did not send a coupon and dont understand, why this text is in the email. When I delete this part from create_account_process, there is an error message in the email.

 

This is in languages/create_account_process.php

 

. STORE_OWNER_EMAIL_ADDRESS . '.' . "n");

define('EMAIL_GV_INCENTIVE_HEADER', 'As part of our welcome to new customers, we have sent you an e-Gift Voucher worth %s');

define('EMAIL_GV_REDEEM', 'The redeem code for is %s, you can enter the redeem code when checking out, after making a purchase');

define('EMAIL_GV_LINK', 'or by following this link ');

define('EMAIL_COUPON_INCENTIVE_HEADER', 'Congratulation, to make your first visit to our online shop a more rewarding experience' . "n" .

' below are details of a Discount Coupon created just for you' . "nn");

define('EMAIL_COUPON_REDEEM', 'To use the coupon enter the redeem code which is %s during checkout, ' . "n" .

'after making a purchase');

 

?>

 

But only the text for the coupon is in the email (not for a gift voucher) and the normal greeting follows. It is just a new costumer, no coupon sent and no gift voucher sent.

 

I dont hope I have to reinstall the whole thing.

Still hoping somebody helps me:

 

Devon

Share this post


Link to post
Share on other sites

Okay ... long boring story short ... I am using a very recent snapshot (20030605), I am also using the ADC/AIM Direct Connect Mod and both are working together fantastic. It is very important for me to have (not need, but have) this Coupon/GV Mod integraed into my osC for various reasons.

 

So in short ... since back a few pages in this thread, Ian said not to use this mod after snapshot 20030518 and since I am using the ADC/AIM Mod (which Ian also said had conflicts), should I even make an attempt to edit the php files or should I just wait for the 5.04 that is probably coming soon?? Is there faith that if I make the necessary edits and bug fixes to 5.03 that it will all work out fine??

 

I'm in a bit of a pinch for time with this. I have two "bosses" and their 18 employees all waiting to begin utilizing the new system. In the meantime they are all staring at me like this --> :evil: wondering what is taking me so long.

 

I'm a little nervous about this so please be gentle with me. :wink:


Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Share this post


Link to post
Share on other sites

5.04 is in fact ready, it's out with a couple of people for testing.

 

However this is still written against a pre-19th May snapshot and that is how it will be initially released.

 

The reason for this is that it is a bugfix update from 5.03 and I would upset a lot of people if the bugfix update did not work on the snapshot they first used. :D

 

I'll release a 5.04A which is compatible with newer snapshots straight after(only admin code affected)

 

Both should appear over the weekend.


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Thanks for the lightening fast response! I'll be anxiously awaiting the release of the 5.04A version! Looks like we will both be working through the weekend! :?

 

One quick one though, are there still [potential] conflicts with the ADC/AIM Mod?

 

Again, thank you for all your hard work! :D


Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Share this post


Link to post
Share on other sites

Yes, There is still a problem with authnet ADC. It's easily fixed though

 

In checkout_process.php

 

// load the selected shipping module

 require(DIR_WS_CLASSES . 'shipping.php');

 $shipping_modules = new shipping($shipping);



 require(DIR_WS_CLASSES . 'order.php');

 $order = new order;



*******************************

Authorize.net contribution code goes here

*********************************



// load the before_process function from the payment modules

 $payment_modules->before_process();



 require(DIR_WS_CLASSES . 'order_total.php');

 $order_total_modules = new order_total;

 

What needs to be done is to move the require/instantiation of the order_total modules to before the authnet code. So,

 

// load the selected shipping module

 require(DIR_WS_CLASSES . 'shipping.php');

 $shipping_modules = new shipping($shipping);



 require(DIR_WS_CLASSES . 'order.php');

 $order = new order;

 require(DIR_WS_CLASSES . 'order_total.php');

 $order_total_modules = new order_total;



*******************************

Authorize.net contribution code goes here

*********************************



// load the before_process function from the payment modules

 $payment_modules->before_process();

 

HTH


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Joe

The error occurs when we send out a gift voucher from the Admin section.

 

I've double checked my code and cannot see a reason for this. Is the rest of the email formatted correctly?

 

Can you email me a copy of your gv_mail.php file?


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites
// Set the coupon ID that will be sent by email to a new signup, if no id is set then no email

define('NEW_SIGNUP_DISCOUNT_COUPON', '0');

 

Should be

define('NEW_SIGNUP_DISCOUNT_COUPON', '');

Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Ian,

I'm fairly new to this, so please pardon the n00b questions. I'm interested in adding this type of module to an existing oscommerce 2.2MSI installation. Are any of the versions of your module compatible with that version of oscommerce?

 

I've yet to download a version of the module to look at it, just have been trying to follow this thread and figure out where its at. Is there documentation with the download, or do I need to search through the threads here to see how to install it?

 

Thanks for any info you deem to provide me. And best wishes for your success.

 

Regards,

Dan W

Share this post


Link to post
Share on other sites

Hi Ian,

 

thank you for your help

 

define('NEW_SIGNUP_DISCOUNT_COUPON', '');

 

The other thing that a new (test)customer has automatically an amount of giftvoucher in the shopping cart after creating an account: I figured out that is was the same amount a (test)customer had before in his cart. But he logged off.

 

I am afraid, this happen again, when the shop is running. I am testing always on the same pc. Maybe that is the reason.

 

I dont expect an answer before next week since you are working hard on the gc.504.

 

Devon

Share this post


Link to post
Share on other sites

What if I wait for the 5.04A for the admin section, then extract your updated [5.04A] catalog module code and manually add it to my exisitng ADC/AIM Module? Would that be a better way to do it since I am using the snapshot 20030605??

 

I'm just looking for a little guidance so I am avoid any rookie mistakes. :D

 

Thanks!


Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Share this post


Link to post
Share on other sites

Two questions:

 

1. Will this mod allow someone to purchase a gift voucher without creating an account (Purchase without account contrib #355)?

 

2. If 1. is true, then is there a way to display the voucher code in the admin redeem email so that the customer can input the code at checkout the next time they visit?

 

Thanks :wink:

Share this post


Link to post
Share on other sites

Devon

 

The other thing that a new (test)customer has automatically an amount of giftvoucher in the shopping cart after creating an account:

 

in: /catalog/includes/add_ccgvdc_application_top.php you will find the following:

 

// Set the amount of a Gift Voucher that the new signup will receive, set to 0 for none

define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');

 

Could this be the problem ? i.e everytime you set up a new test customer they get a starting bonus of ?10 ?[/code]


***************************************

I've been contemplating thinking about thinking

***************************************

Share this post


Link to post
Share on other sites
1. Will this mod allow someone to purchase a gift voucher without creating an account (Purchase without account contrib #355)?

 

I very much doubt it, the Gift Voucher system relies on using a customer account to track the purchase/redeem of vouchers.

 

5.1 will partly resolve this by forcing the sending of the GV email during checkout rather than relying on the 'send' link.

 

However, this still leaves the problem of what happens when some one does not use the full value of the GV during purchase. It might be possible to solve this by letting them re-enter the code again at a later time to access the balance.

 

the 2 above would then mean the GV system would be able to work without linking the GV to a customer account.


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Simon, no, I set both to ''.

 

 

define('NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '10');

 

Could this be the problem ? i.e everytime you set up a new test customer they get a starting bonus of ?10 ?[/code]

 

For example: I had 10 Euro gift voucher in my cart. logged off. Then for testing I created an account as an other person. After confirmation of the new account the cart was showing with a gift voucher amount of 10 Euro.

 

From this 10 Euro I sent 5 to an friend and logged off.

 

Then I created an new account as a third person and after confirmation of the new account the cart was showing with 5 Euro Gift Voucher.

 

This means, the new customer has always what was in the shopping cart of the customer logged in before.

 

You can imagine that I am afraid to go online? But maybe it is a session problem while I am testing the shop and always with the same computer. But I don't no much about sessions. But I think I read here once about the same problem.

 

Devon

Share this post


Link to post
Share on other sites

Ian (or anyone really),

 

et. al. --- I came across something that I needed to ask about. I am waiting for the bug fixed 5.04A version of this Mod to come out because I am using the snapshot dated 20030605 ... but here's what I noticed when looking at the files.

 

This may or may not be important, but I had to ask about it. In the V5.03 ZIP, ther are two files with (EDIT||MOVE) after them that have different names than my 20030605 snapshot.

 

In the V5.03 they are:

catalog/create_account_process.php

catalog/includes/languages/english/create_account_process.php

 

In my 20030605 osCommerce snaphot the nearest file names are:

catalog/create_account.php

catalog/includes/languages/english/create_account.php

 

I'm guessing that these two files were originally the same and they may have been renamed for my 20030605 snapshot. If this is NOT the case, please tell me so I can upload the two create_account_process.php files unedited into the appropriate folders. If they ARE supposed to be the same files, then maybe the 5.04A releases of this Mod (for after the 5/18/03 snapshot) should account for the file name changes in osCommerce. Simply renaming the files to create_account.php will not fix the problem on my snapshot because it will break the logic in the code.

 

Am I seeing this right?? :?


Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Share this post


Link to post
Share on other sites

Thats one of the problems with post 19/5 snapshots. Create_account_process no longer exists and one of the reasons why my contribution will not work on these sanpshots.

 

Now you know why I'm up to version 5 and there are still the odd bugs, coz I have to keep rewriting the code for new snapshots, rather than just concentrating on stabilization. :cry:


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

Devon,

 

The problem is caused by the redeem process. Originally the redeem process forced you to login. This ensured the redeemed Voucher was associated with a customer account.

 

A lot of people did not like this, so I changed it so that if you were not logged in the voucher could still be redeemed, by storing the details in a session variable. Once you do log in/create an account the value is then associated with your customer id.

 

What is happening in your case, is that you had the voucher amount in a session (in your logged off state)

 

You then came back and created a different account, because the session can not distinguish, the GV Value was given to the new account.

 

Od course this problem will only occur when you are redeemin/creating accounts on the same computer.


Trust me, I'm an Accountant.

Share this post


Link to post
Share on other sites

It's all starting to make sense to me now. At first I couldn't imagine what would be so different in the V5.03 (5/18/03 and before) that could make the 5/19/03 and after snapshots not compatable. :oops:

 

So then the 5.04A Mod for the releases after 5/19/03 will correct this problem on the Catalog side as well as the necessary Admin changes??

 

Ian, you are the greatest (as I should have known from this forum)!!

 

:arrow: The Steve


Every passing minute is another chance to turn it all around.

 

Delegated to web lackey - again.

Share this post


Link to post
Share on other sites
I very much doubt it, the Gift Voucher system relies on using a customer account to track the purchase/redeem of vouchers.

 

5.1 will partly resolve this by forcing the sending of the GV email during checkout rather than relying on the 'send' link.

 

However, this still leaves the problem of what happens when some one does not use the full value of the GV during purchase. It might be possible to solve this by letting them re-enter the code again at a later time to access the balance.

 

the 2 above would then mean the GV system would be able to work without linking the GV to a customer account.

 

Ran a few orders through and it seems that the customer can buy a voucher and do anything with it they want while they are in their temp session. As soon as they log out, its gone and they have really no way to get it back.

 

So, I can put the voucher code in the e-mail that is sent from gv_queue.php (I think), somehow log the codes before they are redeemed through admin, or take out purchase without account contribution.

 

Suggestions very welcome :lol:

Share this post


Link to post
Share on other sites

Hi, Anyone know where I can get this contribution, and all the updated and fixes, becaue this thread is soo long , and I"m soo confuse,, can someone please pack this up and put all the fix in. for other poeples like to me to use. Or give me the link in the contribution, or a website so myself and others can downlload it, I know alot of people are confuse like me

 

Thanks alot

Share this post


Link to post
Share on other sites

Hello Ian,

 

 

 

you did make my day and the weekend ....

 

I was hoping it was a session problem. I now installed a Spider-Killer.

 

Now the gv5.03 is working (except the queue). I will check the files again. And maybe - next week - I will ask again, if I don't get this to work.

 

Thanks a lot

 

What is happening in your case, is that you had the voucher amount in a session (in your logged off state)

 

You then came back and created a different account, because the session can not distinguish, the GV Value was given to the new account.

 

Od course this problem will only occur when you are redeemin/creating accounts on the same computer.

Share this post


Link to post
Share on other sites

Ian,

 

Thanks so much for such a great mod. It's fantastic. Just 1 tiny issue.

 

When a customer sends a gift voucher, the email arrives as it should, however the "automated" link for redemption doesn't work. The url is correct, just that the customers can't click on it from the email. Any ideas??

 

As I said...tiny issue!

 

Thanks,

Greg


I only do what my Rice Krispies tell me to do!

Share this post


Link to post
Share on other sites

I agree with Greg (mickeymouse) regarding the mod - Great work!

 

Need to add one more point to Greg's though: The coupon/voucher should not redeem unless you log in.

 

E.g. you get an email saying you've been sent a $10 gift voucher. It has a link in the email and when clicking it, it redeems the voucher right away even though I wasn't signed in or anything. That's pretty confusing, because you really (as a customer) don't know what happened and where the amount went, etc. Only when you log yourself in it appears in the shopping cart. Also as a suggestion it'd be great to have the voucher appear in the shopping cart as a discount and not just as a line in the shopping cart box.

 

Anyway, looking forward to 5.04 - thanx for all your work and effort Ian!

 

- DM

Share this post


Link to post
Share on other sites

Just thought of one more thing.........with regards to shipping charges of this item.

 

The customer is paying shipping charges for this even though it is going into their "GV account". This shouldn't be as this is not being shipped anywhere. Is there a workaround for this??

 

Thanks,

Greg


I only do what my Rice Krispies tell me to do!

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
Sign in to follow this  

×