Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility with Prestashop 8.0.0 on demovieworderhooks module #114

Merged
merged 1 commit into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'