PHP code example of justbetter / laravel-magento-prices
1. Go to this page and download the library: Download justbetter/laravel-magento-prices library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
justbetter / laravel-magento-prices example snippets
namespace App\Integrations\MagentoPrices;
use JustBetter\MagentoPrices\Repositories\Repository;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
class MyPriceRepository extends Repository
{
public function skus(?Carbon $from = null): ?Collection
{
return collect(['sku_1', 'sku_2']);
}
}
class BaseRepository
{
// How many prices may be retrieved at once when the process job runs
protected int $retrieveLimit = 250;
// How many prices may be updated at once when the process job runs
protected int $updateLimit = 250;
// How many times an update to Magento may fail before it stops trying
protected int $failLimit = 3;
}