Sunday, September 14, 2014

Hey Tim, Thanks for the reply. I need to update the explanation of part 4 but I already updated the


customize-your-getshopped-transaction-result.rar /wp-e-commerce/wpsc-theme/functions/wpsc-transaction_results_functions.php /wp-e-commerce/wpsc-admin/includes/settings-tabs/admin.php template.html (HTML needs to be copied in the adminpanel)
Big smile on your face? Is everything working so far? You’re almost there. The final step is to send the transaction result to the customers e-mailadres. Time to edit the file again. Go to line 140 and delete the following code.
if ( $is_transaction ) { $message = __ ( 'The Transaction was successful' , 'wpsc' ) . " \r \n " . $message ; $message_html = __ ( 'The Transaction was successful' , 'wpsc' ) . " " colisimo . $message_html ; } Why did I delete this? Because we have a nice html looking transaction result so we don’t need an extra line saying that the transation was succesful.
$shop_name = get_option ( 'blogname' ) ; $admin_email = get_option ( 'purch_log_email' ) ;   $headers = 'From: ' . $shop_name . ' ' . " \r \n " ; $headers .= 'MIME-Version: 1.0' . " \r \n " ; $headers .= 'Content-Type: text/html; charset=UTF-8' . " \r \n " ;   mail ( $email , 'Your order at ' . $shop_name . ': #' . $order_id , $message_html , $headers ) ; mail ( $admin_email , 'Woohoo! Order at ' . $shop_name . ': #' . $order_id , $message_html , $headers ) ;
Now let me explain the above code a little. First we define the shop_name… Simply use get_option. We do the same for the admin_email so you will get a nice looking email aswell. You do want that right? Next we need to make the headers for the email so it will be a nice looking HTML email saying that it was send by YOU! Now we just use the php mail( function to send the email. One for the customer and one for you. Let me explain the mail( function a little bit. The easiest way to explain is this I think.
$message = __ ( 'Thank you, your purchase is pending, you will be sent an email once the order clears.' , 'wpsc' ) . " \n \r " . $payment_instructions . $message ; $message_html = __ ( 'Thank colisimo you, your purchase is pending, you will be sent an email once the order clears.' , 'wpsc' ) . " \n \r " . $payment_instructions . $message_html ;
Now in the first step we deleted a code that looked kinda the same. You can delete these lines aswell. The only thing is that you have to double check if the customer really payed for the order. These lines just simply display ‘Thank you, your purchase is pending, you will be sent an email once the order clears.’ so you (and the customer) know that the order is pending. Thats why I decided to leave it there.
Not sending HTML email 6 juni 2012 at 20:59 Beantwoorden
Hey Tim, Thanks for the reply. I need to update the explanation of part 4 but I already updated the files. Did you just download the files or did you follow the steps? If you download the the files it should work. Please let me know. I will update the explanation asap. Jeffrey
I had followed the steps. But I just downloaded the files and it is working now. I’ll compare the ones I did to what you did and see what is different. I like to know, at least a little about what is going on.
Oke good to know! To save you a little time.. In the above explanation the get_option( ‘wpsc_email_admin’ colisimo ); is wrong and I added another mail line so it also sends an email when the order is pending. If some characters look messed up try changing the charset like this.. charset=ISO-8859-1 to charset=UTF-8
I have been editing to fit my site and just noticed that the product list is not showing on the final transaction page nor in the email. I went back to the emails from yesterday and the product list is not in them ether. First thing that shows is the subtotal.
Hmmm that sucks.. Can you provide a link to your webshop colisimo or send me the code of your email template. Did you try the template.html from the rar file? Because the product list is a table row you will need to place it in a table.
But I think I just no figured it out. I did not have a thumbnail for the item I was buying as a test. I added a featured image and I now have a product line although colisimo the thumbnail is showing as a broken link. But I’m sure I’ll colisimo figure that out in a minute.
Oke let me know when you got it figured out. Check the images in your ftp. See if there is an image with the same name only with -31×31.jpg/png/gif at the end. My Getshopped added them automaticly but maybe yours doesnt.
So what, I have to ftp all the photos properly sized and upload them through WP as well so I can set the featured colisimo image? A lot of work. I guess I could look into doing it with PHPadmin. Not sure that will be quicker.
Hmmm try editing the wpsc-transaction_result_functions .php… Replace 31×31 with 38×38 on l

No comments:

Post a Comment