Solution:
ok, so I added this function to js/mage/sales.js
selectStore: function() {
var data = this.serializeData(this.shippingAddressContainer);
data = data.toObject();
this.loadArea(['shipping_method', 'billing_method', 'shipping_address', 'totals', 'giftmessage'], true, data);
}
and to my jQuery where I am following change on dropdown I am calling:
order.storeSelect();
at the end, after I filled all the shipping address fields.
This is working, Form data is now set and shipping method is shown.
Is there any way to define this extra function out of the sales.js? Because this js is a part of the core js files?
I am not prototype.js expert
UPDATE Ok, I finally relised why Magento using Prototype, because the overwriting is the same as Zend framework. So to add method to a Mage js file you need to do this:
Create your js file in js/your_name_folder/your_file.js Because I need to add method to sales.js if you go there and check top of the page you will see this: var AdminOrder = new Class.create(); AdminOrder.prototype = {
so in your your_file.js you need to add your method to class (in this case) AdminOrder and you do it like this:
AdminOrder.addMethods({
selectStore: function() {
var data = this.serializeData(this.shippingAddressContainer);
data = data.toObject();
this.loadArea(['shipping_method', 'billing_method', 'shipping_address', 'totals', 'giftmessage'], true, data);
}
});
Then you go to design/adminhtml/default/your_theme/layout/local.xml and in my case I need to add my js file to adminhtml_sales_order_create_index That is it. Hope this helps someone.