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.

    add to cart Show Price After Login

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

    login to view price Show Price After Login

    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.

    search result login to view price Show Price After Login

    After login, the customer can see product price on the search page.

    add to cart and price on product page Show Price After Login

    On hovering over the products, the customer can also see the “Add To Cart” button on the search page.

    add to cart option  Show Price After Login

    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.

    Show Price After Login

    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 custom label Show Price After Login

    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.

    Show Price After Login

    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-p1

    Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    4 comments

  • spyrule
    • Nirupama Shree
  • Nirupama Shree
  • mira
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content