Hi!
Ive modified my views so the products can be added to cart from virtuemart and category views.
But i would like that products with child products, or with custom fields to display "Details" button instead of "Add to cart".
Ive tried with
if($product->customsChilds){
echo "<p>has child</p>";
}
else{
echo "<p>no child</p>";
}
and
if($product->customfieldsCart){
echo "<p>has custom fields</p>";
}
else{
echo "<p>no custom fields</p>";
}
With no luck, as some of my products has childs or custom fields but this still show no child/custom fields :(
Is there any other way to check if product has custom fields of childs?
Thanks!
Any ideas?
No mention of any versions.....
It works with code from first post, although i was having some strange problem. I deleted the item and created again and now works fine.
It was using stockable variant.