Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

erick: what julia is trying to tell you is to modify the $order->info['total'] in your payment file in the process_button function and I believe she is correct. Why is that you might ask?

Your payment module, from what you have stated, is expecting subtotal, shipping and tax instead of total as the amount your going to receive. How those figures are derived depend on your state and accounting rules, which is what we allow you to modify. If you need to change your subtotal to reflect your discount or gift voucher then I would suggest you take $order->info['total'] and subtract your tax and shipping from that to derive the subtotal that you present to your payment processor. But, if you do it in this way you might want to consider how your tax is setup because some payment companies check your tax against your subtotal and depending once again on your state and accounting rules will depend on how your tax and shipping is figured against a discount or gv or credit note.

Now are you totally confused?

Good luck.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

strider: I somehow got you on the wrong track ...

 

Summary:

My payment module completely ignores :( the GV and DC amounts. The payment module looks at $order->info['total'] just like all the other payment modules. It takes the order total directly from osCommerce within the before_process() function.

 

Questions:

1.) Does GV modify the order total in process_button()? If so do need to grab the order total in process_button() and passes it back to the before_process() function in order to pass the correct amount to the payment gateway?

 

2.) My cart's $order->info['total'] is otherwise 100% correct, so could I simply subtract the GV and/or DC amount(s) from $order->info['total']? If so, how would that bit of code look in the payment module?

 

whew!

Share this post


Link to post
Share on other sites

what is your php version


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

joe I answered your email but it said I was spamming .. lol .. and no I don't have patience.


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Hi!

 

I have only one real question at this point. I have started a new store and installed the mod into a clean setup (except for the affiliate mod). I setup a coupon for new users to get a one time discount of 30% and that works with no problem. The one thing is that there is duplication of the main text and the warning info when the email goes out. Is there a way to fix this?

 

Thanks,

Kevin


Kevin Rosenthal

Share this post


Link to post
Share on other sites

yes it is already in the posts mystic

 

http://forums.oscommerce.com/index.php?sho...ic=52161&st=330

in catalog/create_account.php - i have some mods installed so i can't give you line number

 

 

Find this line

 

$email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

 

and delete the EMAIL_TEXT bit so it looks like this

 

 

 

QUOTE 

$email_text .= EMAIL_CONTACT . EMAIL_WARNING;

 

 

 

regards

 

mark


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Just started using the GV contribution, when someone buys a GV it does not appear in the voucher queue in admin?

 

The installation instructions are

Now when the customer purchases a Gift Voucher it will be logged in a queue. The customer will not be able to use the Gift Voucher until you use the admin option to release it from the queue.

If set to false the Gift Voucher will be immediately available to the customer.

 

Am I using an old conrtib, I don't have any true or false options in the Gift Voucher admin

 

I am also using flat rate shipping and it is being charged twice, once when the GV is purchaced and also when it is redeemed. How do I only charge for it once?

 

Any ideas

 

Penge

Share this post


Link to post
Share on other sites
yes it is already in the posts mystic

 

http://forums.oscommerce.com/index.php?sho...ic=52161&st=330

 

in catalog/create_account.php - i have some mods installed so i can't give you line number

 

 

Find this line

 

$email_text .= EMAIL_TEXT . EMAIL_CONTACT . EMAIL_WARNING;

 

and delete the EMAIL_TEXT bit so it looks like this

 

 

 

QUOTE?

$email_text .= EMAIL_CONTACT . EMAIL_WARNING;

 

 

 

regards

 

mark

Thanks Strider!

 

After going page by page, it would figure it was on the page after I gave up. <_<

 

I love the work you have done on this. :D

 

Kevin


Kevin Rosenthal

Share this post


Link to post
Share on other sites
Strider Nov 12 2003, 09:40 PM: what is your php version

 

PHP Version: 4.2.3 (Zend: 1.2.0)

Database: MySQL 3.23.58

 

Thanks,

Eric

Share this post


Link to post
Share on other sites

erick are the totals of your orders being placed in your admin correctly?


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites

Hello there. Here is my gift voucher issue. Warning: this isn't a basic install so my problem could be related to the conflict with other contributions. With that said, I ask that maybe someone could point me in the right direction where I can try to update the code. I'm not an expert buy I usually able to play around a bit to figure things out.

 

Okay my issue is that when a customer purchases a gift voucher nothing is generated in the database. Where exactly does this occur in the files? I have backups of previous installations but I want to see if I can fix this without having to go back.

 

The purchase goes through and everything but nothing is added to the queue.

Share this post


Link to post
Share on other sites

And which CONTRIBUTION(S) was added. Was there and SQL file ran that MIGHT have overwitten something.....???

Share this post


Link to post
Share on other sites
Strider: Nov 13 2003, 01:31 are the totals of your orders being placed in your admin correctly?

Yes! The weird thing is that the orders are 100% correct on the checkout_confirmation.php page, in the admin and in the confirmation emails.

 

The preauth amount run by the payment processor does not reflect GV or DC - all other variables are correct, i.e., order, shipping, tax.

 

FYI: luder1 (Tim) still has this exact same prob. w/ Authorize.net.

 

- Eric

Share this post


Link to post
Share on other sites

spayce_girl

 

I can't be sure, I have only began using GV this week on a loaded 5 installation which is a couple of months old. I have added contributions, checking the db with phpmyadmin, I can't see anythihg I added conflicting with GV

 

Penge

Share this post


Link to post
Share on other sites

erick is your gv and/or dc being called before or after your call to your payment center does your payment code have a sort order or does it default to 0. That said what is your sort order? Since you have been playing in the code do you understand what the sort order does?

 

spacey-girl and penge: do you have gv set to queue the purchase of the gv? also loaded 5 is made with 2.2.1 this version of the code was done with 2.2.2 so you can't update your loaded 5 with this code or 5.04 of the ccgv and above. you can set your queue in modules->order totals-> gift voucher


(my knowledge is so small you would think that an ant was a genius in comparison)

Share this post


Link to post
Share on other sites
joe I answered your email but it said I was spamming .. lol .. and no I don't have patience.

is it possible to send that email to applelinks@mac.com

 

 

Thanks again

 

Joe


----------------------------

Long Island, New York

Share this post


Link to post
Share on other sites
erick is your gv and/or dc being called before or after your call to your payment center does your payment code have a sort order or does it default to 0. That said what is your sort order? Since you have been playing in the code do you understand what the sort order does?

i don't know what the sort order means. can you elaborate on it and how to change it? me and erick have the same problem, however, i'm not elite enough to mess with the coding.

Share this post


Link to post
Share on other sites

IT WORKS, IT WORKS!

 

Many thanks to Strider for supporting this contribution and to JuliaJ for helping me sort this out ...

 

I give full credit to Dan Helfman, Senior Software Engineer, TrustCommerce for the solution. Dan wrote the TrustCommerce Payment Module. His personal attention to this issue, and help with other projects, is one of several reasons that we use TrustCommerce and refer our clients to TrustCommerce. They make our clients happy, and that makes us look good! [a well deserved plug :rolleyes: ]

 

Apparently the GV/DC contribution prevents the payment module from accessing the necessary globals. So, after the process_button() function in the payment module, this code was needed:

global $HTTP_POST_VARS, $order;

Works perfectly, with sort order settings in Admin/Modules/Order Total:

 

Discount Coupons 4

Gift Certificates 5

Low Order Fee

Shipping 2

Sub-Total 1

Tax 3

Total 6

 

luder1 - You may want to pass this solution to your payment gateway. I hope this will also help you.

 

Thanks again all,

Eric_K :P

Share this post


Link to post
Share on other sites

Ok interesting things happening here. I would like to thank the developers of this mod. It's working like a charm.... almost ;)

 

First, I am running a modded install which includes a dimensional shipping module for canada post, and a few home brew modifications.

 

Now, the problem I am having is I can't seem to figure out 2 things.

1) I can't skip the shipping for a gift voucher. I've looked for enable downloads in the admin->configuration and can't find it. Maybe I am just overlooking it. I think this would solve all my problems.

 

2) I can't tell if a gift voucher is really created in my catalog. I create a gift voucher via catalog->new product with GIFT10 as my model number, value is $10. I still get shipping options presented even with a weight/dimension of 0lbs, 0hx0wx0d.

 

Sooo... I think if I solve issue 1, issue 2 will go away. Any takers?

 

PS I am having no problems what-so-ever with the email users features of the vouchers/coupons.

Share this post


Link to post
Share on other sites
Ok interesting things happening here.  I would like to thank the developers of this mod.  It's working like a charm.... almost ;)

 

First, I am running a modded install which includes a dimensional shipping module for canada post, and a few home brew modifications.

 

Now, the problem I am having is I can't seem to figure out 2 things. 

1) I can't skip the shipping for a gift voucher.  I've looked for enable downloads in the admin->configuration and can't find it.  Maybe I am just overlooking it.  I think this would solve all my problems.

 

2) I can't tell if a gift voucher is really created in my catalog.  I create a gift voucher via catalog->new product with GIFT10 as my model number, value is $10.  I still get shipping options presented even with a weight/dimension of 0lbs, 0hx0wx0d.

 

Sooo... I think if I solve issue 1, issue 2 will go away.  Any takers?

 

PS I am having no problems what-so-ever with the email users features of the vouchers/coupons.

1) In the Configuration Box of Admin you have the option "Download" on the left side. Click that link and you will be presented four configuration options, one of them is "Enable download".

 

/Fred

Share this post


Link to post
Share on other sites

spayce_girl

 

I have sorted out the queue problem with the GV.

 

Check - includes/add_application_top.php

 

DEFINE('GV_IMMEDIATE', false);

 

will queue all Gift Voucher purchases.

 

I still have the shipping cost taken out twice (I have flat rate shipping enabled) once when the GV is purchaced and also when it's redeemed. I have set 'Include shipping' to false in Modules/Order Total, but it has no effect!

 

Any ideas

 

Penge

Share this post


Link to post
Share on other sites

Erick I am glad you got your gv/dc working and I am also glad that whoever wrote your payment module stepped up to the plate and fixed their bug. But... the gv/dc contrib has nothing to do with whether your payment module can see the global you referred to with this statement

Apparently the GV/DC contribution prevents the payment module from accessing the necessary globals. So, after the process_button() function in the payment module, this code was needed:

CODE 

global $HTTP_POST_VARS, $order;


(my knowledge is so small you would think that an ant was a genius in comparison)

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

×