Skip to content

Instantly share code, notes, and snippets.

@rgoytacaz
Last active April 22, 2019 15:36
Show Gist options
  • Save rgoytacaz/0f86debdd25079876ec76c26018d4810 to your computer and use it in GitHub Desktop.
Save rgoytacaz/0f86debdd25079876ec76c26018d4810 to your computer and use it in GitHub Desktop.
CS list of product refId
function() {
var productIds;
function productsCSV(){
$.ajax({
method: 'GET',
url:'/api/checkout/pub/orders/order-group/'+{{ORDER ID}},
async: false
}).then(function(resp){
productIds = resp[0].items.map(function(product){ return product.refId }).join(',');
})
}
productsCSV();
return productIds;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment