Calculate Shipping Based on Subtotal Drupal 7

  • Posted on: 15 August 2017
  • By: jmu

Recently, I am struggling how to calculate a shipping fee based on the subtotal instead of the total (total might include tax, default shipping fee and so on). I found a sandbox module called Commerce Order Sub-total. The rule condition part works perfectly for me. However, this module only provides one rule action which returns "NUMBER" instead of "DECIMAL". In order to implement "calculate a shipping fee based on the subtotal", I need to use the result from "Commerce Order Sub-total" rule action in "Calculate a Value" action.

A fast way to send SMTP HTML email by using php (PHPMailer)

  • Posted on: 30 November 2016
  • By: jmu

Yesterday, I worked on an email function in php. Since I would like to avoid spam filter, PHPMailer is the greatest choice for me to use. I also tried some other ways and will share in other articles if I have time. Although it is easy to set up and use, I still spent a lot of time on sending different emails to multiple receivers because I don't even know it can only send a same email to one same receiver by default.