[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Changing OrdersTo II
Quoting Kim Armann (kim@nichols.de):
> ****** message to minivend-users from Kim Armann <kim@nichols.de> ******
>
> Hi again,
> I have a a database with different branches.
> Each branch has a different email-adress. So if a customer wants to
> order something, he has the possibility to choose an office next to him.
> This database has to be dynamic, so I can not define them in
> catalog.cfg.
> How can I tell minivend to send the orders to different email-adresses.
>
> Order Routing is not the right way,
I would beg to differ.
If your "email" setting has only word characters, MiniVend looks
in the values for the mailing address:
Route someroute email address
Route someroute profile get_address
Somewhere in your order page, do:
[set get_address]
&set = address [calc]
my $addr = q{[item-list][item-field order_address] [/item-list]};
$addr =~ s/(\S)\s+.*/$1/;
return q{__ORDERS_TO__} unless $addr =~ /\S/;
return $addr;
[/calc]
[/set]
--
Mike Heins http://www.minivend.com/ ___
Internet Robotics |_ _|____
131 Willow Lane, Floor 2 | || _ \
It's a little-known fact Oxford, OH 45056 | || |_) |
that the Y1K problem caused <mikeh@minivend.com> |___| _ <
the Dark Ages. -- unknown 513.523.7621 FAX 7501 |_| \_\