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
############################################ | |
## uncomment these lines for CGI mode | |
## make sure to specify the correct cgi php binary file name | |
## it might be /cgi-bin/php-cgi | |
# Action php5-cgi /cgi-bin/php5-cgi | |
# AddHandler php5-cgi .php | |
############################################ | |
## GoDaddy specific options |
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 | |
require_once('../app/Mage.php'); | |
Mage::app('default'); | |
function generateUniqueId($length = null) | |
{ | |
$rndId = crypt(uniqid(rand(),1)); | |
$rndId = strip_tags(stripslashes($rndId)); | |
$rndId = str_replace(array(".", "$"),"",$rndId); | |
$rndId = strrev(str_replace("/","",$rndId)); |
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 | |
$mail = new Zend_Mail(); | |
//$mail -> setBodyText( $MensagemEmHtml ); | |
$mail -> setBodyHtml( $MensagemEmHtml ); | |
$mail -> setFrom( "[email protected]", "Atendimento seusite" ); //Quem esta enviando | |
$mail -> addTo( "[email protected]", "Atendimento seusite" ); //Quem irá receber | |
$mail -> setSubject( "Obrigado por se cadastrar em nossa Newsletter" ); | |
$mail -> send(); |
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
<!-- Deivison --> | |
<?php | |
echo "<br />"; | |
// segunda via do boleto | |
if ((strpos($this->getPaymentHtml(), "Boleto") !== false) && ( $_order->getStatus() == $this->__(Mage::getStoreConfig('payment/boleto_bancario/order_status')) )) { | |
$orderid = $_order->getId(); | |
echo "<span style='float:right'><a style='color:#ffb81e' href='" . $this->getUrl("boleto/standard/adminView/order_id/" . $orderid) . "' class='link-cart' onclick=\"this.target='_blank'\">" . $this->__("Gerar 2a Via do Boleto") . "</a></span>"; |
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
{{block type='core/template' area='frontend' template='boletonoemail/boleto.phtml' order=$order}} |
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
<!-- Deivison --> | |
<!-- Impressão do usuário --> | |
<?php | |
// Tava assi: $this->getPaymentInfoHtml() alterado para assim: $this->getPaymentInfoHtml() | |
//if ((strpos($this->getPaymentInfoHtml(), "Boleto") !== false) && ( $_order->getStatus() == $this->__(Mage::getStoreConfig('payment/boleto_bancario/order_status')) )) { | |
//Deivison Arthur - deivison.com.br | |
//veja mais sobre strpos em http://br.answers.yahoo.com/question/index?qid=20100221162434AAdk34n |
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 | |
$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId(); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId); | |
if($order->getPayment()->getMethod() == "boleto_bancario"): /*caso tenha cido escolhido boleto como meio de pagamento exibe o botão abaixo*/ | |
?> | |
<center> | |
<button class="button" title="Clique aqui para imprimir o Boleto" onclick="window.open('<?=$this->getUrl('boleto/standard/view/order_id/'.$order->getId())?>','_blank')" type="button"><span><span>Clique aqui para imprimir o Boleto</span></span></button> | |
</center> |
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
<!-- Deivison --> | |
<?php | |
/* Original comentado | |
if ($e->source_model) { | |
// determine callback for the source model | |
$factoryName = (string)$e->source_model; | |
$method = false; | |
if (preg_match('/^([^:]+?)::([^:]+?)$/', $factoryName, $matches)) { | |
array_shift($matches); | |
list($factoryName, $method) = array_values($matches); |
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
dominio.com/ PAGINA / ACAO (funcao) / VAR. DIVERSAS (pode ser id, string, etc..) /VAR. DIVERSAS (pode ser id, string, etc..) /VAR. DIVERSAS (pode ser id, string, etc..) / e por ai vai | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{SCRIPT_FILENAME} !-f | |
RewriteCond %{SCRIPT_FILENAME} !-d |
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 | |
function proxy_detect ($null) { | |
$proxyports=array(80,8080,6588,8000,3128,3127,3124,1080,553,554); | |
for ($i = 0; $i <= count($proxyports); $i++) { | |
if(@fsockopen($_SERVER['REMOTE_ADDR'],$proxyports[$i],$errstr,$errno,0.5)){ | |
$sockport=true; | |
} | |
} | |
if( | |
$_SERVER['HTTP_FORWARDED'] |
OlderNewer