Posted on 18/05/2021 17:03:24
Hi again
Just writing a quick update on this one.
There seemed to be something weird going on either with the code unit or with the Integration Customer Center in DW 9.10.8.
After code unit was updated to version 1.2.0.14 we did not receive the error described at first from the test tool.
When using the test tool on the new version all related calls seemed to work fine, so at least this was a step forward:
- GetList
- GetItem
- GetPDFForItem
But when navigating to the site’s ICC it did not work completely.
- For the item type “Invoice” buttons “View invoice” and “Download PDF” both worked.
- For the item type “OpenOrders” the button “View Invoice” triggering orderModal.ShowOrderModal('{orderID}') worked fine as well, but the button “Download PDF” did not work.
- View invoice uses this URL for getting the data “/Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=OpenOrder&id={orderID}”
- Download PDF uses this URL for getting data “Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=Order&id={orderID}&forceDownload=true”. The type requested is different and if I change “type=Order” to “type=OpenOrder” this works again.
This has been working at some point, so maybe “Order” had been converted to “OpenOrder” in a previous version. We have not changed any of the related .cshtml files nor upgraded Rapido, only updating the DW version.
I have updated this .cshtml file “Files\Templates\Designs\Rapido\eCom\IntegrationCustomerCenter\Orders.cshtml” replacing this line “Href = "/Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=Order&id=" + orderId + "&forceDownload=true"” with this “Href = "/Admin/public/CustomerCenter/RequestExternalPdf.aspx?type=OpenOrder&id=" + orderId + "&forceDownload=true"” and this seems to do the trick.
BR Chris