Skip to content

Instantly share code, notes, and snippets.

private function getPastOrders()
{
$accepted_status = $this->getAccaptedStatuses();
$query = $this->db->query('SELECT `order_id`, `firstname`, `lastname`, `email`, `date_added`, `currency_code`, `total`
FROM `'. DB_PREFIX. 'order`
WHERE `order_status_id` IN ('.join(',', $accepted_status).') AND
`date_added` < NOW() AND
DATE_SUB(NOW(), INTERVAL '.self::PAST_ORDERS_DAYS_BACK.' day) < `date_added`
LIMIT 0,'.self::PAST_ORDERS_LIMIT.'');
$result = $query->rows;
$json = json_encode(array(
//'order_id' => $order->getId(),
'order_id' => 42,
'delivery_date' => $shipment_created,
//'delivery_date' => '2014-03-18 13:39',
'client' => $cliente,
'items' => $productArray
));
<script type="text/javascript">
$(document).ready(function() {
window._trustvox = [];
_trustvox.push(['_storeId', '75']);
_trustvox.push(['_productId', $(".product_code").find("span").text()]);
_trustvox.push(['_productName',$(".titulo_produto").find("h1").text()]);
_trustvox.push(['_productPhotos', [$(".product_main_img").find("img").attr("src")]]);
(function() {
@cleytonmessias
cleytonmessias / trustvox_jet.html
Created March 17, 2014 17:51
Trustvox - JetCommerce
<script type="text/javascript">
$(document).ready(function() {
window._trustvox = [];
_trustvox.push(['_storeId', '1']);
_trustvox.push(['_productId', $("#IdProduto").val()]);
_trustvox.push(['_productName',$("#zoomProduto").attr("title")]);
_trustvox.push(['_productPhotos', [$("#zoomProduto").attr("href")]);
(function() {
<script type="text/javascript">
var _trustvox = _trustvox || [];
_trustvox.push(['_storeId', '34']);
_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;
<div id="_trustvox_widget"></div>
@cleytonmessias
cleytonmessias / avant.html
Created April 23, 2014 17:26
Instalação Trustvox
<script type="text/javascript">
var _trustvox = _trustvox || [];
_trustvox.push(['_storeId', '121']);
_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;
@cleytonmessias
cleytonmessias / result.txt
Created April 25, 2014 00:26
resultado_openSSL
CONNECTED(00000003)
140735137555296:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 517 bytes
---
New, (NONE), Cipher is (NONE)
Faraday::SSLError (SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A):
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920:in `connect'
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920:in `block in connect'
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:920:in `connect'
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:852:in `start'
/Users/cleytonmessias/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/net/http.rb:1369:in `request'
faraday (0.9.0) lib/faraday/adapter/net_http.rb:80:in `perform_request'
faraday (0.9.0) lib/faraday/adapter/net_http.rb:39:in `call'
read from 0x7fd25b600060 [0x7fd25c006600] (7 bytes => 0 (0x0))
140735137555296:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 517 bytes
---
New, (NONE), Cipher is (NONE)