[ic] split ship data into database via log_transactions

Jeannie Stevenson webteam at wes-state.com
Wed Jun 30 17:08:52 EDT 2004


Good day list.

I'm having trouble with getting my split ships into the orderline table

from my basket and checkout page I have

[if !value shipto_[item-increment]][value name=shipto_[item-increment]
set="primary" hide=1][/if]
  <SELECT onChange="this.form.submit()" NAME=shipto_[item-increment]>
   <OPTION VALUE="primary" [selected shipto_[item-increment]] primary]>
Primary
[query list=1
 table=ship_addresses
 sql="select * from ship_addresses where username = '[data session
username]'
"]
   <OPTION VALUE="[sql-param code]" [selected shipto_[item-increment]
[sql-param code]]> [sql-param addr_nick]
   [/query]
  </SELECT>
Which increments the value primary address and the ship_addresses data
i.e
shipto_1 = primary
shipto_2 = mack
shipto_3 = dave
         etc
In the log_transaction file I have

[calc]
 if (! $Values->{shipto_[item-increment] ne primary} ) {
  foreach (@$Items) {
   $_->{shipto} = '';
  }
 }
 return;
[/calc

In the orderline table there is a column separate_address

[item-list]...

[if value shipto_[item-increment] ne primary]
 [data
 base=orderline
 field=separate_address
 key="[value mv_order_number]-[item-increment]"
 value=|[data table=ship_addresses column=company key='[value
shipto_[item-increment]']
[data table=ship_addresses column=fname key='[value
ship_to_[item-increment]'] [data table=ship_addresses column=lname
key='[value shipto_[item-increment]']
[data table=ship_addresses column=address1 key='[value
shipto_[item-increment]'] [data table=ship_addresses column=address2
key='[value shipto_[item-increment]']
[data table=ship_addresses column=city key='[value
shipto_[item-increment]'], [data table=ship_addresses column=state
key='[value shipto_[item-increment]'] [data table=ship_addresses column=zip
key='[value shipto_[item-increment]'] [data table=ship_addresses
column=country key='[value shipto_[item-increment]']
[data table=ship_addresses column=phone key='[value
shipto_[item-increment]']
[data table=ship_addresses column=phone key='[value
shipto_[item-increment]']|]
[/if]
[/item-list]

which doesn't seem to work. yet in my report page I have

[if value shipto_[item-increment] ne primary]
[row 82]
[column width=12 gutter=1]
Ship To:
[/column]
[column width=32 align=left gutter=1 wrap=1]
[data table=ship_addresses column=company key='[value
shipto_[item-increment]]']
[/column]
[/row]
[row 82]
[column width=12 gutter=1]        [/column]
[column width=32 align=left gutter=1 wrap=1]
[data table=ship_addresses column=fname key='[value
shipto_[item-increment]]'] [data table=ship_addresses column=lname
key='[value shipto_[item-increment]]']
[/column]
[/row]
[row 82]
[column width=12 gutter=1]        [/column]
[column width=32 align=left gutter=1 wrap=1]
[data table=ship_addresses column=address1 key='[value
shipto_[item-increment]]'] [data table=ship_addresses column=address2
key='[value shipto_[item-increment]]']
[/column]
[/row]
[row 82]
[column width=12 gutter=1]        [/column]
[column width=32 align=left gutter=1 wrap=1]
[data table=ship_addresses column=city key='[value
shipto_[item-increment]]'], [data table=ship_addresses column=state
key='[value shipto_[item-increment]]'] [data table=ship_addresses column=zip
key='[value shipto_[item-increment]]']
[/column]
[/row]
[row 82]
[column width=12 gutter=1]        [/column]
[column width=32 align=left gutter=1 wrap=1]
[data table=ship_addresses column=country key='[value
shipto_[item-increment]]']
[/column]
[/row]
[/if]

which does work

In my error.log file I have

[snip]

syntax error at (eval 769) line 2, near "shipto_["

  if (! $Values->{shipto_[item-increment] ne primary} ) {
   foreach (@$Items) {
    $_->{shipto} = '';
   }
  }
  return;

[/snip]

Redhat 7.2
postgesql
ic 5.1

Any help would be appreciated

thanks Jeannie




More information about the interchange-users mailing list