Showing results for 
Search instead for 
Did you mean: 

M2.1.1 Indexing using Changelog - Tax calc problem


M2.1.1 Indexing using Changelog - Tax calc problem

Using Magento 2.1.1 on Centos with MySQL 5.7


All working fine except a problem when trying to add VAT to products - set indexes to On Save at first to check all Tax settings correct.  Saving the product causes the price to be displayed correctly on the Product page with and without VAT.


However, when changing the indexing to be On Schedule I can see that changes to the product pricing via the API for example are causing the catalog_product_changelog to have multiple entries (or a single entry) for the entity_id(s).  I then would expect the reindexing to run and prpocess each of the entities and they woudl then all display with and without tax correctly.  I have the cron job set up to run every minute and I have checked that the jobs are scheduled correctly - indexer_reindex_all_invalid and indexer_update_all_views. 


As the index is not invalid (by design as I am using On Schedule) I expect no change due to this - I am not sure what the all_views does but hoped that this would genereate all the new VAT pricing etc.  The index does run (and I have also run it manually) and it finished with no erorrs but a completion time of 00:00:01 or 00:00:00 which for 1000+ products seems a little quick!


The after an hour, the changelog cleaner runs and deletes all the entries in the product_catalog_price_cl and nothing has changed.


Can anyone suggest what I am doing wrong or if there is something I need to set somewhere?  There doesnt appear to be very clear info on the indexers and how they work end-to-end.  I need to have a custom importer to handle the sheer volume of product and changes - I wanted to be able to then kick a reindex to update those that have changed - the cl table holds the right records/entoty_ids but the indexer jsut seems to do nothing Smiley Sad


Re: M2.1.1 Indexing using Changelog - Tax calc problem

Turns out that the Catalog_product_price_index had a corruption which impacted the tax_code_id column data - hence M2 couldnt calculate the tax and just used the base price!  corrected table and all is well.


Please close.