Reading list Switch to dark mode

    Show Price After Login For Magento 2

    Updated 6 March 2024

    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.

    Searching for an experienced
    Magento 2 Company ?
    Find out More

    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.

    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:

    Installation Of Show Price After Login for Magento2

    #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.

    excess key

    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.

    excesskey

    If access keys are not created earlier, click Create A New Access Key, enter any name and click OK.

    new access key

    #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 unique component name and version.

    Zip file

    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 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 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 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 chosen then the product-based configuration will work else general Configuration will work.

    Show Price After Login

    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.

    custom title and redirect url Show Price After Login

    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.

    login to view price Show Price After Login

    After the successful login, the customer can see Price of the product and Add to cart button on the product page.