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
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 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 allowed 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 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 is selected then the product-based configuration will work else general Configuration will work.
Product Based Configuration
If the admin has set the configuration priority as “Product Configuration”, then the 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 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.