http://minhaloja.com.br/api/catalog_system/pub/products/search/http://minhaloja.vtexcommercestable.com.br/api/catalog_system/pub/products/search/?fq=productId:10440http://minhaloja.com.br/api/catalog_system/pub/products/search/perfumehttp://minhaloja.com.br/api/catalog_system/pub/category/tree/3http://minhaloja.vtexcommercestable.com.br/api/oms/pvt/orders/583003059415-01http://www.minhaloja.com.br/busca/?fq=0/api/catalog_system/pub/products/variations/66http:/minhaloja.vtexcommercestable.com.br/api/catalog_system/pub/products/search?fq=alternateIds_Ean:7898526205947vtexjs.checkout.getOrderForm().done(function(orderForm) {
var orderFormId = orderForm.orderFormId;
$.ajax({
url: '/api/checkout/pub/orderForm/'+orderFormId+'/items/0/price',
type: 'PUT',
headers: header,
data:'{"price":'+total+'}',
success: function(data) {
console.log('Ok!')
}
});
$.ajax({
url: '/api/checkout/pub/orderForm/'+orderFormId+'/attachments/clientProfileData',
type: 'POST',
headers: header,
data: '{"attachmentId": "clientProfileData","email": "'+$("#accountEmail").val()+'","firstName": "'+novo1+'","lastName": "'+novo2+'","document": "'+$('#accountCpfNumber').val()+'","documentType": "cpf","phone": "'+$('#accountCell').val()+'","corporateName": null,"tradeName": null,"corporateDocument": null,"stateInscription": null,"corporatePhone": null,"isCorporate": false}',
success: function() {
console.log('Ok!')
}
});
$.ajax({
url: '/api/checkout/pub/orderForm/'+orderFormId+'/attachments/shippingData',
type: 'POST',
headers: header,
data: '{"attachmentId": "shippingData","address": {"addressType": "residential","addressId": "-1368194386810","receiverName": "'+$.cookie('NOME')+'","postalCode": "'+$("#accountCep").val()+'","city": "'+$('#accountsity option:selected').val()+'","state": "'+$('#accountstate option:selected').val()+'","country": "BRA","street": "'+$('#accountaddress').val()+'","number": "'+$('#accountnumber').val()+'","neighborhood": "'+$('#accountdistrict').val()+'","complement": "'+$('#accountcomplement').val()+'","reference": null},}',
success: function() {
console.log('Ok!')
}
});/api/catalog_system/pub/products/search/?fq=B:<id_marca>/api/catalog_system/pub/products/search/?fq=H:<id_colecao>/busca/?fq=C:4&fq=H:100&fq=P:[20TO50]/135/147/148?map=productClusterSearchableIds,productClusterSearchableIds,productClusterSearchableIds// O `items` deve ser um array de objetos que contenham, no mínimo, as informações abaixo
var items = [{
id: 20, // sku do item
quantity: 1,
seller: '1'
}];
// O `postalCode` deve ser o CEP do cliente, no caso do Brasil
var postalCode = '06416070';
// O `country` deve ser a sigla de 3 letras do país
var country = 'BRA';
vtexjs.checkout.simulateShipping(items, postalCode, country)
.done(function(result) {
/* `result.logisticsInfo` é um array de objetos.
Cada objeto corresponde às informações de logística (frete) para cada item,
na ordem em que os items foram enviados.
Por exemplo, em `result.logisticsInfo[0].slas` estarão as diferentes opções
de transportadora (com prazo e preço) para o primeiro item.
Para maiores detalhes, consulte a documentação do orderForm.
*/
alert('Transportadoras e valores');
console.log(result.logisticsInfo[0].slas);
});// O `postalCode` deve ser o CEP do cliente, no caso do Brasil
var postalCode = '06416070';
// O `country` deve ser a sigla de 3 letras do país
var country = 'BRA';
var address = {
postalCode: postalCode,
country: country
};
vtexjs.checkout.getAddressInformation(address)
.done(function(result) {
console.log(result);
});http://minhaloja.vtexcommercestable.com.br/comprejuntosku/19$.when($.getJSON(graphUSER), $.getJSON(graphPOSTS)).done(function (user, posts) { });https://www.loja.com.br/api/checkout/pub/profiles/[email protected]&sc=1/api/checkout/pub/orders/v1104098smpr-01/no-cache/profileSystem/getProfilehttp://minhaloja.vtexcommercestable.com.br/api/checkout/pub/orderFormhttp://minhaloja.cl/buscapagina?sl=481c7748-cdc5-44f0-93c2-6ecf4cccc4ee&PS=7&cc=7&sm=0&PageNumber=3&fq=H:138https://documenter.getpostman.com/view/94611/oms/Hs41#e-c5c7-d934-c232-b37f7b774635https://documenter.getpostman.com/view/3848/logistics/Hs42https://documenter.getpostman.com/view/3442/pricing/Hs8Lhttps://documenter.getpostman.com/view/322855/pci/Hs3yvtexjs.checkout.getOrderForm().then(function(orderForm) {
var shippingData = orderForm.shippingData;
shippingData.availableAddresses.splice(1, 1);
return vtexjs.checkout.sendAttachment('shippingData', shippingData);
}).done(function(orderForm) {
console.log('orderForm alterado!', orderForm, orderForm.shippingData);
});https://minhaloja.com/api/catalog_system/pub/products/search/?fq=skuId:625&fq=skuId:28 https://documenter.getpostman.com/view/845/search-103/Hs43#e8e08b8f-4036-bfa0-8196-e8267683300ahttp://help.vtex.com/pt/tutorial/fazer-um-pedido-regular-usando-as-apis-da-vtex/api/oms/pub/user/[email protected]/orders/numeroDoPedido$(window).on('orderFormUpdated.vtex', function() {
console.log('OrderForm updated!')
});function getSla(id, zipCode) {
var DataToSend = {
'items': [{
'id': id,
'quantity': 1,
'seller': '1'
}],
'postalCode': zipCode,
'country': 'BRA',
};
$.ajax({
'type': 'POST',
'dataType': 'json',
'contentType': 'application/json',
'url': '/api/checkout/pub/orderForms/simulation/?sc=1',
'data': JSON.stringify(DataToSend),
'success': function(ResponseData) {
`//CUSTOM` function
createTable(ResponseData)
},
'error': function(AjaxError) {
console.log('Error')
}
});
}@felipe-ssilva |
|---|