PHP code example of timothydc / laravel-lightspeed-ecom-product-feeds

1. Go to this page and download the library: Download timothydc/laravel-lightspeed-ecom-product-feeds 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/ */

    

timothydc / laravel-lightspeed-ecom-product-feeds example snippets


use TimothyDC\LightspeedEcomProductFeed\Interfaces\ProductPayloadMappingInterface;

class CustomProductXml implements ProductPayloadMappingInterface
{
    public function execute(string $baseUrl, array $product): array
    {
        return ['product_id' => $product['id']];
    }
}
bash
$ php artisan vendor:publish --tag="lightspeed-ecom-product-feed"

$ php artisan vendor:publish --tag="lightspeed-ecom-product-feed:config"
$ php artisan vendor:publish --tag="lightspeed-ecom-product-feed:migrations"
bash
$ php artisan migrate
bash
$ php artisan ecom-feed:list
bash
$ php artisan ecom-feed:update {id}
bash
$ php artisan ecom-feed:remove {id}
bash
$ php artisan ecom-feed:generate {id}