2

I am looking for the code to include the product short description (short_description) to my customized Send Product to a Friend transnational email template.

Here is what I have so far:

<img src="{{var logo_url}}" width="320" /><br /><br />
Hi, {{htmlescape var=$name}}<br /><br />
{{var sender_name}}  sent you this via Nativitystonescollection: <br /><br/><a href="{{var product_url}}"><img src="{{var product_image}}"  width="125" height="125" border="1" /></a><br />{{var product_name}}<br /><br />
Here is {{var sender_name}}'s message:  {{var message}}<br /><br /> 

Thanks!

1
  • 1
    How to add sender's first name alone in subject line?
    – Swetha
    Oct 5 '15 at 13:22
2

hi you need send extra parameter to email template

so copy

app/code/core/Mage/Sendfriend/Model/Sendfriend.php

to

app/code/local/Mage/Sendfriend/Model/Sendfriend.php

goto function send() and

add an extra parameter to template

  'product_short_description'  => $this->getProduct()->getShortDescription()

after

  'product_url'   => $this->getProduct()->getUrlInStore(),

add new html variable {{var product_short_description}} to email template

18
  • Thank you for your info. I'm new to Magento so please pardon my ignorance. I followed your instructions but the short description isn't showing up. I'm using Magento 1.9. but noticed that and the sub-folders under app/local .../Mage/Sendfriend/Model/ did not exist so I created the addition folders and copied 'Sendfriend.php'. Any further ideas? Thanks again.
    – JaySch
    Sep 17 '14 at 16:18
  • are you use default magento?
    – Amit Bera
    Sep 17 '14 at 16:19
  • are you used html email template?
    – Amit Bera
    Sep 17 '14 at 16:20
  • 1
    Yes, I loaded the default transactional email template for send to a friend and modified it and selected the new template in System > Config > Catalog > EMail to a Friend.
    – JaySch
    Sep 17 '14 at 16:25
  • Magento temple is Modern.
    – JaySch
    Sep 17 '14 at 16:26

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.