Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm stuck at a problem,
Im using a Tea Commerce in my project. When i get into a order confirmation page i can see the ShippingInformation fields occupied. but
when i reload the same page, the values became 0 !
What might be the reason ?
Any help will be appreciated !
Do you have some code some place else that is clearing the shipping method at all? I've just tried this on the demo store and the price persists so the only thing I can think of is you have some code that is un-setting this some place else?
No., I'm calling a view in controller and inside that view i fetch order details with var order = TC.GetCurrentOrder(storeId);
This is what I'm doing
var order = TC.GetCurrentOrder(storeId);
Hmm, well, first issue I can see is that you are using the wrong method to fetch the order. For the confirmation page you should be using TC.GetCurrentFinalizedOrder(storeId)
Once the order has been captured, it will be moved to the finalized state and will be removed as the current order. Why you have a "Current Order" though initially also suggests there my be something else modifying the order when it's not meant to be modified though. But I'd start with the method above and see where that gets you.
I'm fetching it on the Confirmation page.,
The order is Finalizing as the next step, In current page, i need to show the order details like Product Price, VAT, Shipping information and Total Price.
Due to the missing of Shipping information, the Total price seems incorrect
What are you considering the confirmation page? The page before taking payment? Or the page after?
The page before taking the payment
Ahh, ok, then sorry, you are using the right method to get the current order.
Yes, We are using a custom shipping calculator, by TNT Express.
Ok, and have you debugged into that to make sure it is not malfunctioning and returning 0 under certain conditions?
I saw the shipping cost and total price mismatch after reloading,
& when i tried debugging i see the ShippingInformation getting cleared on reloading
But have you stepped through your shipping calculator code ensuring the right values are being returned on the refresh?
On my first page, the user needs to enter their address and details. while clicking proceed the shipping calculation is done and user will be redirected to a confirmation page (the page mentioned in our question) where the user can see the inputted details, price distribution, etc, and when the user click Confirm the order will be Finalized.
but in my case the Shipping cost is excluded from the Total price
Sure, I understand the issue at hand but my questions are in order to rule out whether the issue resides in some custom code or in the core product.
I need you to confirm that you’ve debug stepped through your calculator code at all steps in the checkout flow and that this is functioning as expected before I can investigate other options as right now, I’m unable to replicate the issue.
I use TNT for calculating the shipping cost, once the Shipping Cost is received i use AddOrUpdateOrderProperties to update the order property. (PFA).
After the code TC.AddOrUpdateOrderProperties(order.StoreId, orderShippingProperties); is executed i can see the shipping costs reflected in the ShippingInformation of order.
Then I'm redirecting to an view (from a controller) which is the confirmation page for user. There, on first load the order.ShipmentInformation contains values. but on reload or proceeding to the next page the value seems missing and shipping code is deducted from Total Price
So it's your order property that contains the shipping rate that is going missing that is the problem?
the order.ShipmentInformation getting cleared from current order
Ok, if you look in the database table TeaCommerce_CustomOrderProperty can you see when you set the property that this is persisted to the database? or is it never persisted? Also, can you share the code to your confirmation page so that I can review to see if there is anything that might be resetting the property?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted