News:

Support the VirtueMart project and become a member

Main Menu

VM 3 template

Started by roman5527, March 31, 2015, 02:07:43 AM

Previous topic - Next topic

roman5527

Hello,
How can I have different views on the products homepage and category? thank you


roman5527

Yes.
I have problem with sublayouts .

I have copy default.php from component/com_virtuemart/view/virtuemart/tmp/default.php

to templates/mytemplate/html/com_virtuemart/virtuemart/ and rename it to frontpage.php

Next I select in configuration VM option : Layout title page to my frontpage.php

In frontpage.php I change code : echo $this->renderVmSubLayout($this->productsLayout,array('products'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$products_per_row,'showRating'=>$this->showRating)); //$this->loadTemplate('products');

to

echo $this->renderVmSubLayout($this->productsLayout,array('products_frontpage'=>$this->products,'currency'=>$this->currency,'products_per_row'=>$products_per_row,'showRating'=>$this->showRating)); //$this->loadTemplate('products');

I have created file product_frontpage.php in templates/mytemplate/html/com_virtuemart/sublayouts/ .

But now I dont see featured-view , latest-view, ...
What am I doing wrong?
thnaks