Jump to content

PrestaShop™ 1.5.4.1 Problem with Specific price


Recommended Posts

Hi Nemo1,

I do not know why this specific price is calculating .20 less.

This is the result of subtraction of 2 prices without tax.

 

I want to set a Discount:

$5.60 - $3.30 = $2.30

Look at Sliding scale pricing and you will see the Discount is $ -2.10 which is wrong.

 

I am attaching 2 screen shots and that can explain the issue.

Thank you.

post-154019-0-94540200-1367288801_thumb.png

post-154019-0-59343400-1367288982_thumb.png

Edited by bruce-rez (see edit history)
Link to comment
Share on other sites

Good Morning,

 

Perhaps the screen shot is a bad one but it does not show the conversion rate as "1" it shows the ID as "1"

 

To set the default currency you need to go to Localization > Localization > then set the default from the drop down box.

 

This, of course, is only if your screenshot is not good

 

Paul

Edited by perfumeskunk (see edit history)
Link to comment
Share on other sites

The problem is with the specific price reduction when using amount, the discount is applied after the tax and even that seems to be calculating wrong.

See my forge report here.

http://forge.prestashop.com/browse/PSCFV-8996

 

This has been this way since I can remember, I have posted about this before and never really got anywhere so I use percentage or just enter the new price.

I can not imagine the thought behind applying the discount after tax, the discount should be applied then the tax, what happens it that the amount discount is applied after tax then that amount is taxed again.

In my case tax is 6% and I have a product at $100 and apply a discount of $10 the new price with discount is 90.57 and the tax is 5.43.

Can not figure this out where the .57 comes from, and the extra 3 cents is due to tax now being applied to the $90.57 total, if the discount was applied after tax the price should be $96.

If you use a percentage to discount the product the price shows correct $100-10%=90 tax=5.40.

 

If you look at an installation of 1.4 it actually states if set to amount tax is included, I guess they changed the wording but not the function.

Link to comment
Share on other sites

tdr170,

 

Actually tax can be applied correctly either way. Just because something is discounted, it does not automatically discount the taxes on an item. Think mail in rebate. As far as book keeping purposes go, either is correct, but that being said, there should be a choice.

Link to comment
Share on other sites

Well all I can say to that is read the statement discount is applied after tax.

It does not say discount is applied after tax but only to the reduced rate.

If the discount is applied to the cost and not the cost+tax why have the statement.

Either way it does not calculate correctly.

 

Mail in rebates do not apply to this as on the day you received the mail in rebate you still paid tax on what you spent that day, and in my opinion why they do mail in rebates, think of the lost revenue just on the taxes alone. (can you say loop hole)

 

There is no reason for a choice, discounts should be applied to the cost and then tax to that, simple.

 

But all good banter and food for thought. :)

Link to comment
Share on other sites

I had this problem in PS 1.4.9.1 and razaro help me out.

http://www.prestasho...r/45807-razaro/

 

Maybe this could be applied to PS 1.5.4.1

 

 

This is to fix adding tax to discount price:

 

Two changes.

 

First one is in AdminProducts.php which is in admin/tabs folder, line 1688.

 

 

  return ($specificPrice['reduction_type'] == 'amount') ? ($price - $specificPrice['reduction'] / (1 + $taxRate / 100)) : ($price - Tools::ps_round($price * $specificPrice['reduction'], 2));

 

should be changed to

 

 

  return ($specificPrice['reduction_type'] == 'amount') ? ($price - $specificPrice['reduction'] ) : ($price - Tools::ps_round($price * $specificPrice['reduction'], 2));

 

 

Second change is in Product.php in classes folder, line 1865

 

 

   $reduc = Tools::ps_round(!$use_tax ? $reduction_amount / (1 + $tax_rate / 100) : $reduction_amount, $decimals);

 

 

should be changed to

 

   $reduc = Tools::ps_round($reduction_amount, $decimals);

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

 

In Theme product.js

 

I removed,

 

var tax = (taxRate / 100) + 1;

 

And changed

 

  if (!displayPrice && !noTaxForThisProduct)
 {
  var productPrice = taxExclPrice;
  if (specific_price)
productPriceWithoutReduction = ps_round(productPriceWithoutReduction, 2);
 }
 else
 {
  var productPrice = ps_round(taxExclPrice, 2);
  if (specific_price)
productPriceWithoutReduction = ps_round(productPriceWithoutReduction, 2);
 }

 

 

To this,

 

 

  var productPrice = ps_round(taxExclPrice, 2);
 if (specific_price)
  productPriceWithoutReduction = ps_round(productPriceWithoutReduction, 2);

 

 

I also changed

 

  if (!noTaxForThisProduct)
  var productPricePretaxed = productPrice;
 else
  var productPricePretaxed = productPrice;

 

 

to this,

 

 var productPricePretaxed = productPrice;

  • Like 1
Link to comment
Share on other sites

Hi bruce-rez, could you test one thing. Make sure to turn off all taxes and try it out, see if it calculates correctly.

 

Ok, I disabled the tax in BO and I placed an order of 50 in quantity and the Discount (specific price) is calculated correctly.

 

But I will definitely need to enable the tax for my store.

Please see the screen shots.

post-154019-0-01361600-1367376371_thumb.png

post-154019-0-08596300-1367376392_thumb.png

Link to comment
Share on other sites

I had this problem in PS 1.4.9.1 and razaro help me out.

http://www.prestasho...r/45807-razaro/

 

Maybe this could be applied to PS 1.5.4.1

 

 

 

 

I was able to apply this to my actual online store which is a 1.4 site and works wonderfully.

I was never able to use amount reduction in that site either because of the tax applied before discount issue.

I wish I could update to a 1.5 site but the new way of setting up tax rules makes it next to impossible to set up county surtax.

Anyway great job and thanks for sharing.

Edited by tdr170 (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

i'm using prestashop 1.5.3.1 and i have problems with specific price. when i set specific price a product, the price doesnt change. it used to be ok, now it failed to change the price based on my setting. please help. Ive been trying to solve this problem since months ago.. and now i 'm stuck. i cant run promotion due to that problem.. pls help. tq

Link to comment
Share on other sites

fitri musa,

I am using the v 1.5.4.1 and I set (the specific price ) to percentage and it works fine.

I know it would be better,in my case, to use amount discount instead of percentage discount but as you can read this topic, it looks like a bug. So my suggestion is just try the percentage discount and you will see.

Link to comment
Share on other sites

×
×
  • Create New...