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
Mage::getStoreConfig('carriers/' . $order->getShippingMethod(true)->getCarrierCode() . '/title') |
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
/** | |
* A simple ZIP code validator and sanitizer | |
* | |
* @author Hervé Guétin <@herveguetin> <herve.guetin@agence-soon.fr> | |
*/ | |
var zipSanitizer = { | |
// All sanitizers available | |
sanitizers: {}, |
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
document.cookie="varnish_bypass=1" |
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
find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \; && chmod 550 mage |
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 | |
/** | |
* Get category URL key for Enterprise | |
* | |
* @param Mage_Catalog_Model_Category $category | |
* @return string | |
*/ | |
public function getEnterpriseUrlKey(Mage_Catalog_Model_Category $category) | |
{ | |
$resource = Mage::getSingleton('core/resource'); |
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
# Make sure mod_headers is enabled in Apache | |
sudo a2enmod headers | |
# Place this in .htaccess | |
<IfModule mod_headers.c> | |
Header set X-Robots-Tag "noindex, nofollow" | |
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" | |
Header set Pragma "no-cache" | |
</IfModule> |
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 | |
$content = <<<EOD | |
Block Content line 1 | |
Block Content line 2 | |
EOD; | |
$cmsBlock = Mage::getModel('cms/block')->addData( | |
array( | |
'title' => 'Block Title', | |
'identifier' => 'block_identifier', |
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
#!/usr/bin/php -f | |
<?php | |
require_once 'abstract.php'; | |
class Herve_Run_Method extends Mage_Shell_Abstract | |
{ | |
protected function _parseArgs() | |
{ |
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 | |
// 1. Observe the following event: controller_action_predispatch_wishlist_index_add which calls, for example, the `forceReferer()` method | |
// 2. In your observer class, implement the `forceReferer()` method | |
/** | |
* When adding a product to wishlist, | |
* force redirection to wishlist page after customer login | |
* | |
*/ | |
public function forceReferer(Varien_Event_Observer $observer) |
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
lsof -i :8983 | |
# and kill returned pid |