1. Go to this page and download the library: Download bukashk0zzz/yml-generator 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/ */
bukashk0zzz / yml-generator example snippets
use Bukashk0zzz\YmlGenerator\Model\Offer\OfferSimple;
use Bukashk0zzz\YmlGenerator\Model\Category;
use Bukashk0zzz\YmlGenerator\Model\Currency;
use Bukashk0zzz\YmlGenerator\Model\Delivery;
use Bukashk0zzz\YmlGenerator\Model\ShopInfo;
use Bukashk0zzz\YmlGenerator\Settings;
use Bukashk0zzz\YmlGenerator\Generator;
$file = tempnam(sys_get_temp_dir(), 'YMLGenerator');
$settings = (new Settings())
->setOutputFile($file)
->setEncoding('UTF-8')
;
// Creating ShopInfo object (https://yandex.ru/support/webmaster/goods-prices/technical-Name($this->faker->name)
;
// Creating sets array
$categories = [];
$categories[] = (new Set())
->setId('s1')
->setName('Set name')
->setUrl('https://google.com')
;
// Creating offers array (https://yandex.ru/support/webmaster/goods-prices/technical-