1

I need to update custom product attribute values the same as custom price and qty update. When an order is created from the admin. If anyone has an idea, please help me.

please check the below image

enter image description here

I need the updated value of Opslag Marge when adding value on the Opslag edit box and click on the Update Items and Qty's button

I have checked sales.js productConfigureSubmit : function(listType, area, fieldsPrepare, itemsFilter) and also check Mage_Adminhtml_Sales_Order_CreateController but not understand how can update custom price on order create in admin.

2
  • I have the same question if anyone has an answer plz help?? Commented Oct 26, 2021 at 7:24
  • @BhavinGohil if you get any answers related to this post please post here. it's helpful to me Thanks! Commented Oct 27, 2021 at 4:42

1 Answer 1

0

I have to get a solution from sales.js which is located at js/mage/adminhtml/sales.js. in that file, I have to find productConfigureSubmit that is saved and put data when pressing the Update Items and Qty's button.

productConfigureSubmit : function(listType, area, fieldsPrepare, itemsFilter) {
    area = this.prepareArea(area);
    this.loadingAreas = area;
    var url = this.loadBaseUrl + 'block/' + area + '?isAjax=true';

    // prepare additional fields
    fieldsPrepare = this.prepareParams(fieldsPrepare);
    fieldsPrepare.reset_shipping = 1;
    fieldsPrepare.json = 1;

    // create fields
    var fields = [];
   for (var name in fieldsPrepare) {
       fields.push(new Element('input', {type: 'hidden', name: name, value: fieldsPrepare[name]}));
   }
   productConfigure.addFields(fields);

   // filter items
   if (itemsFilter) {
       productConfigure.addItemsFilter(listType, itemsFilter);
   }

   // prepare and do submit
   productConfigure.addListType(listType, {urlSubmit: url});
   productConfigure.setOnLoadIFrameCallback(listType, function(response){
       this.loadAreaResponseHandler(response);
   }.bind(this));
   productConfigure.submit(listType);
   // clean
   this.productConfigureAddFields = {};
   },

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.