MacBook Air (MBA) Mid 2012
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 | |
/** | |
* Returns a PDO parameter constant to bind a variable with | |
* | |
* @param string $type Which variable type to check | |
* | |
* @return int PDO parameter constant | |
*/ | |
public static function getBindConstant($type) |
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 | |
switch ($templateOption->getType()) { | |
case "select": | |
$block = "painModule/select"; | |
$template = "painModule/type/select.phtml"; | |
break; | |
case "radiobuttons": | |
$block = "painModule/radiobuttons"; | |
$template = "painModule/type/radiobuttons.phtml"; | |
break; |
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
-- idea: rebuild this via php and use mysql.information_schema to automatically figure out tables with column store_id resp. website_id | |
-- maybe include it into n98-magerun | |
# DEFINE | |
SET @to_store := 8; | |
SET @to_website := 4; | |
SET @from_store := 2; | |
SET @from_website := 3; |
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
SET foreign_key_checks = 0; | |
TRUNCATE `log_quote`; | |
TRUNCATE `sales_flat_quote`; | |
TRUNCATE `sales_flat_quote_address`; | |
TRUNCATE `sales_flat_quote_address_item`; | |
TRUNCATE `sales_flat_quote_item`; | |
TRUNCATE `sales_flat_quote_item_option`; | |
TRUNCATE `sales_flat_quote_payment`; | |
TRUNCATE `sales_flat_quote_shipping_rate`; |
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 | |
/** | |
* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup | |
*/ | |
$installer = $this; | |
$installer->startSetup(); | |
$tables = array( | |
$installer->getTable('catalog/category_anchor_products_indexer_idx'), | |
$installer->getTable('catalog/category_anchor_products_indexer_tmp') | |
); |
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 | |
class Namespace_Module_Model_Observer_FormatPrice | |
{ | |
public function formatPrice(Varien_Event_Observer $observer) | |
{ | |
$event = $observer->getEvent(); | |
$options = $event->getCurrencyOptions(); | |
/** |
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 | |
/** | |
* XML rewrite: | |
* | |
* <config><global><models> | |
<catalog_resource> | |
<rewrite> | |
<layer_filter_attribute>Namespace_Module_Model_Resource_Layer_Filter_Attribute</layer_filter_attribute> | |
</rewrite> | |
</catalog_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
<?php | |
/* Set up: */ | |
class Namespace_Module_Block_Adminhtml_News_Edit_Tab_Linking { | |
protected function _prepareForm(){ | |
... | |
$fieldSet->addField('product_categories', 'multiselect', |