Skip to content

Conversation

@chrcan
Copy link

@chrcan chrcan commented Nov 12, 2025

To test the new extcode/cart_paypal extension, some files in extcode/cart need to be modified:

cart/Configuration/TCA/tx_cart_domain_model_cart.php

'paypal_order_id' => [
    'exclude' => 1,
    'label' => $_LLL_PAYPAL . ':tx_cart_domain_model_cart.paypal_order_id',
    'config' => [
        'type' => 'input',
        'size' => 30,
        'eval' => 'trim',
        'readOnly' => 1,
    ],
],

cart/Classes/Domain/Repository/CartRepository.php

use Extcode\Cart\Domain\Model\Cart;
use TYPO3\CMS\Extbase\Persistence\Repository;

class CartRepository extends Repository {

    public function findOneByPaypalOrderId(string $paypalOrderId): ?Cart
    {
        $query = $this->createQuery();
        $query->matching(
            $query->equals('paypalOrderId', $paypalOrderId)
        );
        return $query->execute()->getFirst();
    }

}

cart/Classes/Domain/Model/Cart.php

protected $paypalOrderId = '';

public function getPaypalOrderId(): string
{
    return $this->paypalOrderId;
}

public function setPaypalOrderId(string $paypalOrderId): void
{
    $this->paypalOrderId = $paypalOrderId;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant