8
0
GoogleAnalytics4/Modules/Application/Model/Basket.php
MaxBUhe d2ef663dd3 add paymentType to puchase-event
extend Basket-Model to add method to get payment-desc
2023-06-22 10:37:40 +02:00

23 Zeilen
516 B
PHP

<?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!";
}
}