Jump to content
Latest News: (loading..)

Recommended Posts

Hello @raiwa yes I'm using Discount Code BS 4.4.0, but my osCommerce stills 2.3.4 (Don't know if that can be related - but it's almost up to date as https://github.com/gburton/Responsive-osCommerce because I've made a few core modifications...).

The discounts works fine just can get the "Number of products" working.. I tried like 1 product but 3 quantity but also 3 different products from categories but didn't work.

Check the attachments

checkout.png

discounts.png

admin.png

Share this post


Link to post
Share on other sites

Also I've one main category.. subcategories also selected didn't work.. I've been trying everything but can't work. Any discount normal for one customer or for all working fine.

Share this post


Link to post
Share on other sites

Sorry, it works for me, I can't give you advice other than continue trying.

You could check in the database if the categories are correct registered.

And please, it would be helpful to see the complete checkout confirmation page with products listed.

Share this post


Link to post
Share on other sites

Running into an issue with currencies where the discount percentage is only working correctly if applied to the default currency. One of my stores default currency is in Thai Baht, but when customers try and use the code in their local currency (JPN, EU, USD, etc) then the discount isn't calculating correctly. "Discount Codes 4.1 BS" is the code that's currently being used on the store, but all the changes between there and the current "4.4.0 BS" drop doesn't seem to have addressed anything currency related, mostly tax based changes it looks like.

Seems to be related to % discount codes, as that's the only reproducible case that the store has been able to find a consistent reproducible case for thus far.

discount_code-4.jpg

discount_code-3.jpg

discount_code-2.jpg

discount_code-1.jpg

Edited by mattsc

Share this post


Link to post
Share on other sites

Hello Matt @mattsc,

I just checked on my test store and all works as it should.
Discount code shouldn't interfere at all in currency conversion as this is done independant in each ot module via currency class on the output. All discount calculations are done in the default currency.

I cant see the discount amounts in your screenshot.
Can you post it bigger, maybe only the order totals and please post a screenshot of your currency setup in admin.

rgds

Rainer

Share this post


Link to post
Share on other sites
11 hours ago, raiwa said:

Hello Matt @mattsc,

I just checked on my test store and all works as it should.
Discount code shouldn't interfere at all in currency conversion as this is done independant in each ot module via currency class on the output. All discount calculations are done in the default currency.

I cant see the discount amounts in your screenshot.
Can you post it bigger, maybe only the order totals and please post a screenshot of your currency setup in admin.

rgds

Rainer

OK, more details! I was able to experiment some, and have determined it's only happening in the following situation:

1) Other than default currency
2) Only for a specific SKU / Product(s)

The discount % is working fine in the default currency, which in this case is Thai Baht.

The problem is when the customer has used an other than default currency, such as USD or Euro, as demonstrated below.

The discount amounts in the screenshots in Thai Baht are the correct amount, which is setup for the SKU for part number BPCF-5102. The Baht price is ฿3,876. The 25% coupon works and is calculating a discount of ฿969. All is working fine.

image.thumb.png.7eba504617e647698078c6316f52f78f.png

Then, change the currency to USD. The USD price is $121.50. The coupon is calculating a discount of $0.95. Wrong answer.

image.thumb.png.c7bb3cee35e188f7ddbeb60078da1060.png

It SHOULD be coming up with a discount of $30.38. I'm not sure how it's coming up with $0.95, but that's clearly not 25% of $121.50.

It's not limited to just USD, as it's coming up with the wrong answer for the additional "other than default" currency. Here we can see it's getting the wrong answer for EURO as well:

image.thumb.png.425666edca8cae2f7426bf6f2a2c4e39.png

...where a €106.36EURO part price is getting a -€0.73EURO discounted amount, so it's seems to only be working correctly for the default currency.

The stores default currency is in Thai Baht / THB with a value of 1.00. The USD currency exchange rate is  0.03134758.

Currencies.thumb.png.bf51ffd00f21f1179520c53b5c0b4c00.png 

So it's specific to an Other than Default currency, and only when the discount is limited to a specific product.

The discount is being applied to a specific product vs an order sub-total:

Doesn't work:

image.png.bd60e2f4d51cfde04e9a742381e17e0b.png

Works, but isn't limited to a specific product(s) vs using Order Sub-Total:

image.png.e7dfc9e41266437667be14de4c97f8d8.png

Which is showing the correctly calculated currency discount amount:

image.thumb.png.957bef32d5771149852730e7bc2c22e5.png

 

image.png

Share this post


Link to post
Share on other sites

Hello Matt @mattsc,

I could reproduce the problem now for product discounts. Thank you! This seems to be a inherit problem since the older discount code versions on which this version is based on.

Please try the following updated Order Total (ot_discount.php) version 4.4.1. BS:

ot_discount.php

I checked with:

- display price with tax: false
- display price with tax: true
- order subtotal discount
- product discount
- category discount

Please try and let me know. I'll then upload the update

@Tsimi, can you please also give it a try if you find some time.

 

Best regards
Rainer

Share this post


Link to post
Share on other sites
On 1/16/2019 at 4:58 AM, raiwa said:

Hello Matt @mattsc,

I could reproduce the problem now for product discounts. Thank you! This seems to be a inherit problem since the older discount code versions on which this version is based on.

Please try the following updated Order Total (ot_discount.php) version 4.4.1. BS:

ot_discount.php

I checked with:
- display price with tax: false
- display price with tax: true
- order subtotal discount
- product discount
- category discount

I've verified the fix works for me. I have verified verified as working when an "other than default" currency is used:
Expected discount to be applied:
- Product discount with %
- Product discount with set amount
- Category discount with %
- Order Sub-Total with %
- Order Sub-Total with set amount

As well as the Null conditions of where no discount should be applied:
- Discount code which is expired
- Discount code which does not apply to Order Total
- Discount code for Category which does not apply to cart contents

I basically dropped the proposed 4.4.1 variant over my 4.1.0 version, and all seems to be working well. It's not exactly a rigorous set of tests, but a diff between the versions looked like it would have been safe to drop over in place, and seems to be good. I say push the change. :)

image.thumb.png.655dde5bd89a98f46dfb1d9848c9f2db.png

 

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

×