Download the PHP package opengento/module-minimal-price without Composer

On this page you can find all versions of the php package opengento/module-minimal-price. 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-minimal-price

Minimal Price Module for Magento 2

Latest Stable Version Packagist Packagist

This extension allows to set a minimal price to a product (MAP).

Setup

Magento 2 Open Source or Commerce edition is required.

Composer installation

Run the following composer command:

Setup the module

Run the following magento command:

If you are in production mode, do not forget to recompile and redeploy the static resources.

Features

Define the minimal price availability for a product. The price is capped to the minimal value if any special price, tier price or catalog rule tries to price down the limit.

Product Attributes

If you use the native import export tool provided with Magento, the attribute minimal_price is mapped with the field map_price.

Did You Know

An hiding an never completed feature

While working on this project, it appears that Magento already has an attribute with code "minimal_price".
This attribute exists in Magento since forever. It's actually a system attribute which is not visible through the admin panel.
There is also a few method that refers to this attribute, such as:

This attribute and methods are not used in the Commerce edition neither.
There is also some trace there: \Magento\CatalogImportExport\Model\Export\Product:

This suggests that minimal_price is mapped as "Minimum Advertised Price" (MAP). MAP policies are legal documents brands use to define the lowest legally possible advertised price for a product. It does set the minimum, some penalties may be applied if a seller violates the MAP.

This module updates and reuse this existing attribute in order to give it a true usage.

Price Indexer, to be or not to be?

Also, while investigating a bug where the minimal price value was not handled in the PDP nor PLP. It seems that the catalog_product_index_price is not used to render and display the final prices.
When inspecting the query logs, it seems that even if the indexer is loaded and applied to the product list, when the template render the prices, the following method is used \Magento\Catalog\Block\Product\ListProduct::getProductPrice. This method calls Magento\Framework\Pricing\Render::render which render a price by code. The engine will proceed with Magento\Catalog\Pricing\Price\FinalPrice and Magento\Catalog\Pricing\Price\BasePrice. The rendering is finally delegated to Magento\CatalogRule\Pricing\Price\CatalogRulePrice which loads any active catalog rules.

The performance struggles comes when you have a lot of active catalog rule loaded every team for each items on the page.

Support

Raise a new request to the issue tracker.

Authors

License

This project is licensed under the MIT License - see the LICENSE details.

That's all folks!


All versions of module-minimal-price with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
magento/framework Version *
magento/module-eav Version *
magento/module-catalog Version *
magento/module-catalog-rule Version *
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 opengento/module-minimal-price contains the following files

Loading the files please wait ....