Is it possible to add a new property to an order object. I want to add an extra address field but I'm not sure how to hook this field up with the order?
Yes it is... Before that your need add Generic property field on related document type, and then go to this javascript file "teacommerce_simple.js" to this method "sendCustomerInformation" and add another property in "formObj"
Adding a custom property to an order
Hi,
Is it possible to add a new property to an order object. I want to add an extra address field but I'm not sure how to hook this field up with the order?
Thanks,
Robert
Yes it is... Before that your need add Generic property field on related document type, and then go to this javascript file "teacommerce_simple.js" to this method "sendCustomerInformation" and add another property in "formObj"
var formObj = {
company: paymentInformation.find("#company").val(),
firstName: paymentInformation.find("#firstName").val(),
lastName: paymentInformation.find("#lastName").val(),
city: paymentInformation.find("#city").val(),
zipCode: paymentInformation.find("#zipCode").val(),
streetAddress: paymentInformation.find("#streetAddress").val(),
phone: paymentInformation.find("#phone").val(),
email: paymentInformation.find("#email").val(),
comments: jQuery("#comments").val(),
shipping_firstName: shippingInformation.find("#shippingFirstName").val(),
shipping_lastName: shippingInformation.find("#shippingLastName").val(),
shipping_streetAddress: shippingInformation.find("#shippingStreetAddress").val(),
shipping_zipCode: shippingInformation.find("#shippingZipCode").val(),
shipping_city: shippingInformation.find("#shippingCity").val(),
Your Property: filed value
};
Then it should work... :)
Perfect, thanks Rehan, the JavaScript was the missing piece of the puzzle!
Robert
is working on a reply...