Skip to content

Commit

Permalink
feat: pseventbus v4 carrier details and taxes (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john authored Sep 11, 2024
1 parent 2b47db3 commit e99ffb6
Show file tree
Hide file tree
Showing 31 changed files with 684 additions and 1,695 deletions.
10 changes: 0 additions & 10 deletions config/common/builder.yml

This file was deleted.

4 changes: 2 additions & 2 deletions config/common/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ services:
class: PrestaShop\Module\PsEventbus\Repository\StateRepository
public: true

PrestaShop\Module\PsEventbus\Repository\TaxRepository:
class: PrestaShop\Module\PsEventbus\Repository\TaxRepository
PrestaShop\Module\PsEventbus\Repository\TaxeRepository:
class: PrestaShop\Module\PsEventbus\Repository\TaxeRepository
public: true
arguments:
- '@=service("prestashop.adapter.legacy.context").getContext()'
Expand Down
14 changes: 12 additions & 2 deletions config/front/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ imports:
- { resource: ../common/decorator.yml }
- { resource: ../common/repository.yml }
- { resource: ../common/new-repository.yml }
- { resource: ../common/builder.yml }

services:
PrestaShop\Module\PsEventbus\Service\ApiAuthorizationService:
Expand Down Expand Up @@ -85,4 +84,15 @@ services:
arguments:
- '@PrestaShop\Module\PsEventbus\Repository\NewRepository\CarrierRepository'
- '@PrestaShop\Module\PsEventbus\Repository\ConfigurationRepository'
- '@PrestaShop\Module\PsEventbus\Builder\CarrierBuilder'

PrestaShop\Module\PsEventbus\Service\ShopContent\CarrierDetailsService:
class: PrestaShop\Module\PsEventbus\Service\ShopContent\CarrierDetailsService
public: true
arguments:
- '@PrestaShop\Module\PsEventbus\Repository\NewRepository\CarrierRepository'

PrestaShop\Module\PsEventbus\Service\ShopContent\CarrierTaxesService:
class: PrestaShop\Module\PsEventbus\Service\ShopContent\CarrierTaxesService
public: true
arguments:
- '@PrestaShop\Module\PsEventbus\Repository\NewRepository\CarrierRepository'
6 changes: 3 additions & 3 deletions controllers/front/apiFront.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public function postProcess()
/** @var int $limit */
$limit = Tools::getValue('limit', 50);

/** @var bool $isFull */
$isFull = Tools::getValue('full', 0) == 1;
/** @var bool $fullSyncRequested */
$fullSyncRequested = Tools::getValue('full', 0) == 1;

/** @var bool $debug */
$debug = Tools::getValue('debug') == 1;
Expand All @@ -41,6 +41,6 @@ public function postProcess()
// edit shopContent for matching Config.php const
$shopContentEdited = str_replace('-', '_', $shopContent);

$frontApiService->handleDataSync($shopContentEdited, $jobId, $langIso, $limit, $isFull, $debug, $ise2e);
$frontApiService->handleDataSync($shopContentEdited, $jobId, $langIso, $limit, $fullSyncRequested, $debug, $ise2e);
}
}
1 change: 1 addition & 0 deletions e2e/src/fixtures/1.6/carrier_taxes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions e2e/src/fixtures/1.7/carrier_taxes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions e2e/src/fixtures/8/carrier_taxes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions e2e/src/fixtures/9/carrier_taxes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
2 changes: 2 additions & 0 deletions e2e/src/helpers/shop-contents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import R from "ramda";

export const shopContentMapping = {
'carriers': 'carriers',
'carrier_details': 'carrier-details',
'carrier_taxes': 'carrier-taxes',
'orders': 'orders',
'order_cart_rules': 'order-cart-rules',
'order_details': 'order-details',
Expand Down
Loading

0 comments on commit e99ffb6

Please sign in to comment.