This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('DS', DIRECTORY_SEPARATOR); | |
function _getExtractSchemaStatement($sqlFileName, $db) | |
{ | |
$dumpSchema = 'mysqldump' . ' '; | |
$dumpSchema .= '--no-data' . ' '; | |
$dumpSchema .= '-u ' . $db['user'] . ' '; | |
$dumpSchema .= '-p' . $db['pass'] . ' '; | |
$dumpSchema .= '-h ' . $db['host'] . ' '; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array | |
( | |
[client_id] => 277949545368493 | |
[client_secret] => tLT5X4mXvu3QjmAbPgymzFdeLha4WkyR | |
[amount] => 306.8 | |
[reason] => Pedido-15842 | |
[currency_id] => BRL | |
[payment_method_id] => visa | |
[payer_email] => [email protected] | |
[external_reference] => 15842 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#Código de seleção destes dados do cliente e inserção do pedido acima | |
$data['client_id']=Configuration::get('MERCADOC_CLIENT_ID'); | |
$data['client_secret']=Configuration::get('MERCADOC_CLIENT_SECRET'); | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'MercadoPago Prestashop Brasil v2'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo $this->getLayout()->createBlock('cms/block')->setBlockId('block_identifier')->toHtml(); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Gets the current store's details | |
$store = Mage::app()->getStore(); | |
// Gets the current store's id | |
$storeId = Mage::app()->getStore()->getStoreId(); | |
// Gets the current store's code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#Sempre adiciona o token no final da URL | |
$url .='token=' . $this->session->data['token']; | |
#gera url para determinada ação do controlador do módulo | |
$url = $this->url->link('catalog/product/edit', $url , 'SSL'); | |
#redireciona na resposta | |
$this->response->redirect($url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Executar comandos individualmente na shell | |
php shell/indexer.php -reindex catalog_product_attribute | |
php shell/indexer.php -reindex catalogsearch_fulltext | |
php shell/indexer.php -reindex catalog_category_flat | |
php shell/indexer.php -reindex cataloginventory_stock | |
php shell/indexer.php -reindex catalog_category_product | |
php shell/indexer.php -reindex catalog_product_price | |
php shell/indexer.php -reindex tag_summary | |
php shell/indexer.php -reindex catalog_url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function abrir_zopim(chave_zopim) | |
{ | |
var myWindow = window.open("https://v2.zopim.com/widget/popout.html?key="+chave_zopim,"","width=500,height=500"); | |
} |