VirtueMart Forum

VirtueMart 2 + 3 => Templating & Layouts => Topic started by: EvanGR on April 12, 2021, 13:23:35 pm

Title: Related Products: canonical category id for each?
Post by: EvanGR on April 12, 2021, 13:23:35 pm
Hello,

In the related products section (product details page), I want the following information for each product: canonical category id

And it would be nice to have: product id, canonical category name

I probably need to customize VM core file to include this data in each related. Anyone can point me to which file/code to look for?

Thanks
Title: Re: Related Products: canonical category id for each?
Post by: pinochico on April 12, 2021, 14:05:34 pm
Why?

JSitemap is not enough with standard core VM canonical category id?
Title: Re: Related Products: canonical category id for each?
Post by: EvanGR on April 12, 2021, 14:37:13 pm
You misunderstood me :)

I want to customize the Related Products section (the section below the main product).
Title: Re: Related Products: canonical category id for each?
Post by: pinochico on April 12, 2021, 15:15:11 pm
product id, canonical category name

you can add in model related products (models is basic file for mysql select).
Of course, maybe this only load next basic model product, I don't know exactly now, because for related product we don't use core code, but we use modul VM product extended.
Title: Re: Related Products: canonical category id for each?
Post by: elestudiodeandres on May 09, 2021, 07:57:14 am
I can't insert a canonical category ID for each category, anyone?
Title: Re: Related Products: canonical category id for each?
Post by: pinochico on May 09, 2021, 09:25:45 am
Quote
I want to customize the Related Products section (the section below the main product).

I think you have to edit:

components/com_virtuemart/sublayouts/customfield.php
components/com_virtuemart/sublayouts/customfields.php
components/com_virtuemart/sublayouts/related.php

or create override in your template.

Maybe you have to change next called core function (model product...)