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
| ##### ec2-user ####### | |
| sudo yum update -y | |
| sudo yum install -y httpd24 | |
| sudo yum install -y httpd24 php56 mysql55-server php56-mysqlnd | |
| sudo service httpd start | |
| sudo service httpd restart | |
| sudo chkconfig httpd on | |
| chkconfig --list httpd | |
| sudo usermod -a -G apache ec2-user | |
| groups |
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 | |
| // For billing address | |
| $order->getBillingAddress()->getCountryModel()->getName() | |
| // For shipping address | |
| $order->getShippingAddress()->getCountryModel()->getName() | |
| ?> |
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 | |
| $customerGroupId = SOME_CUSTOMER_GROUP_ID; | |
| $table = Mage::getModel('customer/customer')->getResource() | |
| ->getWriteConnection() | |
| ->getTable('customer/entity'); | |
| $query = "UPDATE {$table} SET group_id = {$customerGroupId} WHERE group_id != {$customerGroupId}"; | |
| $conn->query($query); | |
| ?> |
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 | |
| //Initialize Mage Object | |
| require_once 'app/Mage.php'; | |
| Mage::app(); | |
| //Code to create coupon | |
| $couponCode='COUPONCODE'; //couponcode | |
| $rule = Mage::getModel('salesrule/rule'); //initialize salesrule | |
| $customer_groups = array(0,1); // Add customer group here |
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 | |
| $content = <<<EOD | |
| Block Content line 1 | |
| Block Content line 2 | |
| EOD; | |
| $cmsBlock = Mage::getModel('cms/block')->addData( | |
| array( | |
| 'title' => 'Block Title', | |
| 'identifier' => 'block_identifier', | |
| 'stores' => array(0), // Available in all stores |
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 | |
| URL='www.domain.nd' | |
| SITEMAP='sitemap.xml' | |
| wget --quiet http://$URL/$SITEMAP --no-cache --output-document - | egrep -o "http://$URL[^<]+" | while read line; do | |
| time curl -A 'Cache Warmer' -s -L $line > /dev/null 2>&1 | |
| echo $line | |
| done |
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 | |
| $fbconfig['appid' ] = "XXXXX"; //put your api key here | |
| $fbconfig['secret'] = "XXXXXXXXXXXXXXXXXX"; // put your api secret key here | |
| $fbconfig['baseurl'] = "http://myexample.com/index.php"; //put your host address here | |
| if (isset($_GET['request_ids'])) | |
| { | |
| } | |
| $user = null; | |
| try |
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
| $fbconfig['appid' ] = "XXXXXXXXX"; //put your app id here | |
| $fbconfig['secret'] = "XXXXXXXXXXXXXXXXXXXXXX"; // put your api secret key here |
NewerOlder