×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: bejoy balan
Added: Apr 27, 2022 6:05 AM
Views: 10
  1. <?php
  2.  
  3.  
  4. use Magento\Framework\App\Bootstrap;
  5. require '/var/www/bludot/app/bootstrap.php';
  6.  
  7. $bootstrap = Bootstrap::create(BP, $_SERVER);
  8.  
  9. $objectManager = $bootstrap->getObjectManager();
  10.  
  11. $state = $objectManager->get('Magento\Framework\App\State');
  12. $state->setAreaCode('frontend');
  13.  
  14. $priceIndexProcessor = $objectManager->get('Magento\Catalog\Model\Indexer\Product\Price\Processor');
  15. $priceIndexProcessor->reindexList(['126712']);