I am getting the few product IDs collection using the code

$collection = \Magento\Framework\App\ObjectManager::getInstance()->create('Magento\Catalog\Model\ResourceModel\Product\Collection')->addIdFilter($product_ids)->setStore($this->_storeModelStoreManagerInterface->getStore())->addStoreFilter()->addAttributeToSelect($this->getUsedMagentoAttributes())->setStoreId($this->_storeModelStoreManagerInterface->getStore()->getId());

And for getting the start price of configurable product, I am using the code as

$parent->getPriceInfo()->getPrice('final_price')->getAmount() ->getValue(\Magento\Tax\Pricing\Adjustment::ADJUSTMENT_CODE);   

This works when there is only one store.

But If I put the above price getting code in the multi-website loop while using the collection, I am not able to get the right prices for all the stores.

  • FYI - this code works in 2.0 but not in 2.1 – Tejas Vyas Dec 27 '17 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.