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 login 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. Call for Price button can be added with the label and URL link for the users who cannot 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.
- Show price after login can also be configured according to the product priority.
- The admin can further select multiple customer groups who can view prices of specific products.
- A customized Add to Cart label can be used for the users who cannot view the prices.
- Call for Price button can be added to the products for the users who cannot view the prices.
- An URL link can be attached with the add to cart label and call for price label.
- 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.
- The message is shown instead of price & add to cart button if a Logged In customer belongs to a different customer group.
- 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.
If you have downloaded the module from Magento Connect then unzip the respective extension zip and create Webkul(vendor) then ShowPriceAfterLogin(module) name folder inside your magento root directory as app/code/Webkul/ShowPriceAfterLogin and then move all module’s files inside /app/code/Webkul/ShowPriceAfterLogin/ folder in magento root directory.
After the upload, you can see the folders in your Magento2 Root Directory.
After the successful installation, you have to run the command on Magento2 root directory-“php bin/magento setup:upgrade”
Also, run this command into the Magento2 Root- “php bin/magento setup:static-content:deploy” You can refer the below screenshot.
After running the commands, you have to flush the cache from Magento admin panel by navigating through->System->Cache management as shown below.
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 want 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 theLTRand RTL languages.
After successfully installing this module, navigate through Stores->Configuration->Show Price After Login.
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 Products->Catalog->Click on Product->Show Price After Login section.
Show Price – Set this option as Yes for showing prices and add to cart button only to selected users of the group.
Customer Group – Select the customer group(s) who can view the price and add to cart button of this product.
Call for Price – Select Yes, if you want to show a customized button on the product page for users who cannot view the price.
Call for Price Label – Enter the name of the button label.
Call for Price Link – Enter the URL of the redirect page for the button.
Click 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 Page & Category Page.
At the product page, the customer will not able to see Price and add to cart button. They will see “Please Login To View Price” button like the image below.
After clicking on “Please Login To View Price” the customer will be redirected to Login page.
After the success login, the customer can see Price of the product and Add to cart button on the product page.
Now if a customer who is already Logged In but belongs to a different customer group, a message will be shown instead of price and add to cart button. From the screenshot below you can see that the short message is being displayed on the product page as ” Logged in customer group not allowed to View Price”.
A call for price label and URL link can be used instead of the default message for the users who cannot view the price and add to cart button.
On the Search page, when a customer searches any product and if that customer is not login, then they cannot see product price & Add to Cart button.
After login, the customer can see product price at the search page.
On hovering over the products, the customer can also see “Add To Cart” button on the search page.
When the customer is not login and if they go to the Category Page, then they will not see Product Price & Add To Cart Button.
When a Logged In customer belongs to a different customer group, it will see the following default message instead of price and add to cart button.
From the screenshot below you can see the Call for Price Label and URL Link is being used instead of default message.
After login, the customer can see product price at the Category page.
On hovering over the products, the customer can also see “Add To Cart” button on the Category page.
Here’s how the product based priority will appear on the front-end for users who cannot view price and add to cart button. The admin can insert a customize button and redirect URL link for specific products.
That’s all for the Show Price After Login for Magento2 still have any issue feel free to add a ticket and let us know your views to make the module better https://webkul.uvdesk.com/