Skip to content

Commit

Permalink
Install RefundPlugin (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
GSadee authored Dec 12, 2024
2 parents 53bb7f1 + a62ad53 commit 0f9a9b7
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 2 deletions.
1 change: 1 addition & 0 deletions assets/admin/entrypoint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../../vendor/sylius/refund-plugin/assets/entrypoint';
Empty file removed assets/shop/entry.js
Empty file.
File renamed without changes.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"php": "^8.2",
"sylius/invoicing-plugin": "2.0.x-dev",
"sylius/paypal-plugin": "2.0.x-dev",
"sylius/refund-plugin": "2.0.x-dev",
"sylius/sylius": "2.0.x-dev",
"symfony/flex": "^2.4"
},
Expand Down
1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true],
Sylius\RefundPlugin\SyliusRefundPlugin::class => ['all' => true],
];
16 changes: 16 additions & 0 deletions config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,19 @@ sylius_product:
product:
classes:
model: App\Entity\Product\Product

sylius_twig_hooks:
hooks:
'sylius_admin.base#stylesheets':
app_styles:
template: 'admin/stylesheets.html.twig'
'sylius_admin.base#javascripts':
app_javascripts:
template: 'admin/javascripts.html.twig'

'sylius_shop.base#stylesheets':
app_styles:
template: 'shop/stylesheets.html.twig'
'sylius_shop.base#javascripts':
app_javascripts:
template: 'shop/javascripts.html.twig'
2 changes: 2 additions & 0 deletions config/packages/sylius_refund.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports:
- { resource: "@SyliusRefundPlugin/config/config.yaml" }
2 changes: 2 additions & 0 deletions config/packages/webpack_encore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ webpack_encore:
builds:
shop: '%kernel.project_dir%/public/build/shop'
admin: '%kernel.project_dir%/public/build/admin'
app.admin: '%kernel.project_dir%/public/build/app/admin'
app.shop: '%kernel.project_dir%/public/build/app/shop'
script_attributes:
defer: true
2 changes: 2 additions & 0 deletions config/routes/sylius_refund.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sylius_refund:
resource: "@SyliusRefundPlugin/config/routes.yaml"
13 changes: 13 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,19 @@
"sylius/paypal-plugin": {
"version": "2.0.x-dev"
},
"sylius/refund-plugin": {
"version": "2.0",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "main",
"version": "0.4",
"ref": "a3f813f608c6f04bd7d0b4cefd73a96bf378c390"
},
"files": [
"config/packages/sylius_refund.yaml",
"config/routes/sylius_refund.yaml"
]
},
"sylius/registry": {
"version": "v1.4.1"
},
Expand Down
1 change: 1 addition & 0 deletions templates/admin/javascripts.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ encore_entry_script_tags('app-admin-entry', null, 'app.admin') }}
1 change: 1 addition & 0 deletions templates/admin/stylesheets.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ encore_entry_link_tags('app-admin-entry', null, 'app.admin') }}
1 change: 1 addition & 0 deletions templates/shop/javascripts.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ encore_entry_script_tags('app-shop-entry', null, 'app.shop') }}
1 change: 1 addition & 0 deletions templates/shop/stylesheets.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ encore_entry_link_tags('app-shop-entry', null, 'app.shop') }}
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const shopConfig = SyliusShop.getWebpackConfig(path.resolve(__dirname));
Encore
.setOutputPath('public/build/app/shop')
.setPublicPath('/build/app/shop')
.addEntry('app-shop-entry', './assets/shop/entry.js')
.addEntry('app-shop-entry', './assets/shop/entrypoint.js')
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
Expand All @@ -32,7 +32,7 @@ Encore.reset();
Encore
.setOutputPath('public/build/app/admin')
.setPublicPath('/build/app/admin')
.addEntry('app-admin-entry', './assets/admin/entry.js')
.addEntry('app-admin-entry', './assets/admin/entrypoint.js')
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
Expand Down

0 comments on commit 0f9a9b7

Please sign in to comment.