piedweb/reservation-bundle

此包已被废弃,不再维护。作者建议使用 pushword/core 包。

将您的CMS转换成预订平台。

dev-master 2018-12-13 21:04 UTC

This package is auto-updated.

Last update: 2022-02-24 23:59:21 UTC


README

PiedWeb.com

预订组件

将您的 PiedWeb CMS 转换成预订平台。

此组件提供完整的订单流程管理(产品、购物车、订单、支付)。

安装

通过 Packagist

# Get the Bundle
composer require piedweb/reservation-bundle

# Set basic conf:

# Copy files from install to your src folder (erase)

# Add route in `config/routes.yaml`
reservation:
    resource: '@PiedWebReservationBundle/Resources/config/routes/reservation.yaml'

# Edit config/bundles.php and reorder with this in first:
    PiedWeb\ReservationBundle\PiedWebReservationBundle::class => ['all' => true],
# (because now, we use app.entity_order in CMSBundle and we need to load ReservationBundle's config before)

# Config payum's gateways in `config/packages/payum.yaml` (eg :
payum:
    gateways:
        paypal_checkout_button:
            # https://developer.paypal.com/docs/checkout/integrate/#4-test-it
            factory: paypal_express_checkout
            #username: ''
            #password: ''
            #signature: ''
            #sandbox: true

使用方法

自定义跳转器最后一步(预订成功)

通过创建一个slug为step-6的页面。仅使用主要内容。考虑将发布禁用,将创建日期设置为今天+100年。

添加新的支付方式

  • 创建支付方式。见 src/PaymentMethod 的示例。

  • 创建支付控制器操作。见 src/Controller/PaymentController.php 的示例。

  • 在您的 templates/bundles/PiedWebReservationBundle/PaymentMethod/HumanId.html.twig 中创建相应的twig文件

  • 编辑配置

piedweb_reservation:
    ...
    payment_method:
        - PiedWeb\ReservationBundle\PaymentMethod\PaypalCheckoutExpress
        - PiedWeb\ReservationBundle\PaymentMethod\Cash
        - YourNewMethodClass

待办事项

  • 测试
  • 添加其他支付方式(目前管理:paypal express checkout)
  • 国际化和翻译测试

稍后

使用方法

贡献者

在提交前检查编码标准

php-cs-fixer fix src --rules=@Symfony --verbose && php-cs-fixer fix src --rules='{"array_syntax": {"syntax": "short"}}' --verbose

许可

MIT(有关详细信息,请参阅LICENSE文件)