Im having an issue with the final steps of my order within merchello, I can create an order fine with line items, shipping address and making and capturing a payment. The problem Im having is when the order is created I get a fulfill button, when I then go to click this button I get an error.
The following screenshots show the various errors im getting.
And i also get this in the log file:
ERROR Merchello.Core.Gateways.Shipping.ShippingGatewayProviderBase - ShipMethods could not be determined for Shipment passed to GetAvailableShipMethodsForDestination method. Attempt message: No CatalogKeys found in Shipment Items
System.ArgumentException: merchWarehouseCatalogKey.
Are you using a Bazaar build as your base or have you written your own checkout? If the later, would you mind posting the code for when you quote your shipment and add it to the CheckoutManager or SalePreparation?
This is the code. In it Im creating the line items and then creating the shipment line item, Im not very familiar with how it works and couldn't get some aspects to work, as you can see with the hard coded contry GUID. So there has to be something wrong with the code.
You need to add the warehouse catalog key to each shipment line item ... this is for inventory and (in the future) being able to ship from multiple warehouses by default.
At the top i was getting the warehouse and getting the catalog key. Then within the line item i add the first extended data is the warehouse catalog key.
Sorry bud, yes I see that now. Can you take a quick screen shot of your shipping configurations in the back office. e.g. You have a ship country configured and there is a rate table (assuming your using the default shipping provider) configured with methods for the destination country your testing with ...
The following images are of my shipping gateway that is the UK, the warehouse location, catalog, what rate-table providers i have and an example of the shipping address that is being put into one of my orders.
It doesn't seem to do anything? The reason i need the fulfill button to work is to reduce the stock count on the product, is there another way I can reduce the stock of each product in the basket?
Maybe getting current stock count, reducing it and then saving the product again?
Fulfill Button not working
Hi Guys,
Im having an issue with the final steps of my order within merchello, I can create an order fine with line items, shipping address and making and capturing a payment. The problem Im having is when the order is created I get a fulfill button, when I then go to click this button I get an error.
The following screenshots show the various errors im getting.
And i also get this in the log file:
ERROR Merchello.Core.Gateways.Shipping.ShippingGatewayProviderBase - ShipMethods could not be determined for Shipment passed to GetAvailableShipMethodsForDestination method. Attempt message: No CatalogKeys found in Shipment Items System.ArgumentException: merchWarehouseCatalogKey.
Does anyone have an idea of what Im missing?
Nathan
Hey Nathan - can you confirm that all of your products (or variants) in the order have been added to a catalog.
Hi Rusty,
Yes they are all in a catalog.
Nathan
Are you using a Bazaar build as your base or have you written your own checkout? If the later, would you mind posting the code for when you quote your shipment and add it to the CheckoutManager or SalePreparation?
I have done a custom build, The code i have written is mainly based off this post
https://our.umbraco.org/projects/collaboration/merchello/merchello/57633-Necessary-steps-to-create-and-fullfil-order
This is the code. In it Im creating the line items and then creating the shipment line item, Im not very familiar with how it works and couldn't get some aspects to work, as you can see with the hard coded contry GUID. So there has to be something wrong with the code.
Ok - the shipment rate quoting process is pretty complex.
Instead of generating your quote manually can you try:
and then add it to your invoice.
I think I see it now:
You need to add the warehouse catalog key to each shipment line item ... this is for inventory and (in the future) being able to ship from multiple warehouses by default.
Checkout the packaging strategy generally used:
https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Strategies/Packaging/DefaultWarehousePackagingStrategy.cs#L106
I was already doing that in the code I think
At the top i was getting the warehouse and getting the catalog key. Then within the line item i add the first extended data is the warehouse catalog key.
Sorry bud, yes I see that now. Can you take a quick screen shot of your shipping configurations in the back office. e.g. You have a ship country configured and there is a rate table (assuming your using the default shipping provider) configured with methods for the destination country your testing with ...
The following images are of my shipping gateway that is the UK, the warehouse location, catalog, what rate-table providers i have and an example of the shipping address that is being put into one of my orders.
This is tough without being able to step through it -
Can you comment out your line
and replace with
and see if that returns anything?
It doesn't seem to do anything? The reason i need the fulfill button to work is to reduce the stock count on the product, is there another way I can reduce the stock of each product in the basket?
Maybe getting current stock count, reducing it and then saving the product again?
Are all of your products and variants marked shippable?
This is the task that decrements the inventory count ... https://github.com/Merchello/Merchello/blob/merchello-dev/src/Merchello.Core/Chains/ShipmentCreation/RemoveShipmentOrderItemsFromInventoryAndPersistShipmentTask.cs#L68
Yeah they are, after looking at this some more i am still no closer, its an odd one that I cant seem to find any answer anywhere
Sadly this doesn't work and it just returns the quote as null so it makes it fail.
is working on a reply...