maniyatech/magento2-buynow

Instant "Buy Now" button for Magento 2 product pages to speed up checkout and improve user experience.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 1

Open Issues: 0

Type:magento2-module

1.0.1 2025-07-03 06:52 UTC

This package is auto-updated.

Last update: 2025-07-17 10:24:23 UTC


README

The ManiyaTech Buy Now module for Magento 2 adds a powerful "Buy Now" button to your product listing, view, search, and advanced search pages. It allows customers to bypass the regular add-to-cart flow and proceed directly to checkout — improving conversions and offering a faster purchase experience.

Key Features

  • ⚡ Enable/Disable Buy Now Globally: Toggle the entire module with a single switch from admin.
  • 📄 Flexible Page Targeting: Enable "Buy Now" on:
    • Product listing (category) pages
    • Product view (detail) pages
    • Search results page
    • Advanced search results page
  • 🧠 Smart Cart Management: Option to either:
    • Empty the cart before Buy Now (single product checkout), or
    • Keep existing products in the cart
  • ✏️ Customizable Button Title: Set your own Buy Now button label via system config.
  • 🧩 Injectable Custom Button Code: Easily add the "Buy Now" button to custom templates using the provided HTML snippet.
  • 🔐 FormKey & Session Validation: Secure request handling ensures Magento standards are met.
  • ✅ Admin Configuration Ready: Fully integrated with Magento's native system config for seamless backend control.

Add Buy Now in custom template

If you wish to add the button to custom product templates, use following code snippet:

    $buyNowBtnHtml = $this->getLayout()
        ->createBlock(\ManiyaTech\BuyNow\Block\Product\ListProduct::class)
        ->setProduct($_item)
        ->setButtonTitle('Buy Now')
        ->setTemplate('ManiyaTech_BuyNow::buynow.phtml')
        ->toHtml();
    echo $buyNowBtnHtml;

Change $_item to current product object.

How to install ManiyaTech_BuyNow module

Composer Installation

Run the following command in Magento 2 root directory to install ManiyaTech_BuyNow module via composer.

Install

composer require maniyatech/magento2-buynow
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

Update

composer update maniyatech/magento2-buynow
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

Run below command if your store is in the production mode:

php bin/magento setup:di:compile

Manual Installation

If you prefer to install this module manually, kindly follow the steps described below -

  • Download the latest version here
  • Create a folder path like this app/code/ManiyaTech/BuyNow and extract the main.zip file into it.
  • Navigate to Magento root directory and execute the below commands.
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f