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

nebojsa

  • Beginner
  • *
  • Posts: 36
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: 36
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: 819
    • 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

nebojsa

  • Beginner
  • *
  • Posts: 36
Re: Choosing custom fields to show on category page SOLVED
« Reply #3 on: October 25, 2020, 10:59:14 am »
What module exactly you are talking about?
I am a shop owner and I have a product which use spare part which I would like to show on category page along with products. For example - a grinding machines which uses grinding stones - and I want buyers to see grinding stones machine use so they can find and replace easily.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 819
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Choosing custom fields to show on category page SOLVED
« Reply #4 on: October 25, 2020, 11:51:31 am »
For this solution you don't need https://www.minijoomla.org/extensions/virtuemart-extensions/related-products-extended-for-virtuemart, but you can set up a separate category for grinding stones and use core module VirtueMart Product and set up this category and put this module bottom or above products from category a grinding machine.

But if you want, you can use Related Products Extended for Virtuemart for other reasons.
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

nebojsa

  • Beginner
  • *
  • Posts: 36
Re: Choosing custom fields to show on category page SOLVED
« Reply #5 on: October 25, 2020, 15:40:13 pm »
I still don't understand what do you see wrong in my solution?
If you make separate module position then it will not look easy and simple for the visitors.
http://www.gravex.rs/en/naslovna/1-pecati-i-stambilji/2-standardni.
Check out my old website and see what I mean.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 819
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: Choosing custom fields to show on category page SOLVED
« Reply #6 on: October 25, 2020, 17:39:43 pm »
Your solutions are perfect, thanks.
If you have 20 products in category and for every product have 20 related products, then you show 400 products, isn't right?

But I use even so module, better for me, admin and all :)
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

nebojsa

  • Beginner
  • *
  • Posts: 36
Re: Choosing custom fields to show on category page SOLVED
« Reply #7 on: November 03, 2020, 23:41:41 pm »
If I want to show 400 related products on category page that's my personal thing.
On the other hand ...
Modules, modules, modules ... and after some time those modules start loosing support, it turns out they are full of security issues and I am left all alone to deal with it.
No thanks to more modules on my website, sorry.