VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: twinforce on August 18, 2016, 17:10:46 PM

Title: Link to manufacturer category
Post by: twinforce on August 18, 2016, 17:10:46 PM
Hi,

Hope I put this question in the right section, I read all the instructions and advises, and couldn't find another more suitable. I also searched the forums for this, and although there are at least 2 posts about this, one is related to a module development and doesn't really apply to my situation, and the other one hasn't been answered.

I would like a way to link to a manufacturer category, so in the resulting view I only see on the front end the manufacturers that are included in that section, not a list of all manufacturers (which is what the Manufacturer Default Layout link type does). It seems like the sorting by category is only a backend functionality in Virtuemart. I managed to kind of use it on the front end creating an external URL link in the menu that looks like this:

     index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturercategories_id=2

Problem is that when I activate Search Engine Friendly URLs, in Global configuration, the link is transformed into this and doesn't work:

   my.site.com/index.php/component/virtuemart/?virtuemart_manufacturercategories_id=2&Itemid=713

So I deactivated the search friendly URLs. My question is, is there a better way to do this? Why isn't this observed in the VirtueMart standar fucntionality?

Thanks in advance for your help.
Title: Re: Link to manufacturer category
Post by: GJC Web Design on August 18, 2016, 18:09:29 PM
the link I think should be something like

index.php?option=com_virtuemart&virtuemart_manufacturer_id=107&view=category&virtuemart_category_id=0

this should SEF OK
Title: Re: Link to manufacturer category
Post by: twinforce on August 18, 2016, 19:04:42 PM
Thanks for your help GJC, but I don't seem to be able to make it work.

I used your sintax, replacing IDs by my own existing ID (putting the manufacturer category ID in virtuemart_category_id), and I get a 404 page error and this friendly URL:

     http://my.website.com/index.php/component/virtuemart/manufacturer/manufacturer-alias?Itemid=712

I don't know where the ItemId=712 comes from, but it is added by the system.

Am I doing something wrong?

Kind regards.
Title: Re: Link to manufacturer category
Post by: GJC Web Design on August 18, 2016, 22:12:59 PM
Quote(putting the manufacturer category ID in virtuemart_category_id)

why?  it need to be 0 .. i.e. show all cats

the manu id goes in the virtuemart_manufacturer_id

the Itemid will be the base VM menu id
Title: Re: Link to manufacturer category
Post by: Studio 42 on August 19, 2016, 14:03:36 PM
Hi twinforce,
I mean the solution given by GJC, do not work, because you need only list of manufacturers.
TO have a friendly URL, it's not possible without Virtuemart hack and for a customer, i had to add a specific view and modified the router.php to add manufactuter filtered by category.
Title: Re: Link to manufacturer category
Post by: GJC Web Design on August 19, 2016, 14:50:53 PM
but here is a sef url to all products from viking-kayaks

https://www.escape-watersports.co.uk/viking-kayaks/manufacturer/viking-kayaks

the non sef is 

https://www.escape-watersports.co.uk/index.php?Itemid=545&option=com_virtuemart&limitstart=0&limit=int&virtuemart_manufacturer_id=95&view=category&virtuemart_category_id=0

this is VM2.6  -- but am in the process of upgrading and on the test J3/VM3

on this

index.php?Itemid=545&option=com_virtuemart&limitstart=0&limit=int&virtuemart_manufacturer_id=95&view=category&virtuemart_category_id=0

gives

shop/manufacturer/viking-kayaks and works..
Title: Re: Link to manufacturer category
Post by: Studio 42 on August 19, 2016, 16:25:03 PM
Hi,
he dont want link for  index.php?Itemid=545&option=com_virtuemart&virtuemart_manufacturer_id=95&view=category&virtuemart_category_id=0

but for  index.php?Itemid=545&option=com_virtuemart&view=manufacturer&virtuemart_manufacturercategories_id=2
to display the list of manufacturers filtered by manufacturer category.
Here an example : https://ongallery.com/en/all-artists
The letters A-Z are manufacturer categories, and this render is not possible in VM without code changes
Title: Re: Link to manufacturer category
Post by: GJC Web Design on August 19, 2016, 16:26:28 PM
Ahhhhhhhhhhhh.........
Title: Re: Link to manufacturer category
Post by: ClaudioRomeo on October 14, 2016, 09:17:36 AM
Probably it's a stupid question, but what does
Itemid=545
mean?
It sounds to me (but I'm not a developer) like a product ID. But, if so, why is it here?
Title: Re: Link to manufacturer category
Post by: Ghost on October 14, 2016, 11:22:45 AM
Quote from: ClaudioRomeo on October 14, 2016, 09:17:36 AM
Probably it's a stupid question, but what does
Itemid=545
mean?
It sounds to me (but I'm not a developer) like a product ID. But, if so, why is it here?
Itemid is the ID of menu item.
Title: Re: Link to manufacturer category
Post by: ClaudioRomeo on October 14, 2016, 14:41:06 PM
Thank you, Ghost.
Title: Re: Link to manufacturer category
Post by: ClaudioRomeo on October 14, 2016, 15:03:37 PM
So, I tested what twinforce reported:
QuoteI managed to kind of use it on the front end creating an external URL link in the menu that looks like this:

     index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturercategories_id=2

Problem is that when I activate Search Engine Friendly URLs, in Global configuration, the link is transformed into this and doesn't work:

   my.site.com/index.php/component/virtuemart/?virtuemart_manufacturercategories_id=2&Itemid=713

So I deactivated the search friendly URLs. My question is, is there a better way to do this? Why isn't this observed in the VirtueMart standar fucntionality?
But my URL with SEF rewriting activated, doesn't change and everything works well.
The URL I built is
http://testvmm.testsrp.it/index.php/it/?option=com_virtuemart&view=manufacturer&virtuemart_manufacturercategories_id=3
and shows two manufacturers correctly.
I can't figure out why twinforce's URL changes.