We have a large shop that runs on Teacommerce 2.3.2.
Sometimes (it happens randomly) a Order is copied somewhere in the checkout process. I can see in the DB that the new Order has a "CopiedFromOrderId" with the old order id.
The problem is that all custom properties is not copied to the new order, so we lose a lot of information in the process..
So my question is: What TC method could trigger this copy function? We use all features of TC 2.3 (Shipping, Payment, Internationalization).
An explanation of CopiedFromOrderId could also help me a lot in the debug process :)
Hi Morten
The CopiedFromOrderId is set when an order is cloned. This happens when you generate the payment form for an order - this locks the order for further changes. If you then do ANYTHING with the order using the HTML/JavaScript/Razor or XSLT API then the order will be copied. So try and look if any of your code does anything after the order has been "GeneratedPaymentForm()". But when its cloned it should copy all properties, order lines etc.
Ah-ha, I had the same thing yesterday with OrderLines, couldn't work out why their Id was changing! Thanks for the explanation!
With that in mind, does it make sense to only call GeneratePaymentForm on a 'silent' payment page, rather than on the 'Accept' page, so the order is only copied and frozen once the user actually goes to pay, rather than before? Or is there no real overhead in doing so?
Thank you Anders! I think I know the problem now.. We call GeneratedPaymentForm() on the payment page.. if the user goes back and change something in the process, and then go to payment again.. GeneratedPaymentForm() will then be called again. The problem must be this..
And as Paul says.. some doc to CopiedFromOrderId would be nice :)
On the silent page you can generate the payment form with a submit button so people without JS can click the button. The ones with JS will auto post using e.g jQuery
What triggers "CopiedFromOrderId"
We have a large shop that runs on Teacommerce 2.3.2.
Sometimes (it happens randomly) a Order is copied somewhere in the checkout process. I can see in the DB that the new Order has a "CopiedFromOrderId" with the old order id. The problem is that all custom properties is not copied to the new order, so we lose a lot of information in the process..
So my question is: What TC method could trigger this copy function? We use all features of TC 2.3 (Shipping, Payment, Internationalization).
An explanation of CopiedFromOrderId could also help me a lot in the debug process :)
Thanks!
Hi Morten The CopiedFromOrderId is set when an order is cloned. This happens when you generate the payment form for an order - this locks the order for further changes. If you then do ANYTHING with the order using the HTML/JavaScript/Razor or XSLT API then the order will be copied. So try and look if any of your code does anything after the order has been "GeneratedPaymentForm()". But when its cloned it should copy all properties, order lines etc.
Kind regards
Anders
This one got me as well. As I was unsure why a lot of CARTS were being re-generated/copied.
Maybe put something in the TC docs about what happens when you put the payment form button on a page.
Ah-ha, I had the same thing yesterday with OrderLines, couldn't work out why their Id was changing! Thanks for the explanation!
With that in mind, does it make sense to only call GeneratePaymentForm on a 'silent' payment page, rather than on the 'Accept' page, so the order is only copied and frozen once the user actually goes to pay, rather than before? Or is there no real overhead in doing so?
Phil
To get the checkout flow to work as my client wants it a "Silent page" is something I had to go down (for the time being)
But this now requires the user to have JS enabled, to trigger the form button submit. Then again, most of the site requires JS to be on :-)
Thank you Anders! I think I know the problem now.. We call GeneratedPaymentForm() on the payment page.. if the user goes back and change something in the process, and then go to payment again.. GeneratedPaymentForm() will then be called again. The problem must be this..
And as Paul says.. some doc to CopiedFromOrderId would be nice :)
On the silent page you can generate the payment form with a submit button so people without JS can click the button. The ones with JS will auto post using e.g jQuery
is working on a reply...