News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Change related sublayout (multiple sublayouts for related products)

Started by Kuubs, July 23, 2019, 11:31:22 AM

Previous topic - Next topic

Kuubs

Hello,

I am making a website in Virtuemart but I am stuck in regarding the related products. I have this setup in my cart popup, but I also want to add these related products to my product details page. The thing that bothers me is that there is 1 file that has the code for the related products (related.php in sublayouts). But I need to change the code for the productdetails page, it's different from the padded.php. How can I load in the other related file? I don't see any option in the line of code that adds the related products:

echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'related_products','class'=> 'product-related-products','customTitle' => true ));

Anyone knows how to fix this?

Studio 42

You have https://shop.st42.fr/en/products/extra-product.htm.
See demo https://pro.st42.fr/en/demo/extra-product/extra-product-demo.html
You have 2 different layouts to show as related products (and 4 for addtocart) and this can be override in your templates.