Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

ItemList Update Fields

 
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 02-19-2018, 06:34 AM
 
Soptareanu Alex Soptareanu Alex is offline
 

Member
  
Join Date: Sep 2016
Posts: 24
 

Question ItemList Update Fields

I need some help in order to achive an update of ItemList Table. I have an field in table Order Details. This field has an drop-down with some different option, if I chose one of them and after make the recalculate, the value remains the same. I attached some picture in order to understand what i want to do.
Attached Thumbnails
Click image for larger version

Name:	Capture3.PNG
Views:	435
Size:	38.4 KB
ID:	5092  
__________________
alex
Reply With Quote
  #2  
Old 02-19-2018, 10:16 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: ItemList Update Fields

When you click the "Recalculate" button it submits the form to the \XLite\Controller\Admin\Order controller class and runs the doActionRecalculate() method there.

The controller recalculates the values and returns them back to JavaScript (see the displayRecalculateData() and displayRecalculateShippingData() methods).

JavaScript is configured to react on these events and update the page. See these files:
- skins/admin/order/page/info.js
- skins/admin/form_field/inline/select/shipping_method/controller.js

I never tried to add custom fields on that page, but I guess you should a) update the doActionRecalculate() method in the controller and make it return your custom data; b) add a custom JS file that will update the page in a way similar to how existing info.js and controller.js files react on events from the controller.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #3  
Old 02-22-2018, 03:42 AM
 
Soptareanu Alex Soptareanu Alex is offline
 

Member
  
Join Date: Sep 2016
Posts: 24
 

Default Re: ItemList Update Fields

Quote:
Originally Posted by qualiteam
When you click the "Recalculate" button it submits the form to the \XLite\Controller\Admin\Order controller class and runs the doActionRecalculate() method there.

The controller recalculates the values and returns them back to JavaScript (see the displayRecalculateData() and displayRecalculateShippingData() methods).

JavaScript is configured to react on these events and update the page. See these files:
- skins/admin/order/page/info.js
- skins/admin/form_field/inline/select/shipping_method/controller.js

I never tried to add custom fields on that page, but I guess you should a) update the doActionRecalculate() method in the controller and make it return your custom data; b) add a custom JS file that will update the page in a way similar to how existing info.js and controller.js files react on events from the controller.

I resolved the problem. I get the data from the form submit using \Xlite\Core\Reuquest::getInstance() and I override my old value of that field with data camed form the instance.
__________________
alex
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > General questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:12 PM.

   

 
X-Cart forums © 2001-2020