./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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
| (function () { | |
| if (!Worker) //Detect IE | |
| document.location = "http://www.whatbrowser.org/ru/browser/"; | |
| })(); |
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 | |
| // requires Facebook PHP SDK 4.0.x or later | |
| // user must be logged-in prior to API call | |
| // publish story, requires 'places' attribute | |
| // use a page_id with no address to tag hidden location | |
| // $tags is a comma-separated string of IDs | |
| $story = (new FacebookRequest( $session, 'POST', '/me/feed', array( |
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 | |
| try { | |
| // Be sure to ask for the publish_actions permission first | |
| // If you provided a 'default_access_token', third parameter '{access-token}' is optional. | |
| $response = $fb->post( '/me/feed', [ | |
| 'name' => 'Facebook API: Using the Facebook PHP SDK v4.1.x', | |
| 'link' => 'https://www.webniraj.com/2015/02/19/facebook-api-using-the-facebook-php-sdk-v4-1-x/', | |
| 'caption' => 'As version v4.1 of the Facebook PHP SDK nears release (at time of writing), I though this would be a good time to explain how the new version works. Migrating your application from v4.0.x to v4.1.x will break your application.', | |
| 'message' => 'Check out my new blog post!', |
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 | |
| // Set the location of the Facebook PHP SDK - this should point to directory containing autoload.php | |
| define( 'FACEBOOK_SDK_V4_SRC_DIR', './Facebook/' ); | |
| // include required files from Facebook SDK | |
| require_once( 'Facebook/autoload.php' ); | |
| // start the session | |
| session_start(); |
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 | |
| // Set the location of the Facebook PHP SDK - this should point to directory containing autoload.php | |
| define( 'FACEBOOK_SDK_V4_SRC_DIR', './Facebook/' ); | |
| // include required files from Facebook SDK | |
| require_once( 'Facebook/autoload.php' ); | |
| // start the session | |
| session_start(); |
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
| $image = file_get_contents('http://www.url.com/image.jpg'); | |
| file_put_contents('/images/image.jpg', $image); //save the image on your server |
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> | |
| <default> | |
| <!--Root/Default Layouts--> | |
| <reference name="root"> | |
| <!--Appending Block--> | |
| <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/> | |
| </reference> | |
| <!--CSS and JS Files--> |
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
| class Getready_Rewrite_Model_Core_Url extends Mage_Core_Model_Url { | |
| /** | |
| * Build url by requested path and parameters | |
| * | |
| * @param string|null $routePath | |
| * @param array|null $routeParams | |
| * @return string | |
| */ | |
| public function getUrl($routePath = null, $routeParams = null) { |
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
| public function indexAction() { | |
| $coupon_code = $this->getRequest()->getParam('coupon_code'); | |
| if ($coupon_code != '') { | |
| Mage::getSingleton("checkout/session")->setData("coupon_code",$coupon_code); | |
| Mage::getSingleton('checkout/cart')->getQuote()->setCouponCode($coupon_code)->save(); | |
| Mage::getSingleton('core/session')->addSuccess($this->__('Coupon was automatically applied')); | |
| } | |
| else { | |
| Mage::getSingleton("checkout/session")->setData("coupon_code",""); |
OlderNewer