-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom event #76
Comments
I found another part in the code which needs the same condition, the EsdCartService. The final solution needs to be implemented before any call of the checkProductsWithSerialKey function. public function isCanCheckoutOrder(Cart $cart, Context $context): bool
{
$lineItemIds = [];
try {
foreach ($cart->getLineItems() as $lineItem) {
try {
Uuid::fromHexToBytes($lineItem->getId());
} catch (\Exception $e) {
continue;
}
$lineItemIds[] = $lineItem->getId();
}
$this->checkProductsWithSerialKey($lineItemIds, $context);
return true;
} catch (ProductNotEnoughSerialException $exception) {
return false;
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We use plugins for customized products. In this case, for example. These are stored separately in the shopping cart and therefore need a changed UUID. In the current version of your plugin, the following position is called in the CartSubscriber and causes a failed UUID check on these positions.
We have now solved the customer's problem by excluding these products from the check by performing a UUID check ourselves and catching the exception.
It would also be conceivable to install an event for which you can register to prevent the examination. Could you please consider something like this for your next plugin version?
The text was updated successfully, but these errors were encountered: