Created
April 5, 2018 11:10
-
-
Save standa/eb11405dcaafced36348fe61fe1d83ff to your computer and use it in GitHub Desktop.
Apply a callback to orders you see in /admin/orders grid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var description = 'GoExpress delay of delivery for all the parcels from 3.04, because of Easter'; | |
$('.data-admin input[name="orderIds[]"]').each((k,v) => { | |
var orderId = v.value | |
var data = new FormData() | |
data.append('order-report-type', 7) // DELAY | |
data.append('order-report-description', description) | |
var request = new XMLHttpRequest(); | |
request.open("POST", "/admin/order-report/report/orderId/"+orderId); | |
request.send(data); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment