Skip to content

1. Installation

Jacob Tobiasz edited this page Oct 4, 2024 · 13 revisions

The installation process of Sylius Tpay Plugin is aimed to be simple and require as few steps as possible. Sylius Tpay Plugin can be installed in an automatic way, with tools like Symfony Flex or in a traditional way, where you need to do every step by hand.

Automated installation process

Pre-requirements

1. Installing the package

composer require commerce-weavers/sylius-tpay-plugin

2. Configure Webpack

webpack.config.js:

+const cwTpayShop = CommerceWeaversSyliusTpay.getWebpackShopConfig(path.resolve(__dirname));

-module.exports = [shopConfig, adminConfig];
+module.exports = [shopConfig, adminConfig, cwTpayShop];

Adjust models

src/Entity/Order/Order.php:

<?php

// ...

+use CommerceWeavers\SyliusTpayPlugin\Model\OrderLastNewPaymentAwareInterface;
+use CommerceWeavers\SyliusTpayPlugin\Model\OrderLastNewPaymentAwareTrait;

// ...

#[ORM\Entity]
#[ORM\Table(name: 'sylius_order')]
-class Order extends BaseOrder
+class Order extends BaseOrder implements OrderLastNewPaymentAwareInterface
{
+    use OrderLastNewPaymentAwareTrait;
}

Manual installation process

Clone this wiki locally