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 | |
| if ($collection->isLoaded()) { | |
| $collection->getSelect()->reset(); | |
| } |
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 My_Foo_Block_Thing extends Mage_Core_Block_Template | |
| { | |
| protected $_cacheKey = "your-cache-key"; | |
| protected function _construct() | |
| { | |
| $this->addData([ | |
| 'cache_lifetime'=> false, |
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
| -- MySQL dump 10.13 Distrib 5.6.24, for osx10.8 (x86_64) | |
| -- | |
| -- Host: localhost Database: phpci | |
| -- ------------------------------------------------------ | |
| -- Server version 5.6.24 | |
| /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
| /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
| /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
| /*!40101 SET NAMES utf8 */; |
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 | |
| $hostname = '127.0.0.1'; | |
| $username = 'username'; | |
| $password = 'password'; | |
| $connection = ftp_connect($hostname); | |
| $login = ftp_login($connection, $username, $password); |
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
| #!/bin/bash | |
| ################################################################################ | |
| # FUNCTIONS | |
| ################################################################################ | |
| # 1. Check required system tools | |
| _check_installed_tools() { | |
| local missed="" |
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 Observer | |
| { | |
| public function handleControllerActionPredispatch(Varien_Event_Observer $observer) | |
| { | |
| $controllerAction = $observer->getEvent()->getControllerAction(); | |
| if ($controllerAction instanceOf Mage_Checkout_OnepageController) { | |
| // currently handling a onepage checkout route |
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 | |
| /** | |
| * @param string | |
| * @param string | |
| * @param Mage_Core_Model_Store | |
| * @throws Exception | |
| */ | |
| function createRedirect($fromUrl, $toUrl, Mage_Core_Model_Store $store) | |
| { |
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
| #!/bin/bash | |
| if [ -z $1 ] | |
| then | |
| echo 'Sitemap must be provided as first argument.';exit 2 | |
| fi | |
| # Helper function to read xml | |
| read_dom () { | |
| local IFS=\> |
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
| $ cat login.xml | |
| <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> | |
| <SOAP-ENV:Body> | |
| <MAGE:login xmlns:MAGE="http://xxxxxx/api/v2_soap/?wsdl=1"> | |
| <MAGE:username>xxxxxx</MAGE:username> | |
| <MAGE:apiKey>xxxxxx</MAGE:apiKey> | |
| </MAGE:login> | |
| </SOAP-ENV:Body> | |
| </SOAP-ENV:Envelope> | |
| $ curl --data @login.xml http://xxxxxx/api/v2_soap |
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> | |
| <placeholders> | |
| <your_modules_holepunch_node> | |
| <block>your_module/your_block</block> | |
| <name>layout.name.for.your.block</name> | |
| <container>Your_Module_Model_Container</container> | |
| <placeholder>PLACEHOLDER_NAME_FOR_YOUR_CONTAINER</placeholder> | |
| </your_modules_holepunch_node> | |
| </placeholders> |