Download the PHP package magendoo/module-product-labels without Composer

On this page you can find all versions of the php package magendoo/module-product-labels. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-product-labels

Magendoo ProductLabels

Product labels ("Sale", "New", "Staff Pick", …) for Magento 2.4.x, rendered as badges on category listings and product pages, exposed in GraphQL, and driven by a first-class label entity with a stable code — not by ad-hoc attribute options.

Why this module is shaped the way it is

Features

Product page Admin form

Requirements

Installation

The setup:upgrade creates three tables (magendoo_product_label, magendoo_product_label_store, magendoo_product_label_assignment), the magendoo_product_labels product attribute, and registers the Product Labels indexer.

Configuration

Stores → Configuration → Magendoo → Product Labels

Field Default Scope Description
Enable Labels Yes store view Render label badges on the storefront for this scope.
Maximum Labels Per Product 2 store view Highest-priority labels win; 0 means unlimited.

Managing labels

Marketing → Promotions → Product Labels

Each label has:

Manual assignment

Edit a product → Product Details → Product Labels multiselect. This is the merchandiser's surface; the module never writes this attribute. The attribute is global scope: one manual selection per product across all stores (per-store display text still varies via overrides).

Computed assignment

Set a label's Rule to New products or On sale and the Product Labels indexer materializes matching products per store view:

In Update by Schedule mode (default changelog subscriptions: product entity, product datetime and decimal attribute values) product edits are picked up incrementally by the standard index cron group — no custom cron. Saving a label whose rule or active flag changed invalidates the indexer automatically.

A product's storefront labels are the union of its manual and computed labels, filtered by placement, ordered by priority, and capped by Maximum Labels Per Product.

Honest limitations (Release 1)

GraphQL

magendoo_labels returns the product's active labels for the current store view, ordered by priority and capped by Maximum Labels Per Product; it returns nothing when Enable Labels is off for that store view. Placement flags are not applied — a headless client decides placement itself. The resolver is batched: one preload serves every product in the query.

Extending: custom rule types

Rule matchers are DI-registered. Implement Magendoo\ProductLabels\Model\Indexer\RuleMatcher\MatcherInterface:

and register it under a new rule-type key:

(Release 1 constraint: saving a label with a custom rule type is blocked by validation — the resource model checks the built-in list from Label::getAvailableRuleTypes(), so besides extending the Magendoo\ProductLabels\Model\Label\Source\RuleType dropdown options you currently need a preference on Magendoo\ProductLabels\Model\ResourceModel\Label to accept the new value. Making both honor DI-registered matchers automatically is planned; treat this extension point as developer-level for now.)

When working with a loaded label programmatically, Label::getStoreOverrides() and Label::getTextForStore($storeId) expose the per-store-view text overrides; the storefront resolver applies the same overrides via SQL for batching.

Troubleshooting

License

OSL-3.0. Copyright (c) Magendoo (https://magendoo.ro).


All versions of module-product-labels with dependencies

PHP Build Version
Package Version
Requires php Version ~8.2.0||~8.3.0||~8.4.0
magento/framework Version >=103.0
magento/module-catalog Version >=104.0
magento/module-catalog-rule Version >=101.2
magento/module-store Version >=101.0
magento/module-eav Version >=102.0
magento/module-backend Version >=102.0
magento/module-ui Version >=101.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package magendoo/module-product-labels contains the following files

Loading the files please wait ...