November Happy Hour will be moved to Thursday December 5th.

Shipping Cost is Missing in Admin Portal when an Order Opened

Vote:
 

Hello World,

I'm having an issue in admin portal that the shipping cost will be zero when the order detail is opened in the admin portal order management.

From:

Shipment Summary
Item Subtotal: Rp1.500
Shipping Cost: Rp1.500
Shipping Discount: Rp0
Shipment Total: Rp3.000

To:

Shipment Summary
Item Subtotal: Rp1.500
Shipping Cost: Rp0
Shipping Discount: Rp0
Shipment Total: Rp1.500

My queries are;

First, can somebody help me to explain what is that item subtotal? And why is that using the same value with shipping cost?

Second, why is the shipping cost gone when I opened the order detail in the admin portal order management? Can it be fixed?

When the shipping turning into zero, it will give zero value as well in the order email. So it will be an issue for the receiver.

Thanks.

#271461
Feb 10, 2022 7:51
Vote:
 

Hi Jefry,

The from section, is the shipping cost rp1.500 before you convert from cart to purchase order?

Got any custom calculators implemented?

#271470
Feb 10, 2022 8:50
Vote:
 

Hi Surjit,

We implemented some workflows to calculate the shipping cost. Here we calculating shipping cost as freight charge.

So the Rp 1.500 is after the purchase order. The value is in the admin portal order details.

Any idea?

Thanks.

#271472
Feb 10, 2022 9:27
Vote:
 

Your workflows are not being called Order Management and are calling the default out of the box calculators. Can you post how you are registering the workflows in code?

#271473
Feb 10, 2022 9:31
Vote:
 

Hi Surjit,

Workflows are simple c# methods. These methods are calling when we add product cart and purchase. But we are not calling these workflows from admin portal. I don't know how the value of shipping cost will be overriding to zero when we click on order in "Purchase Order".

Thanks.

#271474
Feb 10, 2022 9:46
Vote:
 

So...when you convert from cart to a purchase order...whether that be from in code or from order management...IShipmentProcessor is executed against them. Make sure when you do convert to a PurchaseOrder, that your custom workflows are being executed. Set a breakpoint against your simple c# methods to test.

Your simple c# methods should really be inside a custom implementation of IShipmentProcessor...and then you register that in depdency injection. So regardless of where you convert from cart to purchaseorder...your custom code will kick in.

#271475
Feb 10, 2022 9:52
Vote:
 

I have seen in the code , we have not implemented "IShipmentProcessor" any where.

#271477
Feb 10, 2022 10:08
Vote:
 

What version of Commerce are you running?

#271479
Feb 10, 2022 10:29
Vote:
 

It is version 13 Surjit.

#271480
Feb 10, 2022 10:44
Vote:
 

If you're manipulating the shipping cost calculation then your logic should be in here: https://world.optimizely.com/documentation/developer-guides/commerce/orders/calculating-orders-intro/calculating-orders-shipping-calculator/

A little more information about where your custom code is running in relation to the checkout / cart / purchase order journeywould give some better insight.

#271481
Feb 10, 2022 10:56
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.