[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] Add record to table when order is placed


> DB wrote:
>> I've created a table named order_info to store information about orders
>> beyond what's given in the transactions table. This is information that
>> customers won't see such as which employee processed the order and so forth.
>> 
>> When an order is placed, I'd like IC to automatically add a record to
>> this order_info table with the same order_number as the corresponding
>> entry of the transactions table. Is there an easy way to do this such as
>> editing a route or maybe running an IC job every few minutes?
>> 
>> I guess I could just add these fields to the transactions table instead
>> of using a separate table - maybe that's a better way to go. Does anyone
>> have thoughts or advice? The catalog uses IC 5.2 and mysql.
> 
> You can edit etc/log_transaction either with additional fields for
> transactions or an extraneous [import] for order_info.
> 
> Bye
> 	Racke



Here is more detail about my failed attempts to have IC insert a record
in the table order_info when an order is placed. In my
...etc/log_transaction file I changed the line

[loop list="transactions orderline inventory userdb"]
to
[loop list="transactions orderline inventory userdb order_info"]

I then added

[import table=order_info]
code: [value mv_order_number]
[/import]

just before the closing [/try] tag. But in my .../interchange/error.log
I see entries like this when an order is placed, and no record is
inserted into the order_info table.

...Error creating dummy database for icmenu: Can't call method "new" on
an undefined value at /home/store/interchange/lib/Vend/Data.pm line 752.

The key column for the order_info table is named order_number I'm hoping
someone can provide a clue or a link to appropriate docs?

DB
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.