This file contains hidden or 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
| <script> | |
| my_variable = '<?php echo $this->getBigTemplate();?>'; | |
| </script> |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <layout version="0.1.0"> | |
| <default> | |
| <reference="head"> | |
| <action method="addCss"><stylesheet>css/YOURSTYLESHEET.css</stylesheet></action> | |
| </reference> | |
| </default> | |
| </layout> |
This file contains hidden or 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
| <?xml version="1.0"?> | |
| <config> | |
| <modules> | |
| <YOUR_MODULE> | |
| <version>0.1.0</version> | |
| </YOUR_MODULE> | |
| </modules> | |
| <frontend> | |
| <layout> | |
| <updates> |
This file contains hidden or 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 | |
| $i++; | |
| $_class = ''; | |
| if ($i % 4 == 0) $_class .= ' last-4-col'; | |
| if (($i - 1) % 4 == 0) $_class .= ' first-4-col'; | |
| if ($i % 3 == 0) $_class .= ' last-3-col'; | |
| if (($i - 1) % 3 == 0) $_class .= ' first-3-col'; | |
| $_class .= ($i % 2 == 0) ? ' even' : ' odd'; | |
| ?> |
This file contains hidden or 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 Ip_Category_Model_Image | |
| { | |
| public function getResizedImage($image, $width, $height = null, $quality = 100) | |
| { | |
| if(!$image){return false;} | |
| $imageUrl = Mage::getBaseDir('media').DS."catalog".DS."category".DS.$image; | |
| if(!is_file($imageUrl)){return false;} | |
| $imageResized = Mage::getBaseDir('media').DS."catalog".DS."category".DS."cache".DS."cat_resized".DS.$image; |
This file contains hidden or 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; | |
| $installer->startSetup(); | |
| $installer->getConnection() | |
| ->addColumn($installer->getTable('sales/quote'), 'surcharge', 'decimal(12,4)'); | |
| $installer->getConnection() | |
| ->addColumn($installer->getTable('sales/order'), 'surcharge', 'decimal(12,4)'); | |
| $installer->endSetup(); |
This file contains hidden or 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
| delimiter ;; | |
| drop procedure if exists sort_categories;; | |
| create procedure sort_categories() | |
| begin | |
| DECLARE cur_id BIGINT UNSIGNED; | |
| DECLARE cur_eof INT DEFAULT FALSE; | |
| DECLARE cur CURSOR FOR | |
| SELECT entity_id | |
| FROM catalog_category_entity_varchar | |
| WHERE attribute_id = ( |
This file contains hidden or 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 Your_Custom_Block_Rewrite extends Mage_Checkout_Block_Onepage_Payment_Methods | |
| { | |
| protected function _canUseMethod($method) | |
| { | |
| $total = $this->getQuote()->getShippingAddress()->getBaseGrandTotal(); | |
| if((float)$total > 0){return parent::_canUseMethod($method);} |
This file contains hidden or 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
| server { | |
| listen 80; | |
| #listen 443 ssl; | |
| #ssl_certificate tls/magento_local.pem; | |
| #ssl_certificate_key tls/magento_local.key; | |
| #ssl_session_timeout 7m; | |
| ## Specify your SSL options here | |
| #ssl_protocols SSLv2 SSLv3 TLSv1; | |
| #ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; |
This file contains hidden or 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
| $options = Mage::getModel('sales/quote_item_option') | |
| ->setItemId($item->getId()) | |
| ->getCollection() | |
| ->getOptionsByItem($item); | |
| foreach($options as $option){ | |
| if($option->getCode() == "info_buyRequest" && $buy_request = $option->getValue()){ | |
| $buy_request = unserialize($buy_request); | |
| if(isset($buy_request['custom_options']['cake'])){ | |
| //cake is found in the custom_options of a buyRequest |