Skip to content

Instantly share code, notes, and snippets.

var valorDe = $("#header-v2 > .menu > div > ul.menuPrincipal > li.oferta > .subMenu .prateleira li a .preco .oferta-valor-de").text().split("R$ ");
var valorPor = $("#header-v2 > .menu > div > ul.menuPrincipal > li.oferta > .subMenu .prateleira li a .preco .oferta-valor-por span").text().split("R$ ");
<script type="text/javascript">
var _trustvox = _trustvox || [];
_trustvox.push(['_storeId', '306']);
_trustvox.push(['_productId', "XXXX"]);
_trustvox.push(['_productName',"XXXX"]);
_trustvox.push(['_productPhotos', ["XXXX", "XXXX"]]);
(function() {
var tv = document.createElement('script'); tv.type = 'text/javascript'; tv.async = true;
<script type="text/javascript">
$(document).ready(function() {
window._trustvox = [];
_trustvox.push(['_storeId', '309']);
_trustvox.push(['_productId', $('#___rc-p-id').val()]);
_trustvox.push(['_productName',$('.fn.productName').text()]);
_trustvox.push(['_productPhotos', [$('#image-main').attr('src')]]);
(function() {
SELECT
A.id,
A.name,
COUNT(B.id) as Total,
YEAR(delivery_date) AS ano,
MONTH(delivery_date) AS mes
FROM stores as A
INNER JOIN sales as B
ON A.id = B.store_id
@cleytonmessias
cleytonmessias / vinicius.html
Created October 7, 2014 17:29
Install script
<script type="text/javascript">
var _trustvox = _trustvox || [];
_trustvox.push(['_storeId', '68']);
_trustvox.push(['_productId', "@Model.Product.Id"]);
_trustvox.push(['_productName',"@Model.Product.Name"]);
_trustvox.push(['_productPhotos', ["@Model.Product.Image"]]);
(function() {
var tv = document.createElement('script'); tv.type = 'text/javascript'; tv.async = true;
@cleytonmessias
cleytonmessias / trustvox.html
Created October 8, 2014 13:11
JoiasGold - Homologação
<div id="_trustvox_widget"></div>
@cleytonmessias
cleytonmessias / snippet.js
Last active August 29, 2015 14:09
Exemplo código
<script type="text/javascript">
var _trustvox = _trustvox || [];
_trustvox.push(['_storeId', '1']);
_trustvox.push(['_productId', "@Model.Product.Id"]);
_trustvox.push(['_productName',"@Model.Product.Name"]);
_trustvox.push(['_productPhotos', ["@Model.Product.Image"]]);
(function() {
var tv = document.createElement('script'); tv.type = 'text/javascript'; tv.async = true;
@cleytonmessias
cleytonmessias / send_store_info.rb
Created December 5, 2014 14:53
SendInfoToIntercom
module Intercom
class SendStoreInfo
def initialize(store)
@store = store
end
def send
begin
company.custom_attributes['orders_last_month'] =
sales_count
@cleytonmessias
cleytonmessias / result.html
Created December 19, 2014 18:59
SearchREsult
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce">
<head>
<title>Loja Modelo</title>
<!--Exemplo de chamada direta a uma ViewPart -->
<vtex:metaTags/>
<link href="~/../Control/ArquivoTextoExibir.aspx?NomeArquivo=base.css " rel="stylesheet" type="text/css" />
</head>
<body>
@cleytonmessias
cleytonmessias / trustvox.js
Created January 7, 2015 18:12
Trustvox - Bololô - Producão
<script type="text/javascript">
$(document).ready(function() {
window._trustvox = [];
_trustvox.push(['_storeId', '438']);
_trustvox.push(['_productId', $('#___rc-p-id').val()]);
_trustvox.push(['_productName',$('.productName').html()]);
_trustvox.push(['_productPhotos', [$('#image-main').attr('src')]]);
(function() {