Support the development of TastyIgniter Learn more
Hi guys! I’m wondering how to set a payment by default. I know that’s possible from Admin -> Sales -> Payments
However the user always have to click the payment method to be enabled otherwise “confirm” button doesn’t work. Thanks!
I have this issue too, despite a payment method being selected as default.
Change line #14 in themes/tasty-igniter-orange/_partials/checkout/payments.php to
$paymentIsSelected = ($order->payment == $paymentGateway->code || ($order->payment === NULL && $paymentGateway->is_default));
Also, make sure you only have 1 payment method set as default.
ryanmitchell Thanks for your answer, however this only selects the option but if you click in “Confirm” gives an error
SQLSTATE: Integrity constraint violation: 1048 Column 'payment' cannot be null
Unless the user clicks the option the process doesn’t continue.
Probably needed updated in Cartbox.php then - sorry I thought that would be a quick fix for you.
ryanmitchell Yeah I’ve been working with cartbox but haven’t found a solution. Thanks a lot for your help!
Did you try adding $this->orderManager->setCurrentPaymentCode(‘code-of-payment’); inside construct in Cartbox.php ?
Hmm, I’ve added this to my list of features to complete before the next update 😉