Skip to content

Instantly share code, notes, and snippets.

@cleytonmessias
cleytonmessias / wind.html
Created January 15, 2015 11:07
WindSound
<script type="text/javascript">
$(document).ready(function() {
window._trustvox = [];
_trustvox.push(['_storeId', '450']);
_trustvox.push(['_productId', $('.produto .acoes-produto[data-produto-id]').last().data('produto-id')]);
_trustvox.push(['_productName',$('h1.nome-produto').text()]);
_trustvox.push(['_productPhotos', ['http:'+$('.elastislide').find('[href]').data('imagem-grande')] ]);
(function() {
<script type="text/javascript">
$(document).ready(function() {
window._trustvox = [];
_trustvox.push(['_storeId', '424']);
_trustvox.push(['_productId', $('#___rc-p-id').val()]);
_trustvox.push(['_productName',$('.productName').html()]);
_trustvox.push(['_productPhotos', [$('#image-main').attr('src')]]);
(function() {
Por favor,
Estamos fazendo chamada a API http://buscapecompany.vtexcommercestable.com.br/api/oms/pvt/orders/
com X-VTEX-API-AppToken e X-VTEX-API-AppKey com os valores disponibilizados pela seção de segurança da VTEX.
A mensagem retornada está sendo essa:
{"error":{"code":"1","message":"Acesso negado","exception":{"ClassName":"Vtex.Practices.ServiceModel.Client.Exceptions.ForbiddenException","Message":"Acesso negado","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at Vtex.Practices.ServiceModel.ServiceAuthorizationFilterAttribute.OnAuthorization(HttpActionContext actionContext)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.OnAuthorizationAsync(HttpActionContext actionContext, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(T
<div id="_trustvox_widget" style="display: none"></div>
@cleytonmessias
cleytonmessias / trustvox.html
Last active August 29, 2015 14:15
Trustvox ShoeStock
<div id="_trustvox_widget"></div>
@cleytonmessias
cleytonmessias / erro.cs
Created February 23, 2015 13:27
erro ao chamar
HTTP error (500): <!DOCTYPE html> <html> <head> <title>An item with the same key has already been added.</title> <meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } @media screen and (max-width: 639px) { pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; } } @media screen and (max-width: 479px)
@cleytonmessias
cleytonmessias / erro.html
Created February 23, 2015 13:27
erro ao chamar
HTTP error (500): <!DOCTYPE html> <html> <head> <title>An item with the same key has already been added.</title> <meta name="viewport" content="width=device-width" /> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px} H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } pre {font-family:"Consolas","Lucida Console",Monospace;font-size:11pt;margin:0;padding:0.5em;line-height:14pt} .marker {font-weight: bold; color: black;text-decoration: none;} .version {color: gray;} .error {margin-bottom: 10px;} .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; } @media screen and (max-width: 639px) { pre { width: 440px; overflow: auto; white-space: pre-wrap; word-wrap: break-word; } } @media screen and (max-width: 479px)
@cleytonmessias
cleytonmessias / Exemplo.html
Last active August 29, 2015 14:16
Trustvox loading stars
http://www.ibacana.com.br/skin/frontend/ibacana/default/js/product-page.js
@cleytonmessias
cleytonmessias / trustvox.html
Created March 2, 2015 11:57
Trustvox - Staples
<div id="_trustvox_widget"></div>
{
"order_id": 30585,
"delivery_date": "17/08/2014 06:20",
"client": {
"first_name": "FILIPPO",
"last_name": "LA",
"email": "[email protected]"
},
"items": [{
"name": "Coroa de Flores Rosas",