cancel
Showing results for 
Search instead for 
Did you mean: 

inserting Variables in Email Template for FTD WOI

inserting Variables in Email Template for FTD WOI

Greetings...

We are trying to add the following variables listed in the "Web Site Field" from this FTD requiirement page: http://floristwiki.ftdi.com/index.php/Web_Order_Interface_Web_Site_Requirements.  These variables need to be in place to pass through the client's POS system with FTD.  Can anyone shed some light on how this might be done?

 

Thanks in advance!

 

Ken

4 REPLIES 4

Re: inserting Variables in Email Template for FTD WOI

The url you sent doesn have anything.

 

Which of the emails are you trying to add it?

 

If it new order email you needto rewrite file:  app/code/core/Mage/Sales/Model/Order.php

 

And add there new variables you want to use:

public function sendNewOrderEmail()
{
 /*Existing Code*/
 if ($this->getCustomerIsGuest()) {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
        $customerId = Mage::getModel('customer/customer')->load($this->getCustomerId());
        $companyname = $customerId->getCompanyname();
        $customerName = $this->getBillingAddress()->getName();
    } else {
        $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
        $customerId = Mage::getModel('customer/customer')->load($this->getCustomerId());
        $companyname = $customerId->getCompanyname();
        $customerName = $this->getCustomerName();
    }
    /*Existing Code*/
    $mailer->setTemplateParams(array(
      'order'        =>  $this,
      'billing'      =>  $this->getBillingAddress(),
      'payment_html' => $paymentBlockHtml,
      'companyname'  => $companyname
   ));
   /*Rest of the code remains the same*/
 }

 Then you will need to edit your transactional email template in the admin System > Transactional Emails > New Order Email 

 

 {{ var companyname }}

 

Thanks

Re: inserting Variables in Email Template for FTD WOI

Sorry... the link took in consideration the period at the end... here's the working link:

 

http://floristwiki.ftdi.com/index.php/Web_Order_Interface_Web_Site_Requirements

Re: inserting Variables in Email Template for FTD WOI

Thank you sashas7777 for the reply last week...

What we're trying to do is pass certain fields through the FTD Mercury POS system and they require all different fields than what Magento has by default.  For instance, we need to pass through variables such as Bill Address1, Bill Address2, Bill City, Bill Phone Area Code, Bill Phone Extension and Bill Phone Number... instead of on field for the phone number it's broken down into 3 fields... kind of a pain I know, but that's how the FTD system needs to pull them.  There are a number of fields like that that we need to add but once I know how to do a few then the rest will follow pretty easily.  The full list is at http://floristwiki.ftdi.com/index.php/Web_Order_Interface_Web_Site_Requirements

 

I'm not 100% sure all variables need to be added to the checkout form or not nor do they need to all be listed in the Email Template as I first thought.  Any insight on this would be greatly appreciated.

 

Thanks in advance.

 

Ken

Re: inserting Variables in Email Template for FTD WOI

Ken,

 

Did you ever end up figuring this out?  If so, can you show me an example of the formatting of text your email is sending to pos?

 

Trying to set this up right now and it's a pain in the butt.  

 

Thanks.