PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

[MOD] Tax on a separate line + Attribute price impact exculding tax.

80 replies to this topic
#1
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
I have made these fixes before for version 1.0 and 1.1 http://www.prestasho..._discussion/tax (which I sent to about 100 people) but they were a part of a separate project I did, and included some unrelated changes.

I have just redone these changes for Prestashop 1.2.3 and included a documentation file which details all the changes made to all files (15 total), so they can be copied to previous and future versions of 1.2.

These changes display the tax in a separate line in the side shopping cart, as well as the email confirmation sent to the user.

It also changes the Attribute price change to be pre-tax (rather than post-tax).

You can check it out on my test server http://presto-changeo.com/123/ tax is set for Europe, and the attribute price impact can be seen on http://presto-change...hp?id_product=7

http://www.presto-ch.../15-taxman.html

New version just released, Supports for PS1.3 and tax changes also for the mail alert module

New version just released, includes modified files for PS1.3.2

Attached Files


Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#2
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
P.S
It can easily be copied to other themes..
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#3
Patric Codron

    PrestaShop Superstar

  • PrestaTeam
  • 9152 posts
Topics merged.
Patric CodronCommunity Manager | Manager de CommunautéPrestaShop

Posted Image Merci de respecter les règles du forum PrestaShop.com :)
Posted Image Please comply with the PrestaShop.com forum rules :)

#4
harleybill

    PrestaShop Apprentice

  • Members
  • PipPip
  • 37 posts
Best $20 I've ever spent.
Works great, Simple instructions Excellent support.

Thanks Tomer,
Harley Bill :coolgrin:
http://spaparts1.com

#5
gbaby

    PrestaShop Apprentice

  • Members
  • PipPip
  • 92 posts
Tomer,

Thank you for your excellent mod. It works on all pages in my front office but in my back office I'm getting this error:

an error occurred while updating object product (Unknown column 'price_nt' in 'field list')

It occurs when I update products in my catalog (see screenshot). I'm using Version 1.1 and you sent me the files Sept 11th. Any ideas?

Attached Files

  • Attached File  error.jpg   105bytes   3193 downloads


#6
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
As I wrote in the email I sent, a new column need to be added to the ps_product table.
You can run this command in mysql "ALTER TABLE ps_product ADD price_nt DECIMAL( 13, 6 ) NOT NULL DEFAULT '0.000000'"
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#7
harleybill

    PrestaShop Apprentice

  • Members
  • PipPip
  • 37 posts
gbaby,
The 1.2 version does not use the sql change and is much easier to implement.
If you have any plans to upgrade to PS 1.2 The $20 is well spent for the new version from Tomer.
Harley Bill :coolgrin:
http://spaparts1.com

#8
gbaby

    PrestaShop Apprentice

  • Members
  • PipPip
  • 92 posts
Thank you for mentioning that, I've fixed the error above. It's working everywhere except on my home page, specials page, new products page, and the product pages of sale items.

I'm using a theme "Creativeshop" which makes everything more tricky. But I'm hoping you could point out the code that I need to look for in these files to modify.

Thanks so much! Once this is up & running, I'll definitely donate PP Tomer!

ETA. Pages that are functioning properly with Taxman are product, cart, and category.

#9
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
gbaby, as I mentioned in that post, that mod was just taken from a project that I did, and included some specific changes to the shop.
That is why I was just giving it away.

If you wish to customize it for 1.1 and don't have a programmer, send me an email.

For version 1.2 I made the tax changes on a clean copy of prestashop, and included full documentation.
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#10
axiomx11

    PrestaShop Newbie

  • Members
  • Pip
  • 2 posts
Respect that you've written this thing, any chance we can make it an official part of prestashop someday? Perhaps some sort of collective purchase to release your code under an open license?

#11
Yoda

    PrestaShop Apprentice

  • Members
  • PipPip
  • 96 posts

From 1253324770:

gbaby, as I mentioned in that post, that mod was just taken from a project that I did, and included some specific changes to the shop.
That is why I was just giving it away.

If you wish to customize it for 1.1 and don't have a programmer, send me an email.

For version 1.2 I made the tax changes on a clean copy of prestashop, and included full documentation.


Hi I am trying to understand how I can benefit from this module. I won't mind to pay $20 if it can help my shop. The 1.2 comes with the separate tax display on the product page and order page. So what is the different between your module and the official prestashop function?

#12
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
It displays the tax on a separate line in the shopping cart block (on the right side).
It changes the attribute price impact to exclude tax rather than include tax (which saves you time calculating it, or having to change them all if there's a tax change).
It displays the tax in a separate line in the email confirmation.
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#13
Yoda

    PrestaShop Apprentice

  • Members
  • PipPip
  • 96 posts
Thanks for the reply. Is this a module? Or do I have to replace 15 files? My shop is heavily modified, by replacing files, it will mess up my codes....

$20 is a good price for a module. Thank you for the work.

#14
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts

From 1255366818:

Thanks for the reply. Is this a module? Or do I have to replace 15 files? My shop is heavily modified, by replacing files, it will mess up my codes....

$20 is a good price for a module. Thank you for the work.


It is not a module, but rather modification to the existing files.

I have included a very detailed documentation, the specifies what line numbers were changed in each file (and what their purpose).

This makes it very easy to copy to an already modified shop.
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#15
gbaby

    PrestaShop Apprentice

  • Members
  • PipPip
  • 92 posts
Thanks to Tomer for this great mod! It works great for Canada taxes. :)

Tomer, I have one product that need to be tax exempt? My taxes are set up at 12% for BC (state) and 5% (state) for the rest of Canada. I've tried a bunch of things and nothing's working so far. Any ideas?

#16
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
I'm on vacation this week :)
Send me an email with an example, I'll take a look when I get back...
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#17
gbaby

    PrestaShop Apprentice

  • Members
  • PipPip
  • 92 posts
I've been trying a million things this morning to try and make it work with a tax exempt item. Is it even possible? It always add taxes since the taxes are calculated of state tax not product tax.

This is what I need: http://www.prestasho...te_that_has_tax

#18
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
Everything is possible....
I have a bit of a hard time figuring out the diagram, it would be easier if I had an example of a product it happens on.
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#19
gbaby

    PrestaShop Apprentice

  • Members
  • PipPip
  • 92 posts
My taxes are set-up as calculated on state tax. So I can't figure out how to have an item (product) that is completely tax exempt. If I set up the product as no tax there's still tax as it's calculated for the customer's state.

In my province (BC) all children's clothing and shoes, and most food items, are tax exempt so I know this definitely need a solution.

#20
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
Try this, I have done very little testing on it....

Change classes/Cart.php line #579 from:
$price = floatval(Product::getPriceStatic(intval($product['id_product']), $withTaxes, intval($product['id_product_attribute']), 6, NULL, false, true, $product['quantity']));


To;

$price = floatval(Product::getPriceStatic(intval($product['id_product']), $withTaxes, intval($product['id_product_attribute']), 6, NULL, false, true, $product['quantity'],true));

Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...