viraxpress/login-to-purchase

ViraXpress Login to Purchase Module for Magento 2

Maintainers

Package info

github.com/viraxpress/LoginToPurchase

Language:HTML

Type:magento2-module

pkg:composer/viraxpress/login-to-purchase

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-04-13 12:27 UTC

This package is auto-updated.

Last update: 2026-06-10 10:51:12 UTC


README

Description

Login To Purchase is a Magento 2 module by ViraXpress that requires customers to log in before accessing purchase actions. It hides prices for guest users and replaces add-to-cart / purchase interface elements with a login button. This module is designed for B2B stores that want to encourage account-based checkout and protect product pricing from anonymous visitors.

Features

  • Hide product prices for guest users using Magento price rendering plugin interception
  • Replace add-to-cart and purchase controls with a configurable login button for guest customers
  • Support for catalog product list, product view, bundle customize, and product compare layouts
  • Configurable login button label
  • Configurable guest login redirect URL
  • Redirect after login options: Default Magento behavior, Home Page, Previous Page, or Custom URL
  • Preserves the previous page in a cookie and returns the customer after login (compare page redirects to home page)
  • Admin settings available under Stores > Configuration > ViraXpress > Login To Purchase

Compatibility

  • Magento 2.4.x

Installation

  1. Install the extension via Composer:

    composer require viraxpress/login-to-purchase
  2. Run the following commands from your Magento root directory:

    php bin/magento module:enable ViraXpress_LoginToPurchase
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy -f
    php bin/magento cache:flush

Configuration

  • Go to Stores > Configuration > ViraXpress > Login To Purchase
  • Set Status to Yes
  • Enter Login Button Text
  • Enter Redirect Page for guest login
  • Select Redirect After Login
  • Enter Custom Url when using the custom redirect option

Support

For support, please contact ViraXpress at https://www.viraxpress.com or refer to the license agreement.

License

This extension is licensed under the ViraXpress license agreement. See https://www.viraxpress.com/license for details.