Skip to content

Commit

Permalink
Merge pull request #455 from GSadee/improve-installation-guide
Browse files Browse the repository at this point in the history
Improve installation guide + hide refund button next to the payment
  • Loading branch information
mpysiak authored Nov 28, 2024
2 parents 94d723b + b0f5e2f commit 812f0c0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ From Administrator's point of view, every Refund request results in creating two
bin/console doctrine:migrations:migrate
```

1. Install assets:

Add the following line to your `assets/admin/entry.js` file:

```js
import '../../vendor/sylius/refund-plugin/assets/entrypoint';
```

1. Run `yarn encore dev` or `yarn encore production`

1. Default configuration assumes enabled PDF file generator. If you don't want to use that feature change your app configuration:
```yaml
Expand Down
4 changes: 4 additions & 0 deletions config/app/twig_hooks/admin/order/show.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ sylius_twig_hooks:
template: '@SyliusRefundPlugin/order/admin/content/sections/payments/refund_items.html.twig'
priority: -200

'sylius_admin.order.show.content.sections.payments.item.actions':
refund:
enabled: false

'sylius_admin.order.show.content.sections.payments.refund_header':
title:
template: '@SyliusRefundPlugin/order/admin/content/sections/payments/header/title.html.twig'
Expand Down
18 changes: 10 additions & 8 deletions docs/legacy_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@
sylius_refund:
resource: "@SyliusRefundPlugin/config/routing.yml"
````

1. Check if you have `wkhtmltopdf` binary. If not, you can download it [here](https://wkhtmltopdf.org/downloads.html).

In case `wkhtmltopdf` is not located in `/usr/local/bin/wkhtmltopdf`, add a following snippet at the end of your application's `.env`:

```yaml
WKHTMLTOPDF_PATH=/path/to/your/wkhtmltopdf
```

1. Apply migrations to your database:

Expand All @@ -50,6 +42,16 @@
import '../../vendor/sylius/refund-plugin/assets/entrypoint';
```

1. Run `yarn encore dev` or `yarn encore production`

1. Check if you have `wkhtmltopdf` binary. If not, you can download it [here](https://wkhtmltopdf.org/downloads.html).

In case `wkhtmltopdf` is not located in `/usr/local/bin/wkhtmltopdf`, add a following snippet at the end of your application's `.env`:

```yaml
WKHTMLTOPDF_PATH=/path/to/your/wkhtmltopdf
```

1. Clear cache:

```bash
Expand Down

0 comments on commit 812f0c0

Please sign in to comment.