定制 tilleuls/sylius-click-n-collect-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tilleuls/sylius-click-n-collect-plugin

Composer 安装命令:

composer require tilleuls/sylius-click-n-collect-plugin

包简介

Click and Collect plugin for Sylius, to sell and deliver securely during the COVID-19 pandemic.

README 文档

README

Click 'N' Collect Approved by Sylius

Sell and hand over securely during the coronavirus pandemic!

Because of the coronavirus pandemic, a large part of the world is under lockdown and most shops are closed or with long queues.

Sylius Click 'N' Collect is a solution to sell and hand over your products safely during the lockdown (and even after that). By allowing contactless pick up and preventing queues, Sylius Click 'N' Collect protects your workers and your customers.

Sylius Click 'N' Collect is a plugin for the Sylius eCommerce platform. It's free (as in speech, and as in beer), and it's brought to you by your friends from Les-Tilleuls.coop. It can also be used in addition to all the existing features and plugins of Sylius.

CI

How Does It Work?

Screencast

As a customer:

  1. Go on the shop's website
  2. Select the products to order
  3. Select the collect location (e.g. the physical shop)
  4. Select an available time slot
  5. Pay online, or select in-store payment (Stripe and PayPal are also supported).
  6. Optional: a PIN is generated, you'll need it to retrieve the order
  7. Pick up your order at the shop during the selected time slot! Use the PIN code to unlock the box if appropriate.

As a seller:

  1. Use the timetable in the admin interface to see the upcoming orders
  2. Prepare the orders: put them in a bag and make the order number noticeable (staple it or use a marker)
  3. Clean carefully the shelf and the lock (if appropriate) with the appropriate cleaning products
  4. Put the bag in the shelf
  5. Optional: use the PIN to lock the box in the shelf to secure the order
  6. Monitor the pick up from afar, from behind a window, or using CCTV

Repeat!

You're now selling while preventing the pandemic to spread!

Install

Note: to test the plugin locally, see CONTRIBUTING.md

  1. Install Sylius

  2. Install Sylius Click 'N' Collect: composer require tilleuls/sylius-click-n-collect-plugin

  3. Register the bundle:

    <?php
    
    // config/bundles.php
    
    return [
        // ...
        CoopTilleuls\SyliusClickNCollectPlugin\CoopTilleulsSyliusClickNCollectPlugin::class => ['all' => true],
    ];
  4. Import the configuration:

    # config/packages/sylius_click_n_collect.yaml
    imports:
        - { resource: "@CoopTilleulsSyliusClickNCollectPlugin/Resources/config/app/config.yml" }
  5. Import the routes:

    # config/routes/sylius_click_n_collect.yaml
    coop_tilleuls_sylius_click_n_collect_shop:
        resource: "@CoopTilleulsSyliusClickNCollectPlugin/Resources/config/shop_routing.yml"
        prefix: /{_locale}
        requirements:
            _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
    
    coop_tilleuls_sylius_click_n_collect_admin:
        resource: "@CoopTilleulsSyliusClickNCollectPlugin/Resources/config/admin_routing.yml"
        prefix: /admin
  6. Update the native entities:

    <?php
    
    // src/Entity/Shipping/ShippingMethod.php
    
    namespace App\Entity\Shipping;
    
    use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShippingMethod;
    use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShippingMethodInterface;
    use Doctrine\ORM\Mapping as ORM;
    use Sylius\Component\Core\Model\ShippingMethod as BaseShippingMethod;
    
    /**
     * @ORM\Entity
     * @ORM\Table(name="sylius_shipping_method")
     */
    class ShippingMethod extends BaseShippingMethod implements ClickNCollectShippingMethodInterface
    {
        use ClickNCollectShippingMethod {
            __construct as initializeShippingMethodLocations;
        }
    
        public function __construct()
        {
            parent::__construct();
    
            $this->initializeShippingMethodLocations();
        }
    
        // ...
    }
    <?php
    
    // src/Entity/Shipping/Shipment.php
    
    namespace App\Entity\Shipping;
    
    use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShipment;
    use CoopTilleuls\SyliusClickNCollectPlugin\Entity\ClickNCollectShipmentInterface;
    use CoopTilleuls\SyliusClickNCollectPlugin\Validator\Constraints\SlotAvailable;
    use Doctrine\ORM\Mapping as ORM;
    use Sylius\Component\Core\Model\Shipment as BaseShipment;
    
    /**
    * @ORM\Entity
    * @ORM\Table(name="sylius_shipment", indexes={@ORM\Index(columns={"location_id", "collection_time"})})
    * @SlotAvailable(groups={"sylius"})
    */
    class Shipment extends BaseShipment implements ClickNCollectShipmentInterface
    {
       use ClickNCollectShipment;
    }
  7. Override the templates:

    cp -R vendor/tilleuls/sylius-click-n-collect-plugin/tests/Application/templates/* templates
    
  8. Create and execute database migrations:

    bin/console doctrine:migrations:diff
    bin/console doctrine:migrations:migrate
    
  9. Copy the assets

    bin/console assets:install
    bin/console sylius:theme:assets:install
    
  10. Add your products and stocks or import them

  11. Configure the pick up locations, the available time slots, and how many people you can safely serve in parallel

  12. Create a dedicated shipping method

  13. Optionally, configure an online payment method from the admin (Stripe and PayPal are supported out of the box)

Export data

see docs/exports.md

You're ready to sell!

License

Pandemic Clause

To use this software, you MUST ensure that all the workers and customers using it aren't at risk! It means that you MUST reduce the number of contacts between the workers and customers (in most cases the delivery should be contactless), and that you MUST provide masks, hand sanitizers and gloves to the workers who handle products.

Lives matter more than profits.

AGPL

Sylius Click 'N' Collect is licensed under AGPL-3.0. For companies not wanting, or not able to use AGPL-3.0 licensed software, commercial licenses are also available. Contact us for more information.

Credits

Created by Kévin Dunglas for Les-Tilleuls.coop. Commercial support available at Les-Tilleuls.coop.

tilleuls/sylius-click-n-collect-plugin 适用场景与选型建议

tilleuls/sylius-click-n-collect-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14.59k 次下载、GitHub Stars 达 78, 最近一次更新时间为 2020 年 03 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「sylius」 「shipping」 「pickup」 「sylius-plugin」 「covid-19」 「click-and-collect」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 tilleuls/sylius-click-n-collect-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 tilleuls/sylius-click-n-collect-plugin 我们能提供哪些服务?
定制开发 / 二次开发

基于 tilleuls/sylius-click-n-collect-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 14.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 78
  • 点击次数: 16
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 78
  • Watchers: 4
  • Forks: 34
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2020-03-30