Comments (5)
We are running the following composer patch in production now, and thats allowing Credit Memos to be processed successfully now.
--- Helper/OpenInvoice.php
+++ Helper/OpenInvoice.php
@@ -127,7 +127,7 @@
$product = $item->getProduct();
$imageUrl = "";
- if ($image = $product->getSmallImage()) {
+ if ($product && $image = $product->getSmallImage()) {
$imageUrl = $this->imageHelper->init($product, 'product_page_image_small')
->setImageFile($image)
->getUrl();
@@ -185,16 +185,18 @@
$formattedTaxPercentage = $this->adyenHelper->formatAmount($item->getTaxPercent(), $currency);
$product = $item->getProduct();
+ $productId = $product ? $product->getId() : $item->getProductId();
+ $productUrl = $product ? $product->getUrlModel()->getUrl($product) : '';
return [
- 'id' => $product->getId(),
+ 'id' => $productId,
'amountExcludingTax' => $formattedPriceExcludingTax,
'amountIncludingTax' => $formattedPriceIncludingTax,
'taxAmount' => $formattedTaxAmount,
'description' => $item->getName(),
'quantity' => (int) ($qty ?? $item->getQty()),
'taxPercentage' => $formattedTaxPercentage,
- 'productUrl' => $product->getUrlModel()->getUrl($product),
+ 'productUrl' => $productUrl,
'imageUrl' => $this->getImageUrl($item)
];
}
from adyen-magento2.
Hi @SamJUK,
Thank you for reporting this issue and sharing the patch with us. We have opened an internal investigation to find alternative ways of finding the ID to be used to populate the line items.
Checking your patch, with regards to the error being thrown in this line -> 'id' => $product->getId(),
, wouldn't it be necessary to change the way this ID is being fetched?
Kind regards,
Rok
from adyen-magento2.
Hi @RokPopov ,
Yes your correct, I uploaded an incomplete version of the patch. I've updated it now to the full version, essentially just replacing both id
and productUrl
in the return array with the variables defined above.
Thanks
Sam
from adyen-magento2.
Hi @SamJUK,
Thank you for adjusting the patch, much appreciated. Would you be willing to create a PR with the changes in the patch?
Kind regards,
Rok
from adyen-magento2.
@RokPopov Sure thing, opened a PR with ID #2645
from adyen-magento2.
Related Issues (20)
- Implement captureDelayHours in SFCC cartridge HOT 1
- Could not create admin order using credit card payment method. HOT 2
- Unable to get payment creation date HOT 2
- Firecheckout: Paymethods not rendering when using one step checkout HOT 5
- [ECP-9281] Multiple Shipment failed through API incase of the partial fulfillment with multi captures enabled HOT 2
- [ECP-9289] Gerar Link pay-by-link com opção parcelar o pagamento HOT 1
- [ECP-9290] Undocumented breaking change in 9.6.0 HOT 2
- [ECP-9339]Loader freezes and payment methods are not loading HOT 1
- [ECP-9281] Cannot create second capture invoice until webhook responds to first capture invoice HOT 1
- [ECP-9346]$txVariant is null when trying to vault a Google Pay Mastercard HOT 4
- Module compatibility with Upcoming changes to refusal reason HOT 1
- [ECP-9423] Missing configuration for some payment methods, exemple : kcp_creditcard, kcp_payco, kcp_naverpay HOT 3
- [ECP-9327] Magento sending to Adyen the IP of our frontend proxy instead of the IP of the shopper HOT 1
- Klarna Order Status Not Updated HOT 2
- Property with dot in name can't be serialized HOT 2
- Payment method 'oxxo' does not work HOT 2
- Klarna payment gets cancelled on paymentDetails endpoint, but then authorised successfully via webhook
- GraphQl - Add storeLocale in StoreConfig HOT 1
- Order in pending status if already cancelled HOT 1
- Order status update fails when Merchant reference changes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adyen-magento2.