4

Currently I am working on a Multi-vendor module in Magento.

What I need to do:

I need to include Vendor name in each URL.

Eg:

 - domain.com/vendor1/jewels.html 
 - domain.com/vendor2/jewels.html

And when user enter product URLs it should become

  - domain.com/vendor1/jewels/product1.html
  - domain.com/vendor2/jewels/product6.html

That means every URL will have the vendor string after baseurl.

*I need a functionality just like Magento uses with multi store were we can set store code in the URL and all frontend URL's will have that store code where we use Magento getUrl *

Eg:

 - domain.com/en/jewels.html 
 - domain.com/fr/jewels.html

I Couldn't use this as client wants only one store to keep very low data replication by Magento and the vendor filtering logic is very simple which is already working. So I only have to include the vendor code string in URL like default Magento store code method.

What I did So far:

  1. I made every URL to have vendor code at the end with normal way (by adding GET parameter).

    • domain.com/jewels.html?vendor=vendor1
    • domain.com/jewels.html?vendor=vendor2
  2. With the help Apache vhosts config pointed every sub domain into same Magento added all vendors as sub domain so

    - vendor1.domain.com/jewels.html 
    - vendor2.domain.com/jewels.html
    

    Apparently both methods client doesn't want it and they are clear that they want only above method which I have no idea so far where to start. Any direction or any similar extension?

Your Help much appreciated.

0

2 Answers 2

1

Have you tried using category/subcategory/products configuration under Admin->Catalog->Manage Categories to configure a category each for vendor1 and vendor1 and add a subcategory called jewels into each category.

Followed by Admin->Catalog->Manage Products to add the products into each subcategory.

1
  • Please see my requirement once again - I cant use category or root category logic here.
    – Elamurugan
    Dec 14, 2014 at 4:18
1

You can try extend "Mage_Core_Controller_Varien_Router_Standard" front router class to handle this by creating custom module since magento's order of routing dispatch is

Mage_Core_Controller_Varien_Router_Admin
Mage_Core_Controller_Varien_Router_Standard
Mage_Cms_Controller_Router
Mage_Core_Controller_Varien_Router_Default 

So it will have effect only on frontend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.