News:

Looking for documentation? Take a look on our wiki

Main Menu

Link to manufacturer category

Started by twinforce, August 18, 2016, 17:10:46 PM

Previous topic - Next topic

twinforce

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.

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

twinforce

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.

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

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.

GJC Web Design

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..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

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

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

ClaudioRomeo

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?
I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com

Ghost

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.

ClaudioRomeo

I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com

ClaudioRomeo

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.
I'm the author of the VirtueMart 3 Reference Guide
https://www.virtuemartmatters.com