From c7c9329d450178194cb9aae8216242baf30e9e4b Mon Sep 17 00:00:00 2001 From: Maxime Flasquin Date: Thu, 13 Oct 2022 10:53:50 +0200 Subject: [PATCH] Add compatibility with Prestashop 8.0.0 on demovieworderhooks module --- demovieworderhooks/README.md | 2 +- demovieworderhooks/config/services.yml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/demovieworderhooks/README.md b/demovieworderhooks/README.md index 5d17811f..de110590 100644 --- a/demovieworderhooks/README.md +++ b/demovieworderhooks/README.md @@ -1,7 +1,7 @@ Demo View Order Hooks ===================== -This module was created in order to demonstrate how to use the new hooks introduced with the new "View an Order" back-office page in PrestaShop 1.7.7.0 . +This module was created in order to demonstrate how to use the new hooks introduced with the new "View an Order" back-office page in PrestaShop 8.0.0 and below. It uses the following hooks: - displayAdminOrderTabContent diff --git a/demovieworderhooks/config/services.yml b/demovieworderhooks/config/services.yml index 9a1f7ec8..9cbe169f 100755 --- a/demovieworderhooks/config/services.yml +++ b/demovieworderhooks/config/services.yml @@ -10,45 +10,54 @@ services: prestashop.module.demovieworderhooks.repository.order_repository: class: PrestaShop\Module\DemoViewOrderHooks\Repository\OrderRepository + public: true prestashop.module.demovieworderhooks.repository.order_signature_repository: class: PrestaShop\Module\DemoViewOrderHooks\Repository\OrderSignatureRepository + public: true factory: ['@doctrine.orm.default_entity_manager', getRepository] arguments: - PrestaShop\Module\DemoViewOrderHooks\Entity\OrderSignature prestashop.module.demovieworderhooks.repository.order_review_repository: class: PrestaShop\Module\DemoViewOrderHooks\Repository\OrderReviewRepository + public: true factory: ['@doctrine.orm.default_entity_manager', getRepository] arguments: - PrestaShop\Module\DemoViewOrderHooks\Entity\OrderReview prestashop.module.demovieworderhooks.repository.package_location_repository: class: PrestaShop\Module\DemoViewOrderHooks\Repository\PackageLocationRepository + public: true factory: ['@doctrine.orm.default_entity_manager', getRepository] arguments: - PrestaShop\Module\DemoViewOrderHooks\Entity\PackageLocation prestashop.module.demovieworderhooks.presenter.orders_presenter: class: PrestaShop\Module\DemoViewOrderHooks\Presenter\OrdersPresenter + public: true arguments: - '@router.default' - '@prestashop.core.localization.locale.context_locale' prestashop.module.demovieworderhooks.presenter.order_signature_presenter: class: PrestaShop\Module\DemoViewOrderHooks\Presenter\OrderSignaturePresenter + public: true arguments: - '@=service("prestashop.module.demovieworderhooks").getPathUri() ~ parameter("signatureImgDirectory")' prestashop.module.demovieworderhooks.presenter.order_review_presenter: class: PrestaShop\Module\DemoViewOrderHooks\Presenter\OrderReviewPresenter + public: true prestashop.module.demovieworderhooks.presenter.package_locations_presenter: class: PrestaShop\Module\DemoViewOrderHooks\Presenter\PackageLocationsPresenter + public: true calls: - { method: setTranslator, arguments: ['@translator'] } prestashop.module.demovieworderhooks.presenter.order_link_presenter: class: PrestaShop\Module\DemoViewOrderHooks\Presenter\OrderLinkPresenter + public: true arguments: - '@router.default'