News:

Looking for documentation? Take a look on our wiki

Main Menu

Rendersublayout not working when getting products via model

Started by Kuubs, January 25, 2021, 12:00:12 PM

Previous topic - Next topic

Kuubs

I have a very strange problem. It seems that the rendersublayout is not really working well. For some custom fields. For example the prices rendersublayout does work, but my own custom field is not working. Here is the code I use to get the products:

$productModel = VmModel::getModel('Product');
$productsChildren = array();
$productsChildren['products'] = $productModel->getProductListing(false, false, true, true, false, true, $child->virtuemart_category_id, false, 0);
$productModel->addImages($productsChildren['products']);

echo shopFunctionsF::renderVmSubLayout('products-cat',array('products'=>$productsChildren,'currency'=>$this->currency,'products_per_row'=>$this->perRow,'showRating'=>$this->showRating));


Anyone has any idea why it's not working?

This is an override  for the webshop page I have, I get these products from every category to also show the products from the child categories.. But for some strange reason the layout is not rendered for 2 of my custom fields.