Jump to content

Importing Products With Tax Included from CSV not working


Recommended Posts

Hey everybody, I'm having some trouble with importing CSV files.

 

When I select "Price (Tax included)" on the drop down box for my price tax included and import the CSV, Prestashop ignores that I've selected price (tax included) and does it as if it is calculating base price. Hence all my prices increase by 10%.

 

Does anyone have any idea why Prestashop is doing this?

 

Oddly enough, it only started occurring yesterday.

 

Edit: Ended up using base prices

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

  • 9 months later...
  • 1 year later...

It's now 2016 and the issue seems to be still there. If someone is still have problems, read further...

 

For some reason a new product defaults to using the tax group with ID = 1.

 

I was able to import my products with tax-included prices by doing the following:

- Disable all tax rules

- Select "Price (Tax excluded)" for the import.

 

The logic seems a bit counter-intuitive, but this way the price being imported is used and the product price without taxes, since there are no tax rules, the same value ends up in the retail price with tax.

 

Edit because of post #4:

Yes, but only during the import.

Edited by savedario (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 3 months later...
  • 3 years later...

Hello guys I was having the same issue and checking the code I saw that the problem was I did not have defined my shop address in the correct country (Spain in my case), after that, the import worked.

 

The code on AdminImportController.php in line 1703 (prestashop version 1.7.6.5):

if ((int) $product->id_tax_rules_group != 0) {
            if (Validate::isLoadedObject(new TaxRulesGroup($product->id_tax_rules_group))) {
                $address = $this->context->shop->getAddress();
                $tax_manager = TaxManagerFactory::getManager($address, $product->id_tax_rules_group);
                $product_tax_calculator = $tax_manager->getTaxCalculator();
                $product->tax_rate = $product_tax_calculator->getTotalRate();
            } else {
                $this->addProductWarning(
                    'id_tax_rules_group',
                    $product->id_tax_rules_group,
                    $this->trans('Unknown tax rule group ID. You need to create a group with this ID first.', array(), 'Admin.Advparameters.Notification')
                );
            }
        }

I hope it can help you!

Link to comment
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
×
×
  • Create New...