Author Topic: Choosing custom fields to show on category page SOLVED  (Read 258 times)

nebojsa

  • Beginner
  • *
  • Posts: 32
Choosing custom fields to show on category page SOLVED
« on: August 28, 2020, 10:53:01 am »
Hi everyone,

Is there a way to show specific custom fields on category view?
I would like to show related products on category view page.

In previous version of Virtuemart I had to add separate function in shop.browse.php and call that function from category view.
Virtuemart has changed a lot since first versions and I cannot find appropriate files for various functions.

So far I was only able to find how to display addtocart with customfields on category page.
Code: [Select]
<?php echo shopFunctionsF::renderVmSubLayout('addtocart',array('product'=>$product,'rowHeights'=>$rowsHeight[$row], 'position' => array('ontop''addtocart'))); ?>
Thank you in advance.

Joomla! 3.9.20
VirtueMart 3.8.4 10335
Using commercial theme template

nebojsa

  • Beginner
  • *
  • Posts: 32
Re: Choosing custom fields to show on category page
« Reply #1 on: August 30, 2020, 17:33:30 pm »
Still more questions than answers on this forum :(

In case anyone need it, rendering functions for category page is different than on product details page:
So if you want to show related products on category page, here it is:

Code: [Select]
<?php echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$product'position'=>'related_products''class'=> 'product-related-products','customTitle' => true));?>

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 643
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Choosing custom fields to show on category page SOLVED
« Reply #2 on: August 30, 2020, 19:52:31 pm »
Related products are set for each product separately.
This is the right idea to display related products correctly == is always related to the product and not to the whole category.

Thank you for the information, but I will not use this solution.

And if the owner of the e-shop convinced me that he wanted it (but not really, because the owner of the e-shop does not understand how to make an e-shop), then I would use the Related Products Module (which show products by specific customfiiled) for the category and not this solution.
Module with JS Slideshow, maybe a couple of modules inside tabs...
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates