You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Entering an invalid coupon code in the basket checkout page causes the "Checkout" button to disappear.
Before entering the code:
After entering the code:
This is because the template at aimeos/ai-client-html/templates/client/html/basket/standard/body.php performs an additional check about whether to show the button or not. To make the button appear, the view's property standardCheckout must be set to true:
This property is set in aimeos/ai-client-html/src/Client/Html/Basket/Standard/Standard.php in line 141. However this line will never be reached if an invalid coupon code is entered, as like 108 will throw an exception in that case, so the control flow goes straight to line 146 in the catch block:
The text was updated successfully, but these errors were encountered:
In theory it should work, unless the code moved to finally can cause some exceptions as well. But these methods seem to be rather small and well-tested ($view->config(), $view->param()), so it looks like a feasible solution.
The check() method throws an exception if the basket content isn't valid for checkout but then, the checkout button shouldn't be shown anyway. The change is now available in this commit: cf7fb21 (also available for 2024.10.x-dev)
Entering an invalid coupon code in the basket checkout page causes the "Checkout" button to disappear.
Before entering the code:
After entering the code:
This is because the template at
aimeos/ai-client-html/templates/client/html/basket/standard/body.php
performs an additional check about whether to show the button or not. To make the button appear, the view's propertystandardCheckout
must be set to true:This property is set in
aimeos/ai-client-html/src/Client/Html/Basket/Standard/Standard.php
in line 141. However this line will never be reached if an invalid coupon code is entered, as like 108 will throw an exception in that case, so the control flow goes straight to line 146 in thecatch
block:The text was updated successfully, but these errors were encountered: