简体   繁体   中英

how to separate views on the same page in virtuemart productdetails and related products

I have a page productdetails.php and it below shows related product i want to put some condition for related products,but since the view is same the changes i add to related products also get reflect to product details page

like I want to show radio buttons for product details price and select list for related products any help?

Try this,

In your layout pages (any page inside productdetails/tmpl ) the related products variable is available $this->product->customfieldsRelatedProducts so you can simply check like.

if(sizeof($this->product->customfieldsRelatedProducts) >0){

   // the current viewing product have related products
}else{
  //the current product have no related products
}

Hope it helps..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM