add CountryObjectGetter to ThankYouController
Cette révision appartient à :
Parent
e90aba2c55
révision
a49c29d7aa
@ -24,4 +24,5 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model{
|
||||
|
||||
namespace D3\GoogleAnalytics4\Modules\Application\Controller{
|
||||
class BasketController_parent extends \OxidEsales\Eshop\Application\Controller\BasketController {}
|
||||
class ThankYouController_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
|
||||
}
|
22
Modules/Application/Controller/ThankYouController.php
Fichier normal
22
Modules/Application/Controller/ThankYouController.php
Fichier normal
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace D3\GoogleAnalytics4\Modules\Application\Controller;
|
||||
|
||||
use OxidEsales\Eshop\Application\Model\Country;
|
||||
|
||||
class ThankYouController extends ThankYouController_parent
|
||||
{
|
||||
/**
|
||||
* @return Country
|
||||
*/
|
||||
public function d3GAGetUserCountry()
|
||||
{
|
||||
$sCountryId = $this->getOrder()->getFieldData('oxbillcountryid');
|
||||
|
||||
/** @var Country $oCountry */
|
||||
$oCountry = oxNew(Country::class);
|
||||
$oCountry->load($sCountryId);
|
||||
|
||||
return $oCountry;
|
||||
}
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
use D3\GoogleAnalytics4\Modules\Application\Controller\BasketController;
|
||||
use D3\GoogleAnalytics4\Modules\Application\Controller\ThankYouController;
|
||||
use D3\GoogleAnalytics4\Modules\Application\Model\Basket as Basket;
|
||||
use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
|
||||
use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
|
||||
use OxidEsales\Eshop\Application\Controller\BasketController as OEBasketController;
|
||||
use OxidEsales\Eshop\Application\Controller\ThankYouController as OEThankYouController;
|
||||
use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
|
||||
use OxidEsales\Eshop\Application\Model\Category as OECategory;
|
||||
use OxidEsales\Eshop\Core\ViewConfig as OEViewConfig;
|
||||
@ -32,7 +34,8 @@ $aModule = [
|
||||
OEViewConfig::class => ViewConfig::class,
|
||||
OECategory::class => Category::class,
|
||||
OEBasket::class => Basket::class,
|
||||
OEBasketController::class => BasketController::class
|
||||
OEBasketController::class => BasketController::class,
|
||||
OEThankYouController::class => ThankYouController::class
|
||||
],
|
||||
'templates' => [],
|
||||
'blocks' => [
|
||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user