Magento 2 Show Price After Login extension 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 Store.
The admin can select multiple customer groups who can view the price and add to the cart button. Show price after login module can further be customize according to product priority also.
The Admin can set the customized title for the “Add to Cart” button & redirecting the URL for the users. It is for those who can’t view the price and Add to Cart button.
This is a wonderful stand-alone module for Adobe Commerce Cloud.
Features
- The admin can set the Show Price After Login for Magento2 module status as Yes or No.
- The admin can select multiple customer groups who can view the prices and add to the cart button from the configuration.
- Admin can select the categories for which the product price should display in the store.
- The admin can set a customized title for “Add to Cart” button & redirecting URL for the users who can’t view the price and Add to Cart button.
- Show price after login can also configure according to the product configuration/general configuration.
- The admin can further select multiple customer groups who can view the 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 Adobe Commerce.
- The codes are open source so it can customize easily.
- Update product show price module attributes value using CSV.
- Remove the price meta tag from the product view page.
Install Extension from Webkul Store
#1 Download Module
Firstly, you need to log in to Webkul Store, go to My Account>My Purchased Products section, verify and then download and extract the contents of this zip folder on the system.
#2 Upload Folder
Once the module zip is extracted, follow path src>app and then copy the app folder into the Adobe Commerce Cloud root directory on the server as shown below:
#3 Run Commands
After uploading the module folder, you need to run the following commands in the Magento 2 root directory:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush
Install Extension from Adobe Commerce Marketplace
If you have purchased this extension from the Adobe Commerce Cloud Marketplace then please follow the below process or visit this link.
#1 Get Access Keys
You need to get access keys, navigate to My Profile in Adobe Commerce Marketplace, then choose Access Keys in the My Products section.
Go to Adobe Commerce and then you need to copy both the Access Keys – Public Key and Private Key. These access keys will be needed in the next steps for authentication.
If access keys are not created earlier, click Create A New Access Key, enter any name and click OK.
#2 Update composer.json File
To know the component name and version number, go to your Adobe Commerce Cloud Marketplace account section, My Profile>My Purchases, then find this extension to view the details.
Please note – Below is an example image, every extension will have its own unique component name and version.
After that, navigate to your Adobe Commerce project directory and update your composer.json file in the following format.
composer require <component-name>:<version>
For example, to install version 4.0.0 of this extension you need to run the following command:
composer require webkul/show-price-after-login:4.0.0
#3 Enter Access Keys
Now you will need to enter the Access Keys that you obtained as explained in the first step #1 Get Access Keys.
Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
#4 Run Command
You need to run the following commands:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush
Module Configuration
After successfully installing this module, navigate to Show Price Login>>Configuration
Configuration Settings:
General Settings- The admin can enable or disable the module from the backend.
Remove Price Meta Tag -If you select “yes,” it will delete the price meta tag from the product view page.
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 Users- 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 allow categories of 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
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 is chosen, then product-based configuration will work; otherwise, general Configuration will work.
Uploaded Files:
After that navigate to Show Price Login>> Uploaded files.
After that, click on uploaded files>>updated products.
In this uploaded file section, admin can add many categories or products at once using a CSV file. Update product show price module attributes value using CSV.
In which he or she wants to use this to update the attribute value “show price after login” in the products rather than doing it one by one.
Once you click on update product, it redirect to new page Here, you need to select the CSV file and the type (product or category).
Product Based Configuration
If the admin has set the configuration priority as “Product Configuration”, then the show price after login feature can further be customize 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 the 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 Adobe Commerce at the front-end
Now let us see the workflow of this module on the Product Page, Search/Advanced Search Page, & Category Page.
Product Page – Show Price After Login
At the product page, the customer will not able to see the 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.
Logged In Customer who belongs to Different Customer Group
Now if a customer who logs In but belongs to a different customer group, a message displays instead of price and add to cart button.
From the screenshot below you can see that the short messagedisplays on the product page as ” Logged in user not allowed to View Price”.
Search Page – Show Price After Login
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 on the search page.
On hovering over the products, the customer can also see the “Add To Cart” button on the search page.
Category Page – Show Price After Login
When the customer is not log in and if they go to the Category Page, then they will not see “Product Price” & “Add To Cart” Button.
There will be a custom title for the “Add to cart” label as set by the admin.
Logged In Customer who belongs to Different Customer Group
Now if a customer logs In but belongs to a different customer group, a message will be shown instead of the price and add to cart button.
Add to Cart Label and Redirect URL can use in place of the default message for the users who cannot view the price and add to cart button.
The admin can set the title of the “Add to Cart Label”.
Redirect URL use in place of the default message as set by the admin.
When the customer will click on the custom title of the “Add to cart button”, the customer will redirect to the custom url as set by the admin.
That’s all for the Show Price After Login for Magento 2 extension, still have any issues feel free to add a ticket and let us know your views to make the module better https://webkul.uvdesk.com/
Current Product Version - 4.0.4-p2
Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x
4 comments
Yes, this module can be modified or customized to apply therules to specific manufacturers by customization ( a paid service).
You can let us know the exact requirement at [email protected] and we will assist you.