Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Discount Coupon Codes


kgt

Recommended Posts

I've translated the text labels on the 3 pages, but in the checkout confirmation page the text "Discount Coupon 12345 applied:" stays in English?

I though this was the small portion of

catalog / includes / languages / english / modules / order_total / ot_discount_coupon.php thatw as used to create that text?

 

gijs

OK, my fault, found that one 5 minutes later...

but another problem, and I've seen it mentioned, but I don't get the logic:

I create a DCC worth 10 EURO

I apply it, and on the confirmation it shows as a 9.56 E discount

I do show prices incl 21% Belgian VAT

but how does it get to 9.56?

 

g

Link to comment
Share on other sites

Test credit card numbers no longer working. Seems to be a new problem directly following the installation of Discount Coupon Codes 3.0.

Anyone else having the same problem?

 

Here is the error I am getting:

 

Credit Card Error!

The first four digits of the number entered are: 4111. If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.

 

This contribution is exactly what I needed and is easy enough to set up... That said... I wish I could run a test!

 

Thanks for your help.

-B

Link to comment
Share on other sites

I have the same problem using the paypal ipn 2.2 and even tried your updated version the only way i can get it to work is to aggregrate it.

 

 

Using ANY discount contribution with Paypal requires using the aggregate paypal cart. Itemized will not work. This is a limitation of Paypal, so there's nothing I can do to get around it.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Test credit card numbers no longer working. Seems to be a new problem directly following the installation of Discount Coupon Codes 3.0.

Anyone else having the same problem?

 

Here is the error I am getting:

 

Credit Card Error!

The first four digits of the number entered are: 4111. If that number is correct, we do not accept that type of credit card. If it is wrong, please try again.

 

This contribution is exactly what I needed and is easy enough to set up... That said... I wish I could run a test!

 

Thanks for your help.

-B

 

This contribution doesn't affect anything that should be able to cause this. Ask for help on the general forums. I suspect this error appearing after you installed DCC is just coincidence.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

OK, my fault, found that one 5 minutes later...

but another problem, and I've seen it mentioned, but I don't get the logic:

I create a DCC worth 10 EURO

I apply it, and on the confirmation it shows as a 9.56 E discount

I do show prices incl 21% Belgian VAT

but how does it get to 9.56?

 

g

 

 

The error may be caused by prices displaying with tax. Can you enable debugging in Modules > Order Total > Discount Coupons? Once you have done that, proceed to create the above order. When you get to the confirmation screen, View Source in your browser (Usually Edit > View Source or something similar) and email me the information that appears between:

 

<!-- Discount Coupons DEBUG

and

End Discount Coupons DEBUG-->

 

Be sure to set the module back to non-debug mode after you have done this.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

I've read the common errors and know I am suppose to make sure I properly modified ***File1***, but public_html/includes/languages/english/modules/order_total/checkout_payment.php does not exist in my files or in the contribution.

 

Nor should it. Did you upload checkout_payment.php to includes/modules/order_total? If you see one in there, it's not supposed to be there.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

This contribution doesn't affect anything that should be able to cause this. Ask for help on the general forums. I suspect this error appearing after you installed DCC is just coincidence.

 

Figured it out. Your right... nothing to do with DCC.

Link to comment
Share on other sites

Hello kgt,

 

Your coupon module is awesome. Yet, could you provide it in the form a patch-like .diff file ? That would be much easier to install, than manually editing/creating all the files.

 

Thanks!

Link to comment
Share on other sites

Your coupon module is awesome. Yet, could you provide it in the form a patch-like .diff file ? That would be much easier to install, than manually editing/creating all the files.

 

If you'd like a diff file, you can create one yourself by comparing the provided files to the source. Most store owners wouldn't know what to do with a diff, so I'd rather avoid the headache.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

For those of you also running Separate Pricing Per Customer on your store, I've just uploaded an Add-On to Discount Coupon Codes v3 to allow you to exclude customer groups from using coupons :thumbsup:

~Tracy
 

Link to comment
Share on other sites

Hi there!! I have 2 problems reagrding the upgrade from 2.1 to 3.0!

 

- first at the checking_confirmation.php I have this

Sub-Total: 5.00EUR

Shipping with TNT Dutch Post (Normal Shipping): 1.35EUR

Discount Coupon QLYKQVVXPEP 6.35EUR applied: -6.35EUR

Total: 6.35EUR

I can't figure out why the disocunt is not taken in account in the total...

 

- 2nd problem is that if I use a 100% discount it's only applied before taxes... I did install the 2 ptaches that were published afte rthe release of the 3.0 version but it seems I still miss something...

 

any idea?

thanks a lot in advance!

Link to comment
Share on other sites

Hi,

 

Thanks for this cointribution! I had V2.1 i think working great at home, anyway I have tried installing V3 onto a live store but I can't get the Debug output to work when i turn it on via admin. I looked at the 'view source' on checkout confirmation but can't find anything with 'debug' information? Any ideas?

 

The reason i wanted the debug info is that I show the product prices including TAX in the store and tried the most recent bugfix version of discount_coupon but it doesn't give the right values for TAX,sub total or Total, I reverted back to the one packaged with V3 and that gives the correct overall total but only gives the correct TAX and sub total ex TAX breakdowns when I have 'subtract discount from sub total' set to true in admin. I have got an extra order total module that shows a 'sub-total ex TAX' as the original sub-total always gave the total including VAT, it's OK as it is I just wondered if there is a reason for this?

 

i also had (I think someone has talked about this a couple of pages back) a scenario when it sent me back to the cart after trying a coupon code where I think the order total hadn't reached the min value associated with the code, but once in the cart I could not proceed back to checkout at all?

 

Many Thanks again

 

becki

Link to comment
Share on other sites

Hi there!! I have 2 problems reagrding the upgrade from 2.1 to 3.0!

 

- first at the checking_confirmation.php I have this

 

I can't figure out why the disocunt is not taken in account in the total...

 

- 2nd problem is that if I use a 100% discount it's only applied before taxes... I did install the 2 ptaches that were published afte rthe release of the 3.0 version but it seems I still miss something...

 

any idea?

thanks a lot in advance!

 

 

What other contributions do you have installed?

 

Discounts are applied before tax. Always have been.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

Hi,

 

Thanks for this cointribution! I had V2.1 i think working great at home, anyway I have tried installing V3 onto a live store but I can't get the Debug output to work when i turn it on via admin. I looked at the 'view source' on checkout confirmation but can't find anything with 'debug' information? Any ideas?

 

The reason i wanted the debug info is that I show the product prices including TAX in the store and tried the most recent bugfix version of discount_coupon but it doesn't give the right values for TAX,sub total or Total, I reverted back to the one packaged with V3 and that gives the correct overall total but only gives the correct TAX and sub total ex TAX breakdowns when I have 'subtract discount from sub total' set to true in admin. I have got an extra order total module that shows a 'sub-total ex TAX' as the original sub-total always gave the total including VAT, it's OK as it is I just wondered if there is a reason for this?

 

i also had (I think someone has talked about this a couple of pages back) a scenario when it sent me back to the cart after trying a coupon code where I think the order total hadn't reached the min value associated with the code, but once in the cart I could not proceed back to checkout at all?

 

Many Thanks again

 

becki

 

For the debug - make sure you made the changes to checkout_confirmation.php.

 

For the order total lines, please include examples of what you're getting and what you expect. It's difficult to interpret what exactly you're saying is wrong there. I'm just not following very well.

 

As far as the cart issue - do you have a minimum order requirement contribution?

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

For the debug - make sure you made the changes to checkout_confirmation.php.

 

For the order total lines, please include examples of what you're getting and what you expect. It's difficult to interpret what exactly you're saying is wrong there. I'm just not following very well.

 

As far as the cart issue - do you have a minimum order requirement contribution?

 

Hi,

 

I've pretty sure i made all the changes, i just tried the file bundled with the contribution and that didn't make the debug work either?

 

I do have a min order contrib installed but was pretty sure I was above my limit for that. But I've just come accross it again actually, I had enough order value to get past my min value check so got to checkout, put in the coupon and instead of getting a error message on checkout process i get taken back to the cart (is this because the orde-total would have been changed with the discount), even by bumping up the value of the cart i can't get back to the checkout?

 

On a new issue I tried a fixed discount of £3.00, it comes up on the checkout page as 3.22? (this is with the discount_coupon bundled with V3.)

 

Discount Coupon J48PDU of £3.00 applied: -£3.22

Sub-Total Excl.: £20.72

VAT: £3.63

Sub-Total: £24.35

Flat Rate (Best Way): £3.50

Total: £27.85

When i have a product total of 11.97 the £3.00 turned into £3.32, when i had £15.96 it turned into £3.37?

 

Also how does the minimum order value work as a order total price. I had some items in the cart that added up to a sub-total of £19.98 (£17.00exVAT @17.5%) and had a coupon min order set to £19.00 - this worked. I change the coupon min value to £19.01 and it doesn't allow me to use it? The grand total with the discount should be £21.48 inc postage. I can't see where £19.00 comes into it?

I thought maybe it rounded up to the nearest pound so I tried another one. This time an order total inc VAT of £27.97 (£25.51 exVAT) should give a grand total with discount of £30.47 after postage. I tried £28.50 which worked but £28.60 didn't so the cut-off point was somewhere in between?

What does it check the min order total against?

 

In relation to my previous question regarding the seamingly wrong breakdown of costs (I know one problem at a time!).

Using the discount_coupon that came with V3 (not the latest bugfix)

With 'Display subtotal with applied discount?' set to true:

(total of products = £19.98)

Discount Coupon 6C82FA of 10% applied: -£2.00

Sub-Total Excl.: £15.30

VAT: £2.68

Sub-Total: £17.98

Flat Rate (Best Way): £3.50

Total: £21.48

Values seem corrrect for a discount of 10% (my TAX is 17.5%)

 

Now with 'Display subtotal with applied discount?' set to false:

(total of products = £16.17)

Sub-Total Excl.: £14.00

VAT: £2.17

Sub-Total: £16.17

Discount Coupon 6C82FA of 10% applied: -£1.62

Flat Rate (Best Way): £3.50

Total: £18.05

 

The grand total is correct but the VAT and sub-total Excl. are wrong. VAT should be £2.41. (£2.17 is actually 15.5% of £14.00)

It seems all to work when 'Display subtotal with applied discount?' is set to true which is fine I just don't know why it's not working when set to false. it seems the sub_total ex VAT is dividing the product of 16.17 total by 1.155 to give 14.00 and then the VAT is 16.17-14.00.

 

 

When I was using the new discount_coupons bugfix version the grand total was always wrong by several tens of pence. I can't think straight anymore so I'm going to go home :) Any help/infomation would be greatly appreciated.

 

Hope you can follow all this-i've been at it all day!

 

Many Thanks

 

Becki

Link to comment
Share on other sites

What other contributions do you have installed?

 

Discounts are applied before tax. Always have been.

 

Ok point 2 is irrelevant then...

 

back to point 1 then

I didnt alter the checkout process was itself. However I added some contribution as payment module (EU bank transfer) and shipping (mtmz).

Other contribution are related to the checkout process so I guess they should interfer with this process right?

 

Thanks for the super fast reply BTW!

Link to comment
Share on other sites

Hi, this seems to be a great contribution, but I keep getting this strange error.

 

https://www.myurl.com/checkout_payment.php?...rt+are+excluded.

 

I have coupon set for $10 off an order of $75. It looks like something is wrong with computation and it's wanting %2475.00?

 

Any help will be appreciated.

 

It's cutting off the url, but the error message says:

The+minimum+order+total+for+this+coupon+is+%2475.00.+Some+or+all+of+the+products+in+your+cart+are+excluded

Link to comment
Share on other sites

Thanks! That worked like a charm. :thumbsup:

 

I may have some answers too. When I first installed this contribution I couldn't create coupons either. It had something to do with the field values not being received. I changed all insert and update values in coupons.php to $_POST[""] values and then everything worked.

 

example

 

tep_db_input($coupons_description) . "', '" .
tep_db_input($coupons_discount_percent) ."', " .

 

to

 

tep_db_input($_POST["coupons_description"]) . "', '" .
tep_db_input($_POST["coupons_discount_percent"]) ."', " .

 

Hi, what file is this change for? I need to fix this right away!

 

I installed this contrib and I get

Sub-Total: $220.75

Discount: May coupon applied: -$10.00

Standard (First-Class Mail): $6.00

Total: $226.75

 

And not $216.75

 

Besides this I didn't have any other errors. Since this customer paid with a credit card I'm able to run the corrected total.

 

Thanks for the contrib and any advice in advance

~Sharon

Link to comment
Share on other sites

Hallo

 

thanks for this contribution I think this contribution is exactly what I need :)

 

I have some already installed some contributions (ipn v2.2, downloadcontroller.)

 

I have looked the packages and seen that there are several versions. to avoid a mistake I want to be sure before I start to edit my files.

should I install

Discount Coupon Codes 3.0 (I think this is a full package)

and I sould correct this bugfix Discount Coupon Codes 3.0 checkout_process bugfix

 

and besides them replace the includes/modules/payment/paypal_ipn.php file with in (Paypal IPN v 2.2)

 

is this true?

 

thanks a lot

Link to comment
Share on other sites

Hello again

 

I dindn't get any answer and therefore I have tried it and it works :) but I have some questions

 

1) if a coupon has Number Available = 1. customer write this coupon code in checkout_payment page and then is forwarded to checkout_confirmation page at this time the coupon information is written in discount_coupons_to_orders table (which is used to check whether the coupon is still available to use - if coupon entity in this table < number available then this copuon can be used.) and if at this time customer can buy something before he press to confirm order button. but in this case he can not use this coupon because it is already written in the table. (even if customer don't use it yet)

 

is this a bug? should we take insert table part in checkout_confirmation page? do I think something wrong?

 

2) I use paypal_ipn 2.2 and I have tried the both code (one of them is in contribution page added by kqt) and as following

 

//kgt - discount coupons

if( tep_session_is_registered( 'coupon' ) && $order->info['coupon'] != '' ) {

$sql_data_array = array( 'coupons_id' => $order->info['coupon'],

'orders_id' => $insert_id );

tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );

}

//end kgt - discount coupons

 

 

but in the readme file of Discount Coupon Codes 3.0 version there is something else

 

ADD this code after:

 

//kgt - discount coupons

if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) {

$sql_data_array = array( 'coupons_id' => $order->coupon->code,

'orders_id' => $insert_id );

tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );

}

//end kgt - discount coupons

 

I have tried the both of them but in any case the coupon information didn't write in the discount_orders table and then I have tried it with the following code

 

//kgt - discount coupons

if( tep_session_is_registered( 'coupon' ) && is_object( $order->coupon ) ) {

$sql_data_array = array( 'coupons_id' => $order->coupon->coupon['coupons_id'],

'orders_id' => $insert_id );

tep_db_perform( TABLE_DISCOUNT_COUPONS_TO_ORDERS, $sql_data_array );

}

//end kgt - discount coupons

 

 

and it works. can anybody check this failures give me a feedback??

 

many thanks

 

best regards

Link to comment
Share on other sites

I just installed this contib and it works up to checkout_confirmation.php.

 

It shows the coupon being applied with the correct discount, but after clicking the confirm order button the order finishes properly, but the order is does not have the discount applied so my customer gets charged the full amout of the order.

 

I am using paypal website payments pro.

 

For some reason, when it submits and completes the order, it loses the discount and they are charged the full amount.

 

What could I have missed?

 

Thanks,

Brian

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...