Download the PHP package bestit/commercetools-customer-prices-bundle without Composer

On this page you can find all versions of the php package bestit/commercetools-customer-prices-bundle. 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 commercetools-customer-prices-bundle

bestit/commercetools-customer-prices-bundle

There is no real support for individual customer prices in the the commercetools platform at this moment. You could try to add a lot of "channel prices" for your products, but you will hit some topics like a missing fallback in the search facets for the scopedPrice (no fallback to the normal price, if a channel price is missing), performance losses because of huge product data sets and maybe you hit rock bottom with the maximum document size of the database itself.

So you need a substitute. This bundle will provide you with a substitute based on custom objects like

You can configure the field names for the container, price value, article and customer value!

API

You can inject/use the service best_it_ct_customer_prices.model.customer_price_collection to fetch your price with BestIt\CtCustomerPricesBundle\Model\CustomerPriceCollection::getByArticle(string $articleId). $articleId needs to match the data out of your custom object.

The lazy loaded service best_it_ct_customer_prices.model.customer_price_collection is "created" with a factory, which takes the authed User out of the Security Token Storage.

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

Step 3: Configure the bundle

You can define a custom query for searching your custom objects. The following default query will be used if you not set this field: container="{container}-{currencyValue}-{customerValue}"

You can use placeholders for your query:

Placeholder Description Example
{container} Your custom object container name customer-price
{articleField} Your custom object field name for article number sku
{customerField} Your custom object field name for customer number customerNumber
{currencyField} Your custom object field name for currency currency
{pricesField} Your custom object field name for prices prices
{customerValue} Your current customer number MA4785
{currencyValue} Your current currency EUR

Step 4: Mark your user object as usable.

Please implement the BestIt\CtCustomerPricesBundle\Model\CustomerInterface on your user object. The used id needs to match the customer data out of your custom object.

ToDos


All versions of commercetools-customer-prices-bundle with dependencies

PHP Build Version
Package Version
Requires commercetools/php-sdk Version ^1.4 || ^2.0
php Version ^7.0
symfony/proxy-manager-bridge Version ^3.0
symfony/dependency-injection Version ^3.0
symfony/cache Version ^3.0
symfony/security Version ^3.0
symfony/stopwatch Version ^3.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 bestit/commercetools-customer-prices-bundle contains the following files

Loading the files please wait ....