VirtueMart Forum

VirtueMart 2 + 3 + 4 => 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: pinochico on May 09, 2021, 09:25:45 AM
QuoteI 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...)