Preparation:
- Before starting the installation, ensure that your Magento environment meets the following prerequisites:
System Requirements:
- PHP Version: 7.4 or higher is recommended.
- Composer: Must be installed for dependency management.
- Database Backup: Backup your database and files to prevent data loss during installation..
Magento 2 module installation. Here's a detailed guide on how to proceed:
Magento 2 module Installation
Step 1:Extract the Zip File:
- Extract the contents of the zip file to a temporary directory on your computer.
Step 2: Copy Files to Magento Root Directory:
- Copy all files and folders from the extracted zip file.
- Paste the copied files into the Upload the extracted files to the app/code/Letscms/BuyNowBtn directory in your Magento root.
Step 3: Open Terminal or CMD:
- Change your working directory to the Magento root directory using the following command:
-
you need to run the following commands to install and activate the module:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
Verify Installation:
Troubleshooting:
- Permissions Issue: Ensure the app/code directory and its contents have the correct permissions set for your web server user.
-
Magento Cache: If you encounter issues, try clearing Magento caches and reindexing:
php bin/magento indexer:reindex
php bin/magento cache:clean
Buy Now Button on Product and Category Pages:
- Single-Click Checkout: When customers click the "Buy Now" button, they are immediately taken to the checkout page, bypassing the cart entirely.
- Streamlined Experience: This button is perfect for customers purchasing a single product, making their shopping experience faster and more efficient.
Cart Button Control on Category Page:
- Optional Cart Button Visibility: You can hide the "Add to Cart" button on category pages when the "Buy Now" button is active. This allows for a cleaner, simpler shopping experience.
- Configuration in Admin: Control whether the "Add to Cart" button is visible in Stores > Configuration > Letscms Buy Now Button > Buy Now.
Customization Options:
You can further customize the look of the "Buy Now" button:
- Button Text Color: Choose a color that stands out and makes the text easy to read.
- Button Background Color: Select a background color that matches your store's design.
- Button Title: Set Button Name .
To remove the module, run the following commands:
you need to run the following commands to install and activate the module:
php bin/magento module:disable Letscms_BuyNowBtn
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush