Show Price After Login for Magento2 module allows the store owner to display product price and “Add to cart” button after login. The Product price and “Add to cart” button will not display until the customer does not log in to the Magento2 Store.
The admin can select multiple customer groups who can view the price and add to cart button. Show price after login module can further be customized according to product priority also.
The Admin can set the customized title for “Add to Cart” button & redirecting URL for the users who can’t view the price and Add to Cart button. This is a wonderful stand-alone module for Magento2.
Features of Show Price After Login for Magento2
- The admin can set the Show Price After Login module status as Yes or No.
- The admin can select multiple customer groups who can view the prices and add to cart button from the configuration.
- Admin can select the categories for which the product price should be displayed in the store.
- Show price after login can also be configured according to the product configuration/general configuration.
- The admin can further select multiple customer groups who can view prices of specific products.
- Price and add to cart button will not display until the customer does not log in.
- The customer can’t add the product to cart without login.
- This module also works with tier price.
- This module works with multi-store and multi-website of Magento2.
- The codes are open source so it can be customized easily.
Installation of Show Price After Login for Magento2
Customers will get a zip folder and they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder. You need to transfer this app folder into the Magento2 root directory on the server as shown below.
After the successful installation, you have to run these commands in the Magento2 root directory:
Second Command – php bin/magento setup:di:compile
Third Command – php bin/magento setup:static-content:deploy
Configuration of Multi-Lingual Support
For the multilingual support, the admin will navigate through Store->Configuration->General ->Locale Options and select the locale as German (the language into which admin configure to translate his store content).
Magento2 Show Price After Login Language Translation
If a user wants to translate their module from English to German then they need to follow the path app/code/Webkul/ShowPriceAfterLogin/i18n in their unzipped Magento Marketplace folder and will get a CSV file with name “en_US.csv”. Now they will rename that CSV as “de_DE.csv” and translate all right side content after the comma in the German language. After editing the CSV, save it and then upload it to the path app/code/Webkul/ShowPriceAfterLogin/i18n where they have installed Magento2 on their server. The module will get translated in the German Language. It supports both the LTRand RTL languages.
After successfully installing this module, navigate through Stores->Configuration->Show Price After Login.
General Settings- The admin can enable or disable the module from the backend.
Allowed Customer Group- The admin can select the particular group of the customers for whom the admin wants to enable the module.
Enable Category(s) Setting for All User- The admin can enable or disable the category for all users. If this option is enabled by the admin, the admin can select the desired category from the list.
Allowed category for All Users- The product price will be shown to all allowed categories product
Add to Cart label: Here, the admin has three options where the admin can enable or disable the add to cart label. The admin can enter the title for the label and also the admin can enter the redirect url or full url starting with http or https
Configuration Priority: The admin can select either Product Configuration or General Configuration. If Product Configuration selected then the product based configuration will work else general Configuration will work.
If the admin has set the configuration priority as “Product Configuration”, then show price after login feature can further be customized for specific products.
Now to set Show Price After Login for products, navigate through Catalog-> Products-> Click on Product->Show Price After Login section.
Enabled – Set this option as Yes for showing prices and add to cart button only to selected users of the group.
Allowed Customer Groups – Select the customer group(s) who can view the price and add to cart button of this product.
Add to Cart Label Enable/Disable – Select Yes, if you want to show a customized label button on the product page for users who cannot view the price.
Title – Enter the name of the button label.
Redirect URL – Enter the URL of the redirect page for the button.
Click the Save button to save your changes.
Show Price After Login for Magento2 at front-end
Now let us see the workflow of this module on the Product Page, Search/Advanced Search Page, & Category Page.
At the product page, the customer will not able to see Price and add to cart button. They will see the “Login To View Price” button like the image below.
After the successful login, the customer can see Price of the product and Add to cart button on the product page.