add paymentType to puchase-event

extend Basket-Model to add method to get payment-desc
This commit is contained in:
2023-06-22 10:37:09 +02:00
parent fec30b1109
commit d2ef663dd3
4 changed files with 31 additions and 4 deletions

View File

@ -0,0 +1,23 @@
<?php
namespace D3\GoogleAnalytics4\Modules\Application\Model;
use OxidEsales\Eshop\Application\Model\Payment;
class Basket extends Basket_parent
{
/**
* @return void
*/
public function getPaymentOnPaymentId() :string
{
if ($this->getPaymentId()){
$oPayment = oxNew(Payment::class);
if ($oPayment->load($this->getPaymentId())){
return $oPayment->getFieldData('oxdesc');
}
}
return "couldn't load payment!";
}
}