TransWikia.com

Error filtering template: Notice: Undefined variable: pro_price in

Magento Asked by Ganesh on November 27, 2021

Error filtering template: Notice: Undefined variable: pro_price in
/Magento_Catalog/templates/product/widget/new/content/categories_shop.phtml on line 112

i’m getting this error even if comments or remove pro_price variable.
code where i’m getting this error ,its comes after deleting most of the products from catalog. before this was working fine. any suggestion?
this small code from file

$type = 'widget-new-grid';
$categoryProducts = $category1->getProductCollection()->addAttributeToSelect('*');                             
foreach ($categoryProducts as $product) {
     $pro_price=$block->getProductPriceHtml($product, $type);
}

One Answer

thanks for reply robin. i got the problem and solved it. my client deleted some virtual products ,magento 2 creates virtual products or simple product with creation of configurable product. it store the price configurable product in virtual or simple product. so mistake was he need to delete configurable product and its virtual products too. when he deleted virtual product which carry configurable product price in it so there will be no price for that configurable product . so i got the error.

Answered by Ganesh on November 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP