Download the PHP package justbetter/laravel-akeneo-products without Composer

On this page you can find all versions of the php package justbetter/laravel-akeneo-products. 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 laravel-akeneo-products

Laravel Akeneo Products

Tests Coverage Analysis Total downloads

Easily export products to Akeneo from your ERP.

This package is built to easily create products in Akeneo from your ERP or other (external) source, without the complexity of the different field types in Akeneo. The structure of attributes is all taken care of by the package. This means that a simple key-value array is already sufficient to start upserting products.

Aside from attributes, you can also set a family, categories and all other data you would normally be able to via the API.

For more advanced use cases, it is also possible to add your own data to the payload.

Products are retrieved and updated in small chunks to spread the load if your project has access to a lot of products. Updates of these products are only sent to Akeneo if something has been modified to prevent unnecessary requests.

Prerequisites

This package makes use of the Akeneo Client. Make sure to follow it's README to install and configure it correctly.

Installation

Install the composer package.

Setup

Publish the configuration of the package.

Add the following commands to your scheduler.

How it works

This section will describe the process of products but product models will be similar in usage.

When a product is retrieved, it will fetch the product from the (external) source. If the retrieved data is not null, it will be saved in the database. If the payload of the database model has been changed, the update-property of the model will be set to true. This way, the package is aware of updates and can do them in small batches. The numbers can be tweaked in your retriever class.

When a product has already been retrieved in the past, the retrieve-property of the model can be set to true in order to automatically fetch the data again. This is done by the ProcessProductsCommand, if added to your scheduler.

All products saved in the database will be processed under the following conditions:

  1. If retrieve is set to true, the product will be fetched again from the (external) source.
  2. If update is set to true, the product will be upserted to Akeneo.

This package does not contain a way to retrieve "all" products. If you wish to retrieve all products daily, you will have to dispatch the RetrieveProductJob with an identifier yourself.

Retrieving products

First, start by creating your own retriever as this is how the package will be interacting with the (external) source.

By building up a ProductData class, the package knows how to send this data to Akeneo.

Make sure you have set your retriever in the configuration file.

This package also ships with an Attribute model, which is meant to dynamically create the payload. We have also written a Nova integration to make this even easier as it provides a mapping resource.

Example

This is an example of how this package can be used, using a configured attribute mapping.

Product models can be implemented similarly use the following example:

Supported attribute types

Currently, the following attribute types are supported by this package:

Commands

This package ships with a few commands.

Products

Retrieve a product by it's identifier, it will automatically be saved to the database.

Process all products, this includes retrieving and updating products.

Update a product by it's identifier. This will manually trigger an update towards Akeneo, regardless if the product is up-to-date.

Product models

Retrieve a product model by it's code, it will automatically be saved to the database.

Process all product models, this includes retrieving and updating product models.

Update a product model by it's code. This will manually trigger an update towards Akeneo, regardless if the product model is up-to-date.

Quality

To ensure the quality of this package, run the following command:

This will execute three tasks:

  1. Makes sure all tests are passed
  2. Checks for any issues using static code analysis
  3. Checks if the code is correctly formatted

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-akeneo-products with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
justbetter/laravel-akeneo-client Version ^1.1
justbetter/laravel-error-logger Version ^2.3
laravel/framework Version ^10.0|^11.0
spatie/laravel-activitylog Version ^4.7
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 justbetter/laravel-akeneo-products contains the following files

Loading the files please wait ....