Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Hi Guys, Thanks for all of your help. I figure out why the redeem vouchers coupon did not show up on my check out. If I were to read the instruction carefully, I would have notice that I need to enable it by going into the modules , order total, gift vouchers .

 

Well, I've added this reply to help those lazy people like me that wanted to speed through the installing process and only read 1/2 of the manual. :) , so guys, don't be lazy, read the manual.

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Good night/day,

I'm having an issue with the way Tax is being calculated... I do not think that Tax should be a % of what the product price was *before* a Discount Coupon, but rather *after* the Discount Coupon is applied to the product. For instance, this is what is happening:

 

(Sort Order 1) Sub-Total: $599.00

(Sort Order 2) Discount Coupon (10offMAY): - $59.90

(Sort Order 3) IL Tax 6.50%: $38.94

(Sort Order 4) United Parcel Service (1 x 5.5lbs) (Ground): $5.44

(Sort Order 9) Total: $583.48

 

You'll note that the Tax is being calculated from the pre-Discount Coupon price ($599.00 * .065) to come up with $38.94

 

However; because I am giving a Discount Coupon on the product's price, I would have imagined the Tax would be calculated from the post-Discount Coupon price ($539.10 * .065) to come up with $35.04

 

Is there any way to set the Tax correct so that it is based on the post-Discount Coupon price? As a consumer, I would expect that. Thanks!

 

BoulderDash

 

 

* P.S. Of course, Authorize.net is charging the incorrect amount anyway (not subtracting the Discount Coupon in the first place), but I've seen some answer around pages 80-90. I'd like to get the Tax correctly functioning however. Let me know if anyone can lend a hand. :)

Link to comment
Share on other sites

I have a problem with the voucher amount not being reduced when part of it is used. I gave myself $25 in vouchers and used $16.60 to pay for an item. It showed nothing due as payment but it didn't change the balance in the shopping cart infobox. There's still $25 available.

 

Anyone know what might cause this?

Link to comment
Share on other sites

Hi, Strider:

 

I could use a little help. I'm writing (or at least trying to write) a payment module for Stormpay IPN utilizing the 3rd party cart feature (which itemizes product/qty/price). So far so good, untill I come to CCGV support.

 

I'm looking for a concise block of code to extract the coupon/gv info, much as is done in checkout_confirmation.php, so I can pass it on to Stormpay as individual line items. Oy! I've been all over your wonderful contribution (which I use extensivly), but with no success.

 

Any suggestions would be appreciated.

 

[email protected]

We have exactly same problem with the PayPal integration...

Please help.

Link to comment
Share on other sites

I just don't get it.

 

I have everything installed (did it manually, as there were already mods in some of the files.)

 

User1 purchased a $50 voucher. Admin approved it. User1 then sent it to User2.  So User2 gets the email, logs in and it shows Voucher Balance $50.00 in the cart. User2 adds a product to the cart and goes to checkout. Puts the Redeem Code in the clicks Redeem. Shows "Invalid Redeem Code" at top. If User2 is not logged on and clicks on the email link, it also shows "The Gift Voucher number may be invalid or has already been redeemed".

 

So what's going on? That's the only code in the coupons table!

 

Next: how should the link work if a customer is not already logged on? Shouldn't the customer first be prompted to logon and then it would show me the voucher balance?

 

And another question: how does a customer get back their redeem code if they lost their email. It doesn't appear anywhere in the account information.

 

Finally, a question that presumes that I can get this working. Where am I supposed to be prompted for how much of my voucher I want to apply to the order?

OK, I started from scratch. Mailed a $25 coupon to userb. Logged on with userb and entered the code. This time it took. But there was no opportunity to say how much of the voucher to apply. OK, no biggie, apply all $25. But wait, I decided that I want to buy something else before checking it out. Put the item in my cart, but now I see that the total has been reset as if the voucher never applied. Even worse, the redeem code is now invalid! The cart still shows "Voucher Balance $25.00". How do I get the voucher back?

 

It looks like there has been a TON of work put into this contrib, but if these are real flaws I can't see how anybody is using this in a production environment.

Link to comment
Share on other sites

Hello to all who are having difficulties with Credit Class and Authorize.net...this contribution will NOT work.

 

The discount isn't really being applied the way it should...if you check your database in the orders_total table, you'll see that the amount total is NOT a discounted amount. This is the number being sent to authorize.net. The problem is not with the authorize.net mod it is with the credit class mod.

 

If you continue to use the credit class mod with authorize.net, you'll end up having to contact every customer who uses a discount coupon in order to get their credit card number, delete the original order and place a new order. FRUSTRATING??!!! You bet!

 

I spent weeks investigating this, going through every forum, and it has been a problem since day one - one that has not yet been resolved. There are two workarounds that I've found, the first one was posted on the forum earlier (can't remember who, sorry! but it works).

 

Option (1) ------ Add a new item to your catalog with a negative amount that reflects the discounted total you want to apply. When placed in the shopping cart, it will be deducted from the overall order, appear correctly in the total amount in the orders_total table and go through to authorize.net at the correct amount.

.

Option (2) --Offer (2) checkout options - one using authorize.net for orders that are not discounted and the other using the basic credit card checkout, so you can capture the credit card number and submit the discounted total to authorize.net manually.

 

Since we'd already sent out hundreds of discount coupons with individual codes, I use the second option and it has worked fairly well. Just make sure you either split the cc info or delete the cc number from the db ASAP. Important security.

 

Looking forward the day when a real solution presents itself. Good luck and hope this helps! :)

Actually,

This Contribution does work with Authorize.net. The solution is posted in this forum by rpertiet on page 93.

 

I've just installed it and it works great.

BD

Link to comment
Share on other sites

Okay,

Earlier I had an issue whereby I didn't know how to get the Tax to recalculate *after* the discount had been taken from the Sub-Total, so that the Tax is based on the price of the Product after the Discount Coupon amount is subtracted. Simple enough:

 

Admin > Modules > Order Total > Discount Coupon > Re-calculate Tax: Standard

 

Though that seems to be the key, it's not actually calculating it correctly. Here's what I have when Re-calculate Tax is set to "None"

 

Sub-Total: $599.00

Discount Coupons: -$200.00

IL Tax 6.50%: $38.94

UPS: $5.44

Total: $443.38

 

You'll note that the IL Tax 6.50% is correct when not re-calculating (since $38.94 = $599.00 * .065).

 

 

However, here's what I have when Re-calculate Tax is set to "Standard"

 

Sub-Total: $599.00

Discount Coupons: -$200.00

IL Tax 6.50%: $25.03

UPS: $5.44

Total: $429.47

 

You'll note that the IL Tax 6.50% is INCORRECT when re-calculating (since $25.03 != $399.00 * .065). It should be $25.94.

 

 

Does anyone know why this may be happening? My IL Tax percentage (6.50%) does not change simply by switching Re-calculate Tax to "Standard". Of interest, $25.03 (the incorrect amount calculated) is 6.50% of $385.08. I am unsure how it arrives at that number when subtracting a Discount Coupon of $200.00 from $599.00.

 

It's been a long road to get to this last hurdle. If anyone can lend a hand, please give us a shout.

 

Thank you in advance,

BD

Link to comment
Share on other sites

How did I fix my problem above? Go here:

 

Admin > Modules > Order Total > Discount Coupon > Include Tax: True

 

 

But want to know what this breaks? See here:

 

Sub-Total: $599.00

Discount Coupons (10%offMAY): - $63.79

IL Tax 6.50%: $35.04

UPS: $5.44

Total: $575.69

 

 

It includes the tax in the 10% Discount... so instead of subtracting $59.90 (10% of $599.00), it subtracts $63.79 (10% of $599.00 + ($599.00 Sub-Total * .065 Tax)). I guess I asked it to include tax so that on FIXED AMOUNT discounts it would work, but now I cannot also use PERCENTAGE AMOUNT discounts.

 

Ah, well. This is the end of the line for me. Keep up the good work - and if someone knows how to use both FIXED AMOUNT and PERCENTAGE AMOUNT at the same time, please let me know.

 

Thanks,

BD

Link to comment
Share on other sites

One last question and I think I have ccgv nailed down and in place. What a complicated mod!

 

OK, when a customer has a GV balance greater than the purchase price of their current order, they are required to enter a CC number (I'm using the stock Authorize.net payment module) before they can get to the checkout confirmation screen. If I enter 4111111111111111 as the CC number then I get to the confirmation screen and everything looks just fine.

 

I checked on page 93 of this thread and all of the changes that Strider suggested in his post are already in my copy of the source (lastest download). I did try changing the sort order to put DC at 760 and GV at 740 but then the redeem checkbox doesn't show up.

 

Any ideas on this?

 

Thanks in advance for any help!

Link to comment
Share on other sites

Luchysoft: you need to get the 5.10b

 

gottaloveit: actually there is another discount program in the contribs that might work better for you. I don't remember the name, sorry.

 

[email protected]: since you are getting the products/qty/price you might look further in the order total and pull out the rest of the information which should include what you are looking for.

 

Zdub: the voucher balance should be xferred from the temp balance when a customer redeems it without being logged in, to the actual voucher balance when they login, seemlessly. If for some reason the customer redeems the voucher balance before being logged in and has to exit the voucher code is still good and is not applied to anything. In other words the next time they log in they can still use the voucher.

 

BoulderDash: if you want to recalc tax you have to select that option in the modules-order total - discount settings .. also the order that you want to have in your sort order requires that tax be before discount coupons and total after. I think if you will read the install html file in the contrib it should explain this.

 

cdi-buy.com: you don't have checkout_process coded correctly

 

CTAC: there is a bug in the regular way that the 2.2.2 release processes the order of occurrences within checkout_process. it is documented with a fix in the bugs portion 1649? or something like that. It explains the ordering and what should happen. If you think about how an order should be processed you should be able to figure it out. it is actually quite simple.

 

Zdub: if you have a voucher balance then all you do is tick the tick box to use it. it says it right there in front of you .. tick the box to use gift voucher

 

boulder_dash: I hate it when people put up quotes without reading further that 2 pages later the person that wrote the original comes back and says differently about their fix. but .. nevertheless ... if you will read the true and correct way to fix the problem you are encountering with authorizenet you will see it is in the order of the original 2.2.2 module and in bug report 1649 or something like that explains what the problem is. this is documented in about 20 posts in this forum.

 

darfsnuzal: you might look at your checkout_process file, it doesn't sound like it is correct.

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

Link to comment
Share on other sites

Hey Strider,

Thanks for the replies. You not only put a ton of time into the contribution, but you even follow up. Seriously, that's awesome :D .

 

One thing though:

 

boulder_dash: I hate it when people put up quotes without reading further that 2 pages later the person that wrote the original comes back and says differently about their fix. but .. nevertheless ... if you will read the true and correct way to fix the problem you are encountering with authorizenet you will see it is in the order of the original 2.2.2 module and in bug report 1649 or something like that explains what the problem is. this is documented in about 20 posts in this forum.

 

The original person I quoted still believed it wouldn't work, and I pointed her to a fix (even giving forum page number containing the code AND the information about bug report 1649). What can you "hate" about my trying to help someone out? Again, I didn't just quote her and say "phht" - I gave her information which helped me correct my Authorize.net issue. Also, with so many ideas on how to fix Authorize.net (and reading the forum you yourself will see that several people have opined on both sides of it being the Authorize.net module; some saying it's CCGV some saying it's Authorize.net) how am I supposed to know which one is "true and correct"? In any case, the fix I gave her worked for me... whether it's the chosen way to do it or not.

 

Again, thanks for the time.

BD

Link to comment
Share on other sites

Zdub: the voucher balance should be xferred from the temp balance when a customer redeems it without being logged in, to the actual voucher balance when they login, seemlessly. If for some reason the customer redeems the voucher balance before being logged in and has to exit the voucher code is still good and is not applied to anything. In other words the next time they log in they can still use the voucher.

 

Zdub: if you have a voucher balance then all you do is tick the tick box to use it. it says it right there in front of you .. tick the box to use gift voucher

WHAT tick box? The cart box shows that I have $25, and I can send it, but I don't see anything anyplace except for the redeem code box during checkout, which gives me an invalid code (as discussed earlier). I MUST be missing something here!

Link to comment
Share on other sites

"WHAT tick box?", I said. Something is obviously missing. Traced through the code, found the call in order_total.php to the function use_credit_amount() in ot_gv.php.

 

Basically, the $output_string is not showing the line Tick to use Gift Voucher account balance -> with the checkbox.

 

So I played with the code a bit, and found that it shows up if I echo $output_string just after the line

 

$output_string .= $selection_string;

 

line in the credit_selection section.

 

But it seems to be disappearing in the loop

 

while (list(, $value) = each($this->modules))

 

The first iteration of the loops sets the Tick... etc line. The second, sets the Enter Redeem Code section, but the Tick line is gone by the second iteration.

 

Any ideas?

Link to comment
Share on other sites

Zdub: your sort order really needs to be like it is shown in the installation doc...

 

cdi-buy.com: just use the checkout_process.php that comes with the contrib and it will fix your problem..

 

BoulderDash: I apologize. people are always trying to give the wrong fix to correct something .. like negative prices if you use authorize net. etc... and I have to try and correct them before anyone else sees things like that.. and I don't always have a chance to. Have you ever noticed that people don't read except what they want to? you don't fix ecommerce stuff half way you have to fix it right... or at least that is what I think and try to do ....

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

Link to comment
Share on other sites

Is there anyway to exclude specific products from the discounts?

 

I have a shop that sells some VERY rare items and don't want to give ANY discount on these items. About 90% of our stock is OK to discount but this little 10% is not. It will take FOREVER to update certificates to say 90% of my stock is OK to discount.

 

Anyone know?

Link to comment
Share on other sites

Zdub: your sort order really needs to be like it is shown in the installation doc...

It is.

 

Sub-total - Sort order = 1

Shipping - Sort order = 2

Tax - Sort order = 3

Gift Voucher - Sort order = 9

Discount Coupons - Sort Order =740

Total - Sort Order = 900

 

jon

Link to comment
Share on other sites

Strider,

I agree with you 100%... again, thanks for the effort :D ! You'd made me think twice about my giving the true and correct fix, but I think I did based on what the results were for me and the bug report mentioned in the response I pointed out (should anyone also need to have Authorize.net fixed).

 

See ya!

BD

Link to comment
Share on other sites

Hello,

 

I have this contribution running smoothly now and just need one thing done. Does anyone know where I would go in the code to change it so that when the customer enters a coupon code in the redeem box and clicks redeem it will stay on the checkout_payment.php page instead of going to the checkout_confirmation.php page allowing them to still change their payment oprions. I have customers that are taken a little off guard when they click redeem and are suddenly taken to the confirmation page. The reason I want to do this is because I set up the checkout_payment.php page to show a subtotal of the orders and everything. So that this will allow the customer to see their order total with the coupon before continuing to the checkout_confirmation.php page.

 

Thanks,

 

JT

Anyone have an answer to this for me?

 

Thanks

Link to comment
Share on other sites

darfsnuzal: you might look at your checkout_process file, it doesn't sound like it is correct.

Strider: Thanks for the tip. I checked the checkout_process.php file and it is identical to the same file in your contribution package. In fact, I installed the contribution by copying your files directly into my source tree. To be real sure, I ran diff against the contribution file you provided and the file in my source tree and diff reported no differences.

 

Also, I'm using the following sort orders:

 

subtotal 1

shipping 2

tax 3

dc 740

gv 760

total 900

 

I had DC at 740 and GV at 9 like the installation instructions indicate, but tried this combination according to a post I read in this thread.

 

The only other contributions I have installed are User Tracking and Shipping in Cart neither of which modify any of the files used by CCGV.

 

No matter what I do, the system still asks for a CC number when the GV balance > checkout total. :blink:

 

Any other ideas? Maybe sort order problems? Authorize.net module issues?

 

Thanks in advance for the help!

Edited by darfsnuzal
Link to comment
Share on other sites

I had DC at 740 and GV at 9 like the installation instructions indicate, but tried this combination according to a post I read in this thread.

Opps, I mean DC = 9 and GV = 740. :(

Link to comment
Share on other sites

To enable the Gift Voucher, go to your admin->modules->order_total->Gift Vouchers and choose to install it. On a default system there should be a button with a green cross and the words install. Click that.

 

To enable the Discount Coupon, go to your admin->modules->order_total->Discount Coupons and choose to install it. On a default system there should be a button with a green cross and the words install. Click that.

 

I dont have either of these in my admin?????????? Now what can I do.???

 

The install went fine, no errors, yet.. But I dont have the above mentioned modules?

 

Thanks

Tammy

Link to comment
Share on other sites

Ok, i'm becoming crazy...

 

- Above all, there was an error in the code.

In the catalog/invludes/classes/order_total.php file

below the line

if ( ($use_credit_string !='' ) || ($selection_string != '') ) {
             $output_string .=  '<tr colspan="4"><td colspan="4" width="100%">'

the $output_string variable has an assignment operator (=) and not an adding operator (.=) so the checkbox was not visible in the html output.

 

Anyway, now the checkbox appears

checkbox.jpg

In this way a user can use gift voucher himself bought, after administrator redeemed it.

But if i click or i don't click on the checkbox, the resul is always the same. The gift voucher is processed anyway.

 

- Second problem, i bought an object and go to the checkout_confirmation.php page. I use together a coupon with 10% discount and a gift voucher of 25? i bought and now use. This the result:

totali.jpg

I bought only one object of 107.94 ? (tax included).

Shipping is 0.00?

Tax is 10.67?, but this is only for seeing, the object i purchased cost includes itself taxation.

The gift voucher value i've to use is 25? (but cannot i choose how much should i use of my gv account?)

The coupons value is 10%

 

The correct values should be:

Sub-Total: 107.94 (tax,included)

Shipping: 0.00

Tax: 17.99 (only to make it see to the costumer, it is just included in the sub-total)

Gift Voucher: 25.00

Discount coupons: 8.29 --> (107.94 - 25)*0.1

Total 74.65

 

What is wrong?

 

The right checkout without gv and coupon should be:

totali_corretti.jpg

 

- The popup for the coupon help appears but don't open:

carrello.jpg

 

Help me with these problem, i found this tool wonderful and i wold to use it.

 

Thanks

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...