[ic] split ship data into database via log_transactions

New Media E.M.S. ic_users at newmediaems.com
Wed Jun 30 18:03:43 EDT 2004


At 02:08 PM 6/30/2004, you wrote:

>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} ) {




syntax error. Should be

if ($Values->{shipto_[item-increment]} ne 'primary') {
         ....
}

And the negation operator (!) you had applied to this comparison made no 
sense to me, I assume it was a misunderstanding on your part? Using with 
the above is just the same as:

         $Values->{shipto_[item-increment]} eq 'primary'

- Ed


>   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
>
>
>_______________________________________________
>interchange-users mailing list
>interchange-users at icdevgroup.org
>http://www.icdevgroup.org/mailman/listinfo/interchange-users

===============================================================
New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          edl at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax
=============================================================== 



More information about the interchange-users mailing list