MagDev
MagDev

Reputation: 83

Separate product catalog website and customer registration for two customer type

I need that my website can handle 2 type of product catalog

  1. For General customers (b2c)
  2. For Dealers (b2b)

On http://www.domainname.com/ it will show product & categories for General customers (b2c).
On http://www.domainname.com/b2b/ it will show product & categories for Dealers (b2b).

I have created 2 websites, 1 Store for each website, 1 Store view for each store. e.g.

Website Name | Store Name | Store View Name  
B2C Website | B2C Store | B2C Store View (b2c)  
Dealer Website | Dealer Store | Dealer Store View (b2b)

I am not able to view my dealer website using link like this
http://www.domainname.com/b2b/
It gives me 404. I think it is looking for the CMS Page which doesn't exists.

What should I do to display the dealer product catalog on this link?

Also when the user register as dealer using link
http://www.domainname.com/b2b/customer/account/create/
The customer should autmatically assigned as Dealer customer group. How to do this?

Upvotes: 0

Views: 540

Answers (1)

Sergey
Sergey

Reputation: 1494

Set website Url for every website you have in Sustem->Config->General->Web (Base URL for secure/unsecure). Then configure your .htaccess:
RewriteCond %{HTTP_HOST} ^www.domainname.com$
RewriteRule ^ - [E=MAGE_RUN_CODE:website_1_code]
RewriteCond %{HTTP_HOST} ^www.domainname.com/b2b$
RewriteRule ^ - [E=MAGE_RUN_CODE:website_2_code]
So magento will startup right website depending of requested url.

Upvotes: 0

Related Questions