VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: neo314 on December 03, 2012, 02:50:48 AM

Title: Override based on child products
Post by: neo314 on December 03, 2012, 02:50:48 AM
Hi all,

I want to override show price and add to cart area based on whether the product has child products. There does not seem to be a property or function of the product object that indicates if the product has child products. The best I can do is see that parent products have a price of 0.000 and test for the products price in the template overrides.

Can anyone offer the best way to test for child products? Do I need to pull a query from the database to get the information (match products that have this product as a parent), or is there a simpler way using an object already created in VM?

Thanks