Features of the Wholesale Extension
- Dedicated B2B Storefront: Create or repair a separate wholesale website, store group, and active store view.
- Wholesale Registration: Send B2B visitors to a dedicated registration form and assign the configured wholesale customer group.
- Controlled Access: Prevent retail customers from signing in to a configured wholesale website.
- Customer Approval: Require administrator approval before selected customer groups can sign in.
- Catalog Visibility: Assign products and categories to the B2B website and restrict guest catalog access where required.
- Group and Tier Pricing: Use Magento customer-group and quantity-tier prices without duplicating products.
- Website Pricing: Configure website-scoped prices when retail and wholesale websites require different base prices.
- Manufacturer Discounts: Apply manufacturer-specific discounts where this optional pricing feature is used.
- Hide Price: Replace prices with configurable text or a link for selected customer groups.
- Magento 2.4.8 Support: Uses the current Magento registration, session, website, and customer-group lifecycle.
Wholesale Extension Configuration
From Magento Admin, go to Stores > Configuration > Agile Codex > Wholesale Settings.
Choose the Wholesale Mode
Select Wholesale Website when B2B customers use a dedicated website. Select the store-based option only when wholesale behavior must be limited to selected store views within an existing website.
General Settings
- Wholesale Website: Select each website that should use wholesale registration and login restrictions.
- Create Now: Provision the configured B2B website or repair a missing store group and store view.
- Wholesale Store: Select store views when using store-based wholesale mode.
- Show Address Fields: Include company, telephone, street, city, region, postcode, and country during registration.
- Show Tax/VAT Number: Display the Tax/VAT field on the wholesale registration form.
- Wholesale Customer Group: Choose the group assigned to customers who register on a wholesale website.
- Customer Activation: Require approval for newly registered wholesale accounts when the activation module is enabled.
- Hide Price/Catalog: Apply the configured guest or customer-group visibility policy at website scope.
Create the Magento 2 B2B Website
After saving the wholesale settings, click Create Now. The action is idempotent: it can complete a partially created website by adding the missing store group or active store view.
Confirm the result under Stores > All Stores.
Configure the B2B Frontend URL
Set valid secure and unsecure base URLs for the new website. With a path-based setup, the storefront can use a URL such as https://example.com/b2b/. Confirm that the website has a default store group, the group has a root category, and the store view is enabled.
Assign Products and Categories to the Wholesale Website
- Open a product in Catalog > Products.
- In Product in Websites, select both the retail and B2B websites when the same product is sold in both channels.
- Save the product and reindex Magento.
- Ensure the B2B store group uses a root category containing the intended categories and products.
You normally do not need duplicate wholesale products. Use website assignment, customer-group prices, or tier prices on the original product. Create a separate product only when content, inventory, visibility, or another business rule must be independently managed.
Configure Wholesale and Tier Prices
Customer-Group and Quantity Pricing
- Go to Catalog > Products and edit the product.
- Open Advanced Pricing.
- Add a customer-group or tier price for the configured Wholesale group.
- Select the applicable website, enter the fixed price or discount, and set the minimum quantity for tier pricing.
- Save and reindex.
Website Price Scope
For different base prices per website, go to Stores > Configuration > Catalog > Catalog > Price and set Catalog Price Scope to Website. Then switch the product edit scope to the B2B website and enter its price.
Configure Manufacturer Discounts
Go to Agile Codex > Manufacturer Discount > Manage Manufacturer Discount.
The grid lists configured manufacturers and their discount values.
Click Add New Manufacturer, select the manufacturer, enter the discount amount, and save. Confirm the product has the matching manufacturer attribute value before validating the frontend price.
Wholesale Registration and Login Access
On a configured wholesale website, Magento redirects the standard customer registration URL to /wholesale/account/create/. Customers created through this form are assigned to the configured wholesale group.
Expected Login Behavior
- Guest: Can access only the pages allowed by the catalog and hide-price configuration.
- Retail customer: Cannot sign in to a configured wholesale website and is returned to login with an explanatory message.
- Approved wholesale customer: Can sign in and access the B2B customer account and permitted catalog.
- Unapproved wholesale customer: Remains signed out until an administrator approves the account.
Customer Activation
Go to Stores > Configuration > Agile Codex > Customer Activation.
- Enable: Enable or disable customer approval.
- Activate New Accounts by Default: Choose the initial approval state.
- Customer Group-wise Activation: Apply approval only to selected groups.
- Require Activation for Group: Include the configured Wholesale group.
- Notifications: Configure customer and administrator email templates and recipients.
- Messages: Configure registration-success and pending-approval messages.
Approve or disapprove pending customers from the Magento customer management screen.
Hide Prices or Restrict the Wholesale Catalog
Hide Price by Customer Group
Go to Stores > Configuration > Agile Codex > Hide Price and configure:
- Enabled: Enable price replacement.
- Display Text: Enter text such as “Sign in to view price”.
- Link URL: Link the replacement text to login, registration, or a contact page.
- Customer Groups: Select the groups for which prices should be hidden.
Restrict Catalog Access
Use the catalog-login configuration to control category navigation, product pages, category pages, and catalog search for guests.
Hide Price and catalog restriction are separate controls. Hiding a price does not automatically remove a product from navigation, and restricting a catalog does not configure wholesale prices.
Installation
Install and test the extension on a development or staging environment before production.
- Copy the supplied package modules into app/code/Acx.
- From the Magento root, enable the modules included in your purchased package.
- Run php bin/magento setup:upgrade.
- Run php bin/magento setup:di:compile in production mode.
- Deploy static content when required and run php bin/magento cache:flush.
A typical package can include Acx_Backend, Acx_Wholesale, Acx_Customeractivation, Acx_HidePrice, Acx_LoginCatalog, Acx_Manufacturer, and related catalog modules. Use the module list supplied with your package because licensed bundles can differ.
Troubleshooting
- No products appear on B2B: Check product website assignment, the B2B root category, product status, visibility, stock, and indexes.
- Guest can browse B2B: Verify the wholesale website selection and the catalog-login or hide-price settings at website scope.
- Wholesale customer cannot sign in: Confirm the customer group, website/account-sharing scope, approval status, and password.
- Retail price appears: Confirm the selected website scope and customer-group/tier-price row, then reindex prices.
- Registration opens the wrong page: Confirm the configured website and use the canonical /wholesale/account/create/ route.
- Create Now was already used: Run it again to repair missing B2B website components; it should not create duplicates.