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 | |
// For billing address | |
$order->getBillingAddress()->getCountryModel()->getName() | |
// For shipping address | |
$order->getShippingAddress()->getCountryModel()->getName() | |
?> |
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 | |
// Create new order status | |
$data = array( | |
'status' => 'status_code', | |
'label' => 'Default Label' | |
); | |
$status = Mage::getModel('sales/order_status'); | |
$status->setData($data)->save(); | |
// Assign to some order state |
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
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
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
/** | |
* 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
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
mysqldump … | sed -e 's/DEFINER=[^*]*\*/\*/' > dump.sql |
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 | |
$installer = $this->startSetup(); | |
$installer->getConnection() | |
->addColumn( | |
$installer->getTable('module/table_alias'), | |
'sql_column_name', | |
array( | |
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER, // Or any other type from Varien_Db_Ddl_Table | |
'nullable' => true, // Or false... |