[ic] mv_order_route

paul jordan interchange-users@icdevgroup.org
Wed Oct 23 13:21:02 2002


> > In any case, what you need to set is mv_order_route in the
> cart. This can
> > be done with AutoModifier if you make a field "mv_order_route" in
> > the products table:
> >
> > AutoModifier  mv_order_route
> >
> > If you don't want to name it mv_order_route in the database, and name it
> > "vendor" instead, then set it in a piece of code in the checkout profile
> > or top of the checkout page:
> >
> > [perl tables=products
> >     foreach my $item (@$Items) {
> > next if $item->{mv_order_route};
> > $item->{mv_order_route} = tag_data('products', 'vendor', $item->{code});
> >     }
> >     return;
> > [/perl]
> >
> > Set it to firm1, firm2, or whatever. Then have the routes defined
> > as above. A separate order report for each vendors items will be sent
> > to them.
> >
> > --
> > Mike Heins
>
> Hmm.. I'm beggining to undestand a little bit of this :) but just a little
> bit:)
>
> How exactly I set the mv_order_route in cart? and what is
> AutoModifier ? is
> this a command or I have to type this to catalog.cfg or somewhere else?
>
> When I browse the admin/tables/Products I can not find a command to add
> field. How is this done?
>
> If the name mv_order_route stays the same do I have to add a special code
> also ?
>
> Basically there will be a field in Products (Items) where I will put FIRM1
> or FIRM2 and those will be defined in catalog.cfg and that's it.. So I
> should make the field in Products and set the mv_route_order in
> cart... the
> problem now is just how:)
>
> Thanks again for help!
> Regards,
> Saso


Saso,

Mike is saying to....

1. Place in catalog.cfg:
   AutoModifier  mv_order_route

2. Make a column in products called 'mv_order_route'

3. Populate that column with the firm1, firm2 or whatever you choose

4. define order routes (in catalog.cfg) named firm1, firm2 ....
   to handle what you need to do i.e, send reports


Note: his perl block above is only if you want to use a name OTHER THAN
mv_order_route, which i don't believe you do.


To add/alter a column
If you are using the default db, then export prducts into the txt file so it
is up to date. The open up products.txt and after the last column name enter
a tab and then mv_order_route. Or recycle an unused column in products by
switching the unused column name with mv_order_route. The delete the
products/products.gdbm file

If you are using mysql, repeat the above, add the column definition to
dbconf/mysql/products.mysql, delete the products/products.sql file and
restart


Paul