Multiple storeview pricing: Reindex and di:compile error on Magento 2.2.3 and lower

Created by Katie Bui, Modified on Tue, 17 Dec, 2019 at 4:10 PM by Katie Bui


When installing v2.1.5 Multiple storeview pricing on Magento 2.2.0 - 2.2.3 , we encountered the error:

Module 'Bss_MultiStoreViewPricingPriceIndexer':
Installing schema... SQLSTATE[23000]: Integrity constraint violation: 1022 Can't write; duplicate key in table 'catalog_product_index_price_store', query was: CREATE TABLE IF NOT EXISTS `catalog_product_index_price_store`

How can we fix it?


Please do the following steps: 

Step 1: Install the 2.1.5 version for M2.2.x CE

Step 2: On Magento 2.2.4 (on which we develop the extension), there is a class: app/code/Bss/MultiStoreViewPricingCatalogRule/Model/Indexer/IndexBuilder.php:39:use Magento\CatalogRule\Model\Indexer\IndexerTableSwapperInterface, but Magento 

2.2.3 and lower do not have, so we should move Indexer folder of v2.1.1 (attached) to this folder of the site: /home/[sitename]/public_html/app/code/Bss/MultiStoreViewPricingCatalogRule/Model/Indexer

Step 3: Add this folder to app/code

If you need further assistance, please don't hesitate to contact us.

Please visit our site for more useful Magento 2 Extensions:

Attachments (1)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article