add CountryObjectGetter to ThankYouController

This commit is contained in:
2023-08-17 09:20:58 +02:00
parent e90aba2c55
commit a49c29d7aa
3 changed files with 27 additions and 1 deletions

View File

@ -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;
}
}