With Ubercart, where is the $email_text variable set, the variable that determines whether the "do not reply to this email" should be displayed in the email received by a customer after they place an order.


It's set in template_preprocess_uc_order(&variables) in the order module ($variables['email_text']).

If you're looking to override this variable for your site it can be overridden by defining a function MYTHEME_preprocess_uc_order(&variables) in your theme's template.php

  • Thanks! I had to tweak it to: MYTHEME_preprocess_uc_order($variables) – tvsmvp Nov 3 '15 at 14:50
  • Thanks! I had to tweak it to: MYTHEME_preprocess_uc_order($variables) to get it to work (the amp sign swapped out for the dollar sign). What is the gain to putting the coding in the theme template vs right there above where the variable is used in the custom tpl? Is that simply a best practice thing or does it provide a benefit on a larger scale? – tvsmvp Nov 3 '15 at 14:56
  • Correction: It should be MYTHEME_preprocess_uc_order(&$variables) – tvsmvp Nov 3 '15 at 15:46
  • It prevents your modification from being overwritten if you need to update the Ubercart module. – Shawn Conn Nov 3 '15 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.