Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
| curl \ | |
| -H "Content-Type: application/json" \ | |
| -H "Authorization: <REPLACE_WITH_YOUR_API_KEY>" \ | |
| -X POST -d '{"options":{"open_tracking":true,"click_tracking":true},"return_path":"bounces@<REPLACE_WITH_YOUR_SENDING_DOMAIN_HERE>","metadata":{"some_useful_metadata":"testing_sparkpost"},"substitution_data":{"signature":"<REPLACE_WITH_YOUR_FIRST_AND_LAST_NAME>"},"recipients":[{"address":{"email":"<REPLACE_WITH_YOUR_EMAIL_ADDRESS>","tags":["learning"],"substitution_data":{"customer_type":"Platinum","first_name":"<REPLACE_WITH_YOUR_FIRST_NAME>"}}}],"content":{"from":{"name":"Awesome Company","email":"testing@<REPLACE_WITH_YOUR_SENDING_DOMAIN>"},"subject":"My first SparkPost Transmission","reply_to":"Awesome Company ","text":"Hi {{address.first_name}}\r\nYou have just sent your first email through SparkPost!\r\nCongratulations,\r\n{{signature}}","html":"<strong>Hi {{address.first_name}},</strong><p>You have just sent your first email through SparkPost!</p><p>Congratulations!</p>{{signature}}"}}' \ | |
| https://api.sparkpos |
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
| <?php | |
| // app/roues.php | |
| Route::group(array('before' => 'myfilter.filtername:value1,value2'), function() { | |
| // Routing logic | |
| }); | |
| // app/filters.php | |
| Route::filter('myfilter.filtername', 'MyCustomFilterClassNameFilter@filtermethodFilter'); |
| <?php print "<pre>" . print_r($var, true) . "</pre>"; ?> |
| find . -type f|while read f; do mv $f `echo $f |tr '[:upper:]' '[ :lower:]'`; done |
| <?php | |
| define('MAGENTO', realpath(dirname(__FILE__))); | |
| ini_set('memory_limit', '32M'); | |
| set_time_limit (0); | |
| require_once MAGENTO . '/app/Mage.php'; | |
| Mage::app(); | |
| Mage::getModel('core/url_rewrite')->setIsSystem(0)->setOptions('RP')->setIdPath('Imported-Old-Website-URL-test1')->setTargetPath('alicia-suspender-skirt-32360')->setRequestPath('SHOPONLINE.aspx?Product=Alicia Skirt&Brand=Lascivious Test&PID=1975')->save(); | |
| Mage::getModel('core/url_rewrite')->setIsSystem(0)->setOptions('RP')->setIdPath('Imported-Old-Website-URL-test2')->setTargetPath('alicia-suspender-skirt-32360')->setRequestPath('SHOPONLINE.aspx?Product=Alicia Skirt&Brand=Lascivious Test&PID=1975')->save(); |
| <?php | |
| /** | |
| * Determine the previous/next link and link to current category | |
| */ | |
| $_ccat = $this->helper('catalog/data')->getCategory(); | |
| $ppos = $_ccat->getProductsPosition(); | |
| $current_pid = $this->helper('catalog/data')->getProduct()->getId(); | |
| // build array from products positions | |
| $plist = array(); | |
| foreach ($ppos as $pid => $pos) { |
| <? | |
| if (isset($_REQUEST["id"]) && ($_REQUEST["id"]<>"")) { | |
| $data1=mysql_query("SELECT * FROM your_table WHERE id=".$_REQUEST["id"]); | |
| $data=mysql_fetch_array($data1); | |
| $from [email protected]; | |
| $to = $data["email_field"]; | |
| $user = $data["name_field"]; | |
| $subject = "Enter your subject line here"; /*or if it comes from the table*/ $subject = $data["subject_field"]; | |
| $header="From:" . $from . "\r\n " ."Reply-To:". $from ; | |
| $body="Hello ". $user .",\n\nFirst line\n\nYour message goes here, \nbest regards,\nyour_name and such\n"; |
| <?php | |
| // Configuration | |
| $myEmail = 'YOUR EMAIL HERE'; | |
| $error = ''; | |
| // To send HTML mail, the Content-type header must be set | |
| $headers = 'MIME-Version: 1.0' . "\r\n"; | |
| $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; | |
| // Additional headers |