VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Studio 42 on June 10, 2015, 02:28:54 AM

Title: bug : unpublished related product
Post by: Studio 42 on June 10, 2015, 02:28:54 AM
hi,
When you unpublish a related product, the related customfield is set but $customfield->display is empty because
$related = $pModel->getProduct((int)$customfield->customfield_value,TRUE,$customfield->wPrice,TRUE,1);
return nothing in customfields model line 1156 in vm 3.0.9.
I think this must be unset when the related product is not published.
changing line 1158
if(!$related) {
break;
}

to
if(!$related) {
unset($customfields[$k]);
break;
}

work for me.

see attached for bug screenshot
Greets,
Patrick
Title: Re: bug : unpublished related product
Post by: Milbo on June 11, 2015, 23:27:44 PM
thx,

fix is now included here http://dev.virtuemart.net/projects/virtuemart/files vm3.0.9.4