Jump to content

Recommended Posts

7 minutes ago, raiwa said:

, explain what exact fails and let me know which EDGE version (download date, commit) you are using.

 

Share this post


Link to post
Share on other sites
1 hour ago, LeeFoster said:

Actually I think this is just me expecting the header to be bold and not an actual issue.

👍

Share this post


Link to post
Share on other sites

Hi @raiwa , @Tsimi
I have an issue that when discount amount higher then product price , it not shown the right total amount,
and here  the sort order for order total modules
 image.thumb.png.82142b7832744f13c73a32190ca6205e.png

here an example .. 
discount amount 50€ , but  it show 39€ same as product price  and it not show the tax this happens when discount amount higher then product price

image.thumb.png.19b9be970f64e13e88949ead176b3163.png

do you have any idea why this happened?
Br
Omar


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
27 minutes ago, Omar_one said:

Hi @raiwa , @Tsimi
I have an issue that when discount amount higher then product price , it not shown the right total amount,
and here  the sort order for order total modules
 image.thumb.png.82142b7832744f13c73a32190ca6205e.png

here an example .. 
discount amount 50€ , but  it show 39€ same as product price  and it not show the tax this happens when discount amount higher then product price

image.thumb.png.19b9be970f64e13e88949ead176b3163.png

do you have any idea why this happened?
Br
Omar

What did you want to deduct the extra 11.00 from?

Dan

Share this post


Link to post
Share on other sites
Posted (edited)

Hello Omar @Omar_one,

The fact that it aplies only 39€ is correct as it's supposed you will not "pay" to the customer the difference of 11 €. It is coded like this, max discount is always order subtotal.

The tax is not shown as there is zero subtotal ergo tax is also zero.

What is wrong is the negative total. It should be 8€, shipping is not included in discount.  I checked the code and it seems there is a bug inherit since time.

Please change the fillowing in the ot_discount.php module:

Find line 208-212:

                  if (!empty($order_tax)) {
                    $order->info['tax'] = $order_tax;
                  } else {
                    $order->info['total'] -= $discount;
                  }

and change to:

                  if (!empty($order_tax)) {
                    $order->info['tax'] = $order_tax;
                  }

Please confirm and I'll upload this fix.

Edited by raiwa

Share this post


Link to post
Share on other sites

Hello @Dan Cole
as you see that order amount  -31€  but its not right


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
1 minute ago, raiwa said:

What is wrong is the negative total. It should be 8€, shipping is not included in discount.  I checked the code and it seems there is a bug inherit since time.

 

 you right it should be 8€.. and bank payment it was right it show  8€ but on admin and shopside show wrong


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
4 minutes ago, Omar_one said:

as you see that order amount  -31€  but its not right

Sorry I thought you were suggesting it should be minus 11€.

Dan

Share this post


Link to post
Share on other sites
12 minutes ago, raiwa said:

Hello Omar @Omar_one,

The fact that it aplies only 39€ is correct as it's supposed you will not "pay" to the customer the difference of 11 €. It is coded like this, max discount is always order subtotal.

The tax is not shown as there is zero subtotal ergo tax is also zero.

What is wrong is the negative total. It should be 8€, shipping is not included in discount.  I checked the code and it seems there is a bug inherit since time.

Please change the fillowing in the ot_discount.php module:

Find line 208-212:


                  if (!empty($order_tax)) {
                    $order->info['tax'] = $order_tax;
                  } else {
                    $order->info['total'] -= $discount;
                  }

and change to:


                  if (!empty($order_tax)) {
                    $order->info['tax'] = $order_tax;
                  }

Please confirm and I'll upload this fix.

that fix it ,,
Thank you @raiwa


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
Posted (edited)

@raiwa the Number of Use  field not working .. so if I set the discount for one customer but discount code working more then ones!!

Edited by Omar_one

Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
Posted (edited)

@Omar_one,

I just checked and all works like expected for me.

1. discount limited to 1 use in: "Number of use" box => let's me use the discount for one order per customer

2. discount limited to one customer selected in "Customers" list => lets only use the discount for this concrete customer (more than one is possible)

  • Which did you use and what exact happens.
  • Which exact Discount Code BS version are you using
 

 

 

Edited by raiwa

Share this post


Link to post
Share on other sites
Posted (edited)
20 minutes ago, Omar_one said:

@raiwa the Number of Use  field not working .. so if I set the discount for one customer but discount code working more then ones!!

I read again and I believe you tried with different customers, it says " for one customer, "

Edited by raiwa

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, raiwa said:

I read again and I believe you tried with different customers, it says " for one customer, "

thank you @raiwa  I thought it's  mean the discount code will used just one time then will not be active.
I  tried with different customers :)

 

Edited by Omar_one

Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
Posted (edited)

Update uploaded with the above fix:

Discount Code 5.1.1. Phoenix

For CE Phoenix 1.0.x.x (At least up to 1.0.2.x.)

Please apply this fix also to previous versions. (replace only ot_discount.php module)

Older versions, FROZEN, EDGE and Gold BS3, please use Discount_Codes_4.4.3_BS

Version 5.1.1 Phoenix Changes:
- Fix for negative order total showing if fixed amount discount is bigger than order subtotal. Thanks to @Omar_one for the report and testing

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwa

hi Rainer,

I wanted to download and install this addon, but am confused as to which version to get. I have BS Edge with BS3.

Several of the more recent releases say, " Older versions, FROZEN, EDGE and Gold BS3, please use Discount_Codes_4.4.3_BS"

However, there is no 4.4.3 BS,.. there is 4.4.2 BS and then there are 3 newer releases after that starting with 5.0.0.

So, I assume I need the 4.4.2 BS? ..and then,.. do I need to manually transfer some of the newer changes from the 3 later releases?

 


osCommerce: made for programmers, ...because store owners do not want to be programmers.

https://trends.google.com/trends/explore?date=all&geo=US&q=oscommerce

Share this post


Link to post
Share on other sites
4 hours ago, Demitry said:

So, I assume I need the 4.4.2 BS? ..and then,.. do I need to manually transfer some of the newer changes from the 3 later releases?

Yes, there is a typo, use 4.4.2 and the ot_discount.php included in 5.1.1:

On 8/18/2019 at 6:09 PM, raiwa said:

Please apply this fix also to previous versions. (replace only ot_discount.php module) 

 

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

×