Changeset 630043
- Timestamp:
- 11/26/2012 10:25:01 AM (13 years ago)
- Location:
- wp-e-commerce-style-email/trunk
- Files:
-
- 3 edited
-
mail.class.php (modified) (3 diffs)
-
readme.txt (modified) (5 diffs)
-
wp-e-commerce-style-email.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-e-commerce-style-email/trunk/mail.class.php
r619324 r630043 450 450 if(!empty($message_formatted)) { 451 451 $message=$message_formatted; 452 //TODO: make sure content-type isn't already specified in the header. Right now, I don't think e-commerce sets a content-type header. 453 $ecse_charset = get_option('ecse_charset'); //not sure if anyone still uses this. Legacy since fixed charset mangling. 454 if(empty($ecse_charset)) $ecse_charset = get_bloginfo( 'charset' ); //by default, WP assigns the charset of the blog to the emails. Not sure we need to do this. Not even sure anyone would want to override it. 455 if(empty($ecse_charset)) $ecse_charset = 'UTF-8'; 456 $headers .= "Content-Type: text/html; charset=".$ecse_charset.";\r\n"; 452 //make sure content-type isn't already specified in the header. 453 if(stripos('x'.$headers, 'Content-Type: text/html;')==false) { 454 $ecse_charset = get_option('ecse_charset'); //not sure if anyone still uses this. Legacy since fixed charset mangling. 455 if(empty($ecse_charset)) $ecse_charset = get_bloginfo( 'charset' ); //by default, WP assigns the charset of the blog to the emails. Not sure we need to do this. Not even sure anyone would want to override it. 456 if(empty($ecse_charset)) $ecse_charset = 'UTF-8'; 457 $headers .= "\r\nContent-Type: text/html; charset=".$ecse_charset.";\r\n"; 458 } 457 459 if(ecse_is_test_email() || ecse_is_other_email()) { //set the 'from' to be same as WPEC emails. Note that this can still be overridden by plugins and WP itself, like in user registrations. 458 460 $reply_address = get_option( 'return_email' ); … … 480 482 $purch_id = intval(preg_replace("/[^0-9]/", '', $report_id)); 481 483 482 $message = '<!-- !ecse! '.$purch_id.' !ecse! --> '.$message;484 $message = '<!-- !ecse! '.$purch_id.' !ecse! --> '.$message; 483 485 484 486 return $message; … … 504 506 static function strip_pid_tag($message) { 505 507 $pid_start = stripos($message, '<!-- !ecse!'); 506 $pid_end = stripos($message, '!ecse! -->', $pid_start+1) + 9;508 $pid_end = stripos($message, '!ecse! -->', $pid_start+1) + 10; 507 509 if(stripos($message, '!ecse! -->')>0) $message = substr_replace($message, '', $pid_start, $pid_end-$pid_start); 508 510 return $message; -
wp-e-commerce-style-email/trunk/readme.txt
r619324 r630043 4 4 Requires at least: 3.2 5 5 Tested up to: 3.4.2 6 Stable tag: 0.6 6 Stable tag: 0.6.1 7 7 8 8 Style the emails that WP e-Commerce sends to your customers. … … 79 79 80 80 I think these are helpful references: 81 81 82 http://www.campaignmonitor.com/css/ 83 82 84 http://www.htmlgoodies.com/beyond/css/article.php/3679231/How-to-Create-Great-HTML-Emails-with-CSS.htm 85 83 86 http://kb.mailchimp.com/article/how-to-code-html-emails 84 87 … … 93 96 * Go to the 'Store Email Style' options page and click to see a browser preview, or have a test styled email sent to you; 94 97 * While you're in testing phase, store emails (including customer receipts) that are sent to an admin email address will automatically be styled, so you can see what actual customers will see before they do. 98 99 = Why are linebreaks being removed from my product list? = 100 101 This issue only seems to crop up when you're not templating the receipt content, you're on WPEC pre-3.8.9, and you've got some HTML in the WPEC layout option for that content. 102 103 Why might it happen? When you turn on this plugin and apply style, the plugin will do its best job to make the plain text content look good in HTML. 104 It does so by converting plain text linebreaks to HTML tags. 105 But the plugin will only do that if it doesn't detect HTML in the content already. 106 107 So let's say you've put some HTML tags before or after your product list in the WPEC admin settings tab, where you layout the purchase receipt content. 108 My plugin will detect some HTML, and then it won't add any HTML of its own to the content. As a result the plain text linebreaks remain, and they don't mean much in an HTML email. 109 110 How might you overcome this issue? Try removing the HTML from the WPEC content. Or even better, use the content templating that this plugin enables. 111 It's easy (you can copy sample templates from this plugin's folder) and your receipts will look better anyway. 112 113 This is only an issue before WPEC 3.8.9 though, because WPEC has started generating HTML product lists of its own, using tables. 114 And obviously if you're templating the content, you can put your own HTML layout on the product list. 95 115 96 116 = What's this about a fancy template hierarchy? = … … 147 167 148 168 == Changelog == 169 170 = 0.6.1 = 171 * Fix bug that caused a rogue less-than sign to appear on purchase receipts. 172 * Fix content-type incompatibility with WPEC 3.8.9's new HTML email generation system 149 173 150 174 = 0.6 = … … 185 209 == Upgrade Notice == 186 210 187 = 0.6 = 188 A giant new release. Adds a raft of new features, including a template hierarchy and content templating. 189 See <a href="http://schwambell.com/wp-e-commerce-style-email-plugin/">http://schwambell.com/wp-e-commerce-style-email-plugin/</a> for more details. Ths update is not required for maintenance purposes. 190 211 = 0.6.1 = 212 A small update to 0.6. If you're on that version, this version doesn't introduce any changes - it just fixes a couple small bugs that impact purchase receipt emails. 213 -
wp-e-commerce-style-email/trunk/wp-e-commerce-style-email.php
r619324 r630043 2 2 /** 3 3 * @package wp_e_commerce_style_email 4 * @version 0.6 4 * @version 0.6.1 5 5 */ 6 6 /* … … 9 9 Description: Style the emails that WP E-Commerce sends to your customers. Create a template file in your theme named wpsc-email_style.php that generates the email output, and use the template tag ecse_get_email_content() to dump WP E-Commerce's purchase report into it. 10 10 Author: Jacob Schwartz 11 Version: 0.6 11 Version: 0.6.1 12 12 Author URI: http://schwambell.com 13 13 */
Note: See TracChangeset
for help on using the changeset viewer.