PHPackages                             sbodak/magento2-b2b-disable-add-to-cart-button-for-guest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sbodak/magento2-b2b-disable-add-to-cart-button-for-guest

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

sbodak/magento2-b2b-disable-add-to-cart-button-for-guest
========================================================

This extension allows you to disable Add to cart button for guest. Useful feature for B2B store.

2.0.0(4mo ago)205.5k11MITPHPPHP ~7.0|~7.1|~7.2|~7.3|~7.4|~8.0|~8.1|~8.2|~8.3|~8.4

Since Nov 13Pushed 4mo ago6 watchersCompare

[ Source](https://github.com/sbodak/magento2-b2b-disable-add-to-cart-button-for-guest)[ Packagist](https://packagist.org/packages/sbodak/magento2-b2b-disable-add-to-cart-button-for-guest)[ RSS](/packages/sbodak-magento2-b2b-disable-add-to-cart-button-for-guest/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Magento 2 - Disable add to cart button for guest
================================================

[](#magento-2---disable-add-to-cart-button-for-guest)

Overview
--------

[](#overview)

This module enables the possibility to disable the Add to Cart button on product and category pages for customers who are not logged in. It is useful for B2B stores where guest users should not be able to add products to the cart.

Compatibility
-------------

[](#compatibility)

Module versionMagento versionPHP version2.0.x2.4.6 – 2.4.87.0 – 8.41.0.x2.1 – 2.37.0 – 7.2Installation
------------

[](#installation)

```
composer require sbodak/magento2-b2b-disable-add-to-cart-button-for-guest
php bin/magento module:enable Bodak_DisableAddToCart
php bin/magento setup:upgrade
php bin/magento cache:clean
```

Configuration
-------------

[](#configuration)

1. Go to the Magento admin interface.
2. Navigate to **Stores &gt; Configuration &gt; Catalog &gt; Catalog**.
3. Under the **Storefront** tab find the **Disable Add to cart button for Guests** option.
4. Set it to **Yes** to activate the plugin.

### Module configuration — administration panel

[](#module-configuration--administration-panel)

[![Module configuration - administration panel](docs/disable_add_to_cart_configuration.png)](docs/disable_add_to_cart_configuration.png)

### Removed Add to Cart button in catalog — frontend view

[](#removed-add-to-cart-button-in-catalog--frontend-view)

[![Remove Add to Cart button in catalog](docs/disable_add_to_cart_catalog.png)](docs/disable_add_to_cart_catalog.png)

### Removed Add to Cart button on product page — frontend view

[](#removed-add-to-cart-button-on-product-page--frontend-view)

[![Remove Add to Cart button on product page](docs/disable_add_to_cart_product.png)](docs/disable_add_to_cart_product.png)

Running tests
-------------

[](#running-tests)

```
composer install
vendor/bin/phpunit
```

Uninstall
---------

[](#uninstall)

```
composer remove sbodak/magento2-b2b-disable-add-to-cart-button-for-guest
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

License
-------

[](#license)

[MIT License](LICENSE)

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance78

Regular maintenance activity

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1026 days

Total

4

Last Release

122d ago

Major Versions

1.0.3 → 2.0.02026-04-18

PHP version history (3 changes)1.0.0PHP ~7.0.0

1.0.2PHP ~7.0|~7.1|~7.2

2.0.0PHP ~7.0|~7.1|~7.2|~7.3|~7.4|~8.0|~8.1|~8.2|~8.3|~8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25949343?v=4)[Slawek Bodak](/maintainers/sbodak)[@sbodak](https://github.com/sbodak)

---

Top Contributors

[![sbodak](https://avatars.githubusercontent.com/u/25949343?v=4)](https://github.com/sbodak "sbodak (7 commits)")

---

Tags

b2bmagento2magento2-add-to-cartmagento2-extensionmagento2-modulemagento2-pluginb2bmagento2disable Add to cart button

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sbodak-magento2-b2b-disable-add-to-cart-button-for-guest/health.svg)

```
[![Health](https://phpackages.com/badges/sbodak-magento2-b2b-disable-add-to-cart-button-for-guest/health.svg)](https://phpackages.com/packages/sbodak-magento2-b2b-disable-add-to-cart-button-for-guest)
```

###  Alternatives

[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

69362.0k](/packages/run-as-root-magento2-prometheus-exporter)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1861.2k](/packages/myparcelnl-magento)[smile/module-store-locator

Smile Store Locator

51537.6k5](/packages/smile-module-store-locator)[mage-os/module-llm-txt

AI-powered LLMs.txt generation for Magento 2 / Mage-OS stores. Help AI systems understand your store with OpenAI-generated content.

245.7k](/packages/mage-os-module-llm-txt)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1015.1k29](/packages/loki-magento2-components)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

132.2k](/packages/angeo-module-llms-txt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
