[ic] Order Routing

Kevin Walsh interchange-users@interchange.redhat.com
Thu Mar 28 17:14:01 2002


> 
> I follow what you are saying...except how do you modify the mail_receipt to
> not send an email?  I can't seem to find the code for where the email is
> sent in any of the files in /etc???
> 
I just looked at the default etc/mail_receipt file to make sure I
quoted the correct filename at you.  It seems that I did.  Did you
not notice the [email] tag in that file?  Its on the second line.

Upon looking at the file, it seems that the whole thing is surrounded
with an [if value email_copy] anyway, so you just need to undefine
the value and no email will be sent anyway.

If you can't place the code elsewhere then this code, at the top of
the etc/mail_receipt file, will do:

    [if value fax_order]
        [value name="email_copy" set=""]
    [/if]

or:

    [if value payment_type eq 'fax']
        [value name="email_copy" set=""]
    [/if]

or even:

    [if value payment_type =~ /^(fax|phone)$/]
        [value name="email_copy" set=""]
    [/if]

As I probably said before, you should consider sending the
email anyway, regardless of the payment type.  Just change
the text with a couple of [if] blocks, here and there.

>
> Also, just FYI, I commented out the FormIgnore line and it worked as far as
> emailing and not emailing depending on which button you pushed but it would
> not forward on to the receipt.html page OR my other receiptfax.html page.
> Just would refresh the order.html page.
> 
Then you will need to examine the actions taken by each of your
buttons on that form.  I suspect that you have either not set
mv_todo=submit on one of the button actions, or the form is
failing the profile checks and you are not displaying the failure
messages.

Why do you have multiple submit buttons anyway?  I would have
thought that some form of "payment type" <select> list would be
good enough.  If you had 10 payment methods, would you define
10 submit buttons to handle them all?

Keep it simple: Define a single route and just use a defined
"payment type" value to determine what gets shown on the reports
and emails.

(Previous article context lost due to lazy quoting.)

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/