Skip to content

Commit

Permalink
Merge pull request #114 from mflasquin/improve/108-demovieworderhooks
Browse files Browse the repository at this point in the history
Add compatibility with Prestashop 8.0.0 on demovieworderhooks module
  • Loading branch information
matks authored Oct 19, 2022
2 parents 18fe9dc + c7c9329 commit 0d34f43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion demovieworderhooks/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions demovieworderhooks/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 0d34f43

Please sign in to comment.