Hello All.
I am using virtuemart 3.0.9 and joomla 3.4.1. My problem is that I need two price label one for product with child product and one for product with no child product. If the product has child product then I have to show label "Price From" insted of sales price and if product has no child then label should be default "Sales price".
I know I have to put condition in prices.php files to check if product has child product or not. but I don't know programming.
please help me.
thanks
J3.4.1 is famously insecure.. did you not see the publicity?
VM3.0.9 is a test release .. the current stable is 3.0.12
I know I have to put condition in prices.php files to check if product has child product or not. but I don't know programming.
if($product->product_parent_id > 0 ) {
//do something
}
will tell you if it is a child
Hello GJC,
Thanks for your reply but I dont want to check procduct is child or not. i need to check one product has child or not.
thanks
there is a function in products.php
* @return bool True if there are child products, false if there are no child products
*/
public function checkChildProducts ($product_ids) {
so something like
$productmodel = VmModel::getModel ('product');
$haschild = $productmodel->checkChildProducts ($this->product->virtuemart_product_id);
might work