Convert simpleCart email template placeholder "Agree" checkbox #order.agree# to the word YES

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 23, 2016   (RSS)

By gregThomas - February 23, 2016

Hey Zicky, 

You'll need to add a custom placeholder that adds Yes or No depending on if the user agreed. It would look something like this:

  if($order['agree']){
    $placeholders['order.agreed_text'] = 'Yes';
  }else{
    $placeholders['order.agreed_text'] = 'No';
  }

You'll need to add this code to the function _sc_getEmailPlaceholders. Then you can the placeholder to your email like this:

Agreed to Terms & Conditions: #order.agreed_text#

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com