Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add "you might be interested in" products to transactional emails in magento

Tags:

php

magento

For example if one user orders x product. it would be nice that he gets an email with the confirmation, and below the order details something like

You might be interested in: Then, show the related products/upsells/cross sells.

Is this even possible? I do know HTML, but I don't know PHP in detail.

I am interested in full code to write this transactional email, do not worry for design details, but for the functional details.

like image 510
Luis Valencia Avatar asked Aug 25 '11 11:08

Luis Valencia


2 Answers

Yes, it is possible. However, without PHP knowledge, you'll hardly be able to implement it. This thread shows the example code on how to implement related products information in the checkout page, which should be easily adaptable to be used in the mailer instead. Unfortunatly, I do not have Magento installed, so I cannot help you any further. Good Luck!

like image 150
Lars Avatar answered Oct 08 '22 11:10

Lars


You need to "tag" every products just like the questions which you post in stackoverflow. when you click a tag in a question you get to see related questions. so when a user selects PRODUCT A. compare the other products tags with PRODUCT A tags. Write a query in mysql like SELECT * FROM PRODUCTS WHERE tags LIKE $tags you can further reduce the related products by limiting to top five records and sort it by its popularity.!! And you need some knowledge in PHP and in MySQL to do it..!

like image 31
Jeyanth Kumar Avatar answered Oct 08 '22 11:10

Jeyanth Kumar