[development] check_markup() question

Gordon Heydon gordon at heydon.com.au
Thu Apr 13 05:08:43 UTC 2006


Hi,

On Wed, 2006-04-12 at 22:26 -0500, Allie Micka wrote:
> On Apr 12, 2006, at 10:10 PM, Gordon Heydon wrote:
> 
> > What I want is to be able to in E-Commerce when E-Mails are sent to be
> > able to use php to develop more complex emails. Maybe even mime based
> > emails with the invoice attached.
> >
> > Also ATM the generation of these emails is quite bad and very  
> > inflexible
> > when it comes to customising these for sending invoice information to
> > customers and being able to brand your shop.
> 
> Have a look at the mime mail module - it accepts any HTML string and  
> sends a valid multi-part email.  You can simply send the html  
> generated by node_view() or use the existing HTML for your invoice.
> 
> As it is global to the site, it retains the site's global theme, and  
> respects the users' html/text preference globally.  By default, it  
> includes the site's theme's styles.  In most cases, this will  
> successfully retain the site's brand.  You can override this via a  
> theme function.

This sounds like an interesting idea, but the emails that are sent for a
transaction is not a node. But being able to just pass raw html may be
beneficial.

> > My first though was to use the filter system since it has the php  
> > filter
> > and just more, plus for users this is something that they are use to.
> > When I started implementing this I found that the filter system is too
> > general and really can only filter content based entirely on the  
> > content
> > that is past. So when you are looking at the body from a node you  
> > cannot
> > make decisions on what to do with the content based upon other  
> > fields in
> > the node, without having to reload the node (and make sure that you  
> > have
> > the right node).
> >
> > Also I though about creating an ecommerce filter which can be added to
> > "filtered html", but most of the time when sending the emails it will
> > not know which transaction it is working on, and if the content  
> > that is
> > being filtered is not a transaction then we don't need to run the
> > ecommerce filter.
> 
> I think I understand what you are trying to do here, but I don't  
> understand why.  What is the benefit of knowing which transaction the  
> filter is working on?

Because then you can display data that is within the current
transaction.

Gordon.



More information about the development mailing list