timothydc/laravel-lightspeed-ecom-product-feeds 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

timothydc/laravel-lightspeed-ecom-product-feeds

Composer 安装命令:

composer require timothydc/laravel-lightspeed-ecom-product-feeds

包简介

Laravel package for Lightspeed product feeds

README 文档

README

Latest Version on Packagist Total Downloads Github Tests Action Tests Github Tests Action Styling

Installation

Via Composer

$ composer require timothydc/laravel-lightspeed-ecom-product-feeds

You can publish all resources, or you may choose to publish them separately:

$ 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"

Run your migrations to create the product_feeds table.

$ php artisan migrate

You can choose to automatically run the created feeds via the task scheduler. It is also possible to generate the feeds directly or via a queue job. See config/lightspeed-ecom-product-feed.php for more configuration options.

return [
    'feed_disk' => env('LS_PRODUCT_FEEDS_FEED_DISK', 'public'),

    'scheduled_tasks' => [
        'auto_run' => env('LS_PRODUCT_FEEDS_AUTO_RUN', true),
        'use_queue' => env('LS_PRODUCT_FEEDS_USE_QUEUE', true),
        'queue' => env('LS_PRODUCT_FEEDS_QUEUE', 'default')
    ],
];

Custom feed mapping

Create your own class and let it implement ProductPayloadMappingInterface. Or take a look at TimothyDC\LightspeedEcomProductFeed\Feeds\StandardFeed for some XML data structure inspiration.

use TimothyDC\LightspeedEcomProductFeed\Interfaces\ProductPayloadMappingInterface;

class CustomProductXml implements ProductPayloadMappingInterface
{
    public function execute(string $baseUrl, array $product): array
    {
        return ['product_id' => $product['id']];
    }
}

This package also offers some template feeds for:

  • Sooqr (TimothyDC\LightspeedEcomProductFeed\Feeds\SooqrFeed)

Available commands

Create a new product feed and answer the presented questions. Enter a valid cron expression when asked. Use a FQN for your custom class.

$ php artisan ecom-feed:create

> Enter your custom mapping class:
> Enter your cron interval:
> Enter your webshop API key:
> Enter your webshop API secret:
> What language should your feed be in?

Show a list of all the currently created product feeds.

$ php artisan ecom-feed:list

Update a product feed.

$ php artisan ecom-feed:update {id}

Show a product feed configuration.

$ php artisan ecom-feed:show {id}

Remove a product feed.

$ php artisan ecom-feed:remove {id}

Generate an XML by providing a product feed ID.

$ php artisan ecom-feed:generate {id}

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Credits

License

MIT. Please see the license file for more information.

统计信息

  • 总下载量: 101
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固