So I delved a little deeper into this issue. First I upgraded to Merchello 1.11 as I saw that had been verified as tested against my Umbraco Version (7.2.8) - no joy, still the same issue.
I attached Merchello Core and debugged. Here's my findings:
First of all the problem stems from from AddShippableOrderLineItemsToShipmentTask in Merchello.Core
The error: The order contains items that are either on back order or cannot be shipped.
Screenshot:
That result is returned to the ShipmentApiController which raises a HttpResponseException.
Screenshot:
On the front-end we see this, which doesn't give much info (also the exception doesn't seem to be logged to the TraceLog)
Screenshot:
I'm quite new to Merchello and from the above think that my problem stems from the fact that KeysToShip does not contain the order line item key, but I don't know what that particularly means or where to go from here.
Some context - This Merchello installation was recently moved from another environment. Machine Key was maintained in the web config (in case there is some consideration in this for fulfillment process)
In the Angular dialog that pops out when you click the "Fulfill" button, the Order is passed and any unchecked items are removed from the order (this is how orders can be split into multiple shipments).
Can you look in your database - merchOrderItem table and see if any of the line items have the backOrder field set to 1?
It may be you've upgraded from a version that was setting the back order incorrectly and this functionality was disabled in later version since the original process was way too intensive and I've not had a chance to refactor it.
Rusty thanks for your answer! I've gotten to the bottom of this and the culprit is some rogue code!
So I noticed that Order.UnfulfilledItems() was returning an empty collection (regardless of scoping to BackOrder == false), also Merchello checks that the ShipmentKey is null against the order before considering it an unfulfilled item (which makes sense). But in my case the ShipmentKey was not null even though I hadn't successfully fulfilled the order.
This led me to discover that the ShipmentService.Saved event was being subscribed to and was throwing a NotImplemented exception (external to Merchello). So while it had gotten to the point where a ShipmentKey was generated and stored against the line item, it was at this point that it would crap out and not let me complete the Shipment.
can you please help me out with reports section in back office. with merchello 1.11.0 i am not getting any package for merchello.salesReport for salesovertime and salesbyitem pages under reports tab in merchello back office.
I updated the dependencies in the plugin report code and tweaked a bit of the JS so I have them rendering again in Merchello 1.13.2.
If you need to have them render in 1.11.0, I'd suggest pulling Umbraco 7.2.8 from NuGet and Merchello 1.12.1 into the plugin project and compiling. You should be able to use the JS files I updated without any further changes.
The updates have been pushed to the Merchello-dev branch on GitHub.
thanks for the help, i updated to merchello 1.12.1 and installed the merchello.salesReport package and i got the SalesOverTime and SalesByItem pages. but while using the date filters it is erroring out on both the pages.
ON SalesByItem getting following error:
Request error: The URL returned a 404 (not found):
/umbraco/backoffice/MerchelloSalesReports/SalesByItemReportApi/merchelloReportSalesByItem
with data:
{"currentPage":0,"itemsPerPage":25,"parameters":[{"fieldName":"invoiceDateStart","value":"11/16/2015"},{"fieldName":"invoiceDateEnd","value":"12/16/2015"}],"sortBy":"invoiceDate","sortDirection":"desc"}
Contact your administrator for information.
On SalesOverTime getting following error:
Failed to retreive report data from the service
Object reference not set to an instance of an object.
EXCEPTION DETAILS:
System.NullReferenceException: Object reference not set to an instance of an object.
Still facing issue regarding the date filters in SalesByItem and SalesOverTime pages, if you can help me out with this.
i updated to merchello 1.12.1 and installed the merchello.salesReport package and i got the SalesOverTime and SalesByItem pages. but while using the date filters it is erroring out on both the pages.
ON SalesByItem getting following error:
Request error: The URL returned a 404 (not found): /umbraco/backoffice/MerchelloSalesReports/SalesByItemReportApi/merchelloReportSalesByItem with data: {"currentPage":0,"itemsPerPage":25,"parameters":[{"fieldName":"invoiceDateStart","value":"11/16/2015"},{"fieldName":"invoiceDateEnd","value":"12/16/2015"}],"sortBy":"invoiceDate","sortDirection":"desc"} Contact your administrator for information.
On SalesOverTime getting following error:
Failed to retreive report data from the service
Object reference not set to an instance of an object.
EXCEPTION DETAILS:
System.NullReferenceException: Object reference not set to an instance of an object.
Error Fulfilling Shipments - Merchello/ShipmentApi/NewShipment
Hey there Rusty,
I'm experiencing a server error when trying to fulfill shipments.
The call to /umbraco/backoffice/Merchello/ShipmentApi/NewShipment results in:
"Unexpected token while deserializing object: PropertyName. Path 'order.items[0].selected', line 1, position 2029."
Umbraco Version 7.2.8
Merchello Version 1.10.1
It seems others are having this issue:
https://our.umbraco.org/forum/umbraco-as-a-service/issues/73368-umbracobackofficemerchelloshipmentapinewshipment-500-internal-server-error
Hoping you can shed some light!
Many thanks
So I delved a little deeper into this issue. First I upgraded to Merchello 1.11 as I saw that had been verified as tested against my Umbraco Version (7.2.8) - no joy, still the same issue.
I attached Merchello Core and debugged. Here's my findings:
First of all the problem stems from from AddShippableOrderLineItemsToShipmentTask in Merchello.Core
The error: The order contains items that are either on back order or cannot be shipped.
Screenshot:
That result is returned to the ShipmentApiController which raises a HttpResponseException.
Screenshot:
On the front-end we see this, which doesn't give much info (also the exception doesn't seem to be logged to the TraceLog)
Screenshot:
I'm quite new to Merchello and from the above think that my problem stems from the fact that KeysToShip does not contain the order line item key, but I don't know what that particularly means or where to go from here.
Some context - This Merchello installation was recently moved from another environment. Machine Key was maintained in the web config (in case there is some consideration in this for fulfillment process)
Hoping someone can give guidance!
Thanks,
Alan
@Alan
The Keys to ship would be passed to the API Controller
https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/Editors/ShipmentApiController.cs#L251
in a ShipmentRequestDisplay object
https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Web/Models/Shipping/ShipmentRequestDisplay.cs
In the Angular dialog that pops out when you click the "Fulfill" button, the Order is passed and any unchecked items are removed from the order (this is how orders can be split into multiple shipments).
Can you look in your database - merchOrderItem table and see if any of the line items have the
backOrder
field set to 1?It may be you've upgraded from a version that was setting the back order incorrectly and this functionality was disabled in later version since the original process was way too intensive and I've not had a chance to refactor it.
Rusty thanks for your answer! I've gotten to the bottom of this and the culprit is some rogue code!
So I noticed that Order.UnfulfilledItems() was returning an empty collection (regardless of scoping to BackOrder == false), also Merchello checks that the ShipmentKey is null against the order before considering it an unfulfilled item (which makes sense). But in my case the ShipmentKey was not null even though I hadn't successfully fulfilled the order.
This led me to discover that the ShipmentService.Saved event was being subscribed to and was throwing a NotImplemented exception (external to Merchello). So while it had gotten to the point where a ShipmentKey was generated and stored against the line item, it was at this point that it would crap out and not let me complete the Shipment.
Thanks for your help!
Alan
Hey Alen
can you please help me out with reports section in back office. with merchello 1.11.0 i am not getting any package for merchello.salesReport for salesovertime and salesbyitem pages under reports tab in merchello back office.
@Alan / @Gurpreet
I updated the dependencies in the plugin report code and tweaked a bit of the JS so I have them rendering again in Merchello 1.13.2.
If you need to have them render in 1.11.0, I'd suggest pulling Umbraco 7.2.8 from NuGet and Merchello 1.12.1 into the plugin project and compiling. You should be able to use the JS files I updated without any further changes.
The updates have been pushed to the Merchello-dev branch on GitHub.
Hey Rusty,
thanks for the help, i updated to merchello 1.12.1 and installed the merchello.salesReport package and i got the SalesOverTime and SalesByItem pages. but while using the date filters it is erroring out on both the pages.
ON SalesByItem getting following error:
Request error: The URL returned a 404 (not found): /umbraco/backoffice/MerchelloSalesReports/SalesByItemReportApi/merchelloReportSalesByItem with data: {"currentPage":0,"itemsPerPage":25,"parameters":[{"fieldName":"invoiceDateStart","value":"11/16/2015"},{"fieldName":"invoiceDateEnd","value":"12/16/2015"}],"sortBy":"invoiceDate","sortDirection":"desc"} Contact your administrator for information.
On SalesOverTime getting following error:
Failed to retreive report data from the service
Object reference not set to an instance of an object.
EXCEPTION DETAILS:
System.NullReferenceException: Object reference not set to an instance of an object.
Hey Rusty,
Still facing issue regarding the date filters in SalesByItem and SalesOverTime pages, if you can help me out with this. i updated to merchello 1.12.1 and installed the merchello.salesReport package and i got the SalesOverTime and SalesByItem pages. but while using the date filters it is erroring out on both the pages.
ON SalesByItem getting following error:
Request error: The URL returned a 404 (not found): /umbraco/backoffice/MerchelloSalesReports/SalesByItemReportApi/merchelloReportSalesByItem with data: {"currentPage":0,"itemsPerPage":25,"parameters":[{"fieldName":"invoiceDateStart","value":"11/16/2015"},{"fieldName":"invoiceDateEnd","value":"12/16/2015"}],"sortBy":"invoiceDate","sortDirection":"desc"} Contact your administrator for information.
On SalesOverTime getting following error:
Failed to retreive report data from the service
Object reference not set to an instance of an object.
EXCEPTION DETAILS:
System.NullReferenceException: Object reference not set to an instance of an object.
thanks Rusty!
is working on a reply...