viraxpress / login-to-purchase
ViraXpress Login to Purchase Module for Magento 2
Package info
github.com/viraxpress/LoginToPurchase
Language:HTML
Type:magento2-module
pkg:composer/viraxpress/login-to-purchase
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0
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
-
Install the extension via Composer:
composer require viraxpress/login-to-purchase
-
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
StatustoYes - Enter
Login Button Text - Enter
Redirect Pagefor guest login - Select
Redirect After Login - Enter
Custom Urlwhen 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.