[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Re: Using Perl to Access IC's Data
Brian said (in part)
> From: Brian Smedley <brian@street-light.com>
> Subject: [ic] Using Perl to Access IC's Data
> Reply-To: interchange-users@lists.akopia.com
>
> I am looking for some documentation on how to use Perl to directly access IC's
> data. In the perl portion of the documentation it has
>
> [perl]
> $name = $Values->{name};
> $browser = $Session->{browser};
> [/perl]
>
> Which tells me how to assign some perl variables information from the $Values
> and $Session. Great, exactly what I needed to know. Now what other keys are
> available to me in these two references? I would love to find a HTTP_REFERER.
> I have found the list of objects and it tells me to refer to Interchange
> Programming for more details. In the Interchange Templates documentation
> there is a chapter on Programming, yet this portion of the documentation sheds
> no light. The only
I'd agree that this is a hole in the documentation. I couldn't find it, so
I put a bit of Perl in the report template to spit them out. "report" is
the template for the email that is sent to the vendor, which is in
catalogs/vendor/etc/report for the construct demo. That was the item I
wanted to modify, so the result was that I emailed the variable names to
myself!
I also spit out the values of the variables in that context where I could,
since that can be helpful. (Some of the values in the following list have
been altered.) Of course, a lot of things are array refs or hash refs, but
that's useful too. The list is broken up by hash name, beginning with
"Session". Thus $Session->{accesses} = 5 and so on.
Hope this helps. (I'm sure someone will correct this if I've got it wrong.)
Martin.
===============================================
Session variables (key = value)
accesses = 5
admin =
arg =
browser = Mozilla/4.73 (Macintosh; U; PPC)
discount = HASH(0x8e2ceb4)
errors = HASH(0x8e2f798)
extension = .html
host = 216.196.132.16
id = Sj5wWxTx
last_error = Safe: There is no row with index '' at
//usr/lib/interchange/lib/Vend/Table/Common.pm line 255.
last_search =
scan/sf=sel/tf=sort/tf=name/fi=area/st=db/se=top/lb=loop1multi::final
last_url = /process.html
latest_subtotal = 24.95
latest_total = 30.97
logged_in = 1
ohost = 216.196.132.16
one_time_path_alias = HASH(0x8ea1e10)
pageCount = 1330
path_alias = HASH(0x8e2b520)
ship_message =
time = 994204926
try = HASH(0x8e2ce9c)
ui_pg_exp = HASH(0x8e2f774)
username = owner
values = HASH(0x8e2cef0)
Values variables (key = value)
1 =
account_id =
accounts =
address1 = 724 Any Street
address2 =
address3 =
address_book =
b_address1 =
b_address2 =
b_address3 =
b_city =
b_country =
b_fname =
b_lname =
b_nickname = ui_data_key_name = code
b_phone =
b_state =
b_zip =
carts =
city = Cincinnati
company =
config =
country = US
customer = U00001deleteorder = 1
deletecustomer = 1
edit =
email = abellmt@spsp.net
email_copy = 1
export =
fax =
fax_order = 0
files =
gift_note =
groups =
help_name = knar.main
inactive =
lname = Abell
mail_list = 0
meta =
mv_action = return
mv_arg = okl
mv_checkout = multi/checkout
mv_cookie_password = 0
mv_credit_card_error =
mv_credit_card_exp_all = 4/03
mv_credit_card_exp_month = 4
mv_credit_card_exp_year = 03
mv_credit_card_info = visa 4111111111111111 4/03
mv_credit_card_reference = 41**1111
mv_credit_card_type = visa
mv_credit_card_valid = 1
mv_data_table = userdb
mv_dict_look =
mv_email = abellmt@spsp.net
mv_failpage = multi/final
mv_first_match = 50
mv_matchlimit = 50
mv_order_item = okl
mv_order_profile = checkout_profile
mv_order_route = log main copy_user
mv_orderpage = multi/basket
mv_password = varmit
mv_payment = Credit Card (visa)
mv_pc = 773
mv_raw_dict_look =
mv_raw_searchspec =
mv_search_match_count = 5
mv_searchspec = ARRAY(0x8e29ee0)
mv_session_id = Sj5wWxTx
mv_shipmode = upsg
mv_status_mv_email = mv_email set failed.
mv_username = mta
name = Super User
no_functions =
no_tables =
order = 000047super = 1
order_dest =
order_numbers = 000002 000003 000005 000007 000008 000009 000010 000013
000014 000015 000016 000017 000018 000027 000046 000062 000070 000079
owner =
p_nickname =
page_banner =
page_title = Knar editor
pages =
phone_day = 513-555-1212
phone_night =
preferences =
project_id =
quantity0 = 1
reconfig =
s_nickname = fname = Martin
save_country = US
show_basket = 1
showactive = 1
showpending = 1
state = OH
table_control =
ui_begin_date = 07
ui_break_before =
ui_data_fields = code Variable pref_group
ui_description_fields = code
ui_end_date = 07icon_name =
ui_flex_description =
ui_flex_key =
ui_meta_specific = 1
ui_return_to = admin/preferences Variable
ui_show_fields =
ui_sort_field =
ui_sort_option =
upload =
yes_functions =
yes_tables =
zip = 45226
CGI variables (key = value)
email_copy = 1
fax_order = 0
gift_note =
mail_list = 0
mv_failpage = multi/final
mv_nextpage = multi/final
mv_order_profile = checkout_profile
mv_order_route = log main copy_user
mv_session_id = Sj5wWxTx
mv_todo = submit
CGI_array variables (keys, values all array refs)
email_copy
fax_order
gift_note
mail_list
mv_credit_card_exp_month
mv_credit_card_exp_year
mv_credit_card_number
mv_failpage
mv_nextpage
mv_order_profile
mv_order_route
mv_session_id
mv_todo
quantity0
Scratch variables (keys)
Check out
Continue shopping
Go to address book
Log out
Place Order!
Save_database
Stop shopping
bill_address
credit_limit
done_begin
found_cat
leftonly
members_only
mv_add_dot_html
mv_item_object
mv_no_count
mv_no_session_id
only_downloadable
order_style
order_text
page_title
scrub_bill
ship_address
some_downloadable
timed_build
transaction_record
xfer_bill
Items variables (keys)
mv_ip
price_group
mv_ib
code
size
quantity
color
Config variables (key = value)
ActionMap = HASH(0x8dbffdc)
AdminSub = HASH(0x8974ed8)
AdminUserDB = HASH(0x8e5eb04)
AlwaysSecure = HASH(0x8ddb848)
AsciiTrack = logs/tracking.asc
AutoEnd =
AutoModifier = ARRAY(0x8df9e38)
Autoload =
CatalogName = rob
ClearCache = 0
CommonAdjust = pricing:q2,q5,q10,q25,q100, ;:price, ;$ ==color:pricing,
==size:pricing
ConfDir = /var/www/catalogs/jimbos/etc
ConfigDatabase = HASH(0x8dd48fc)
ConfigDir = /var/www/catalogs/jimbos/config
ConfigFile = catalog.cfg
CookieDomain =
CookieLogin = 1
Cookies = 1
CreditCardAuto = 0
CustomShipping =
CyberCash = 0
Database = HASH(0x8e4d49c)
DbDatabase =
DefaultShipping = default
DescriptionField = description
DifferentSecure = HASH(0x8e4ecb4)
DirectiveDatabase =
DisplayErrors = 0
DynamicData = HASH(0x8e4eb58)
EncryptProgram =
ErrorFile = error.log
ExtraSecure = 0
FallbackIP = 0
FileCreationMask = 432
Filter = HASH(0x8e4e9d8)
FormAction = HASH(0x8da6628)
FormIgnore = HASH(0x8e5161c)
FractionalItems = 0
Glimpse =
HTMLmirror = 0
HTMLsuffix = .html
Hash = HASH(0x8dfd0ec)
History = 10
IPC =
IPCdir =
IPCmode = 511
ImageAlias = HASH(0x8e4e978)
ImageDir = /jimbos/images/
ImageDirInternal = http://www.some.net/jimbos/images/
ImageDirSecure =
Locale = HASH(0x8e588a4)
LocaleDatabase = locale
Locale_repository = HASH(0x8e52a60)
LogFile = etc/log
MM_InitLocale =
MailOrderTo = abellmt@spsp.net
MasterHost =
Member = HASH(0x8e563c8)
Message =
MixMatch = 0
NoCache = HASH(0x8e515c8)
NoImport = HASH(0x8e4eb88)
NoImportExternal = 0
NoSearch = userdb
NonTaxableField =
OfflineDir = /var/www/catalogs/jimbos/offline
OnFly = onfly
OrderCounter = etc/order.number
OrderLineLimit = 25
OrderProfile = ARRAY(0x8e52880)
OrderProfileName = HASH(0x8e52874)
OrderReport = etc/report
PGP =
PageDir = /var/www/catalogs/jimbos/pages
PageSelectField =
ParseVariables = 1
Password =
Pragma = HASH(0x8e4eb28)
PriceAdjustment =
PriceBreaks =
PriceCommas = 1
PriceDefault = price
PriceDivide = 1
PriceField = no_price
ProductDir = /var/www/catalogs/jimbos/products
ProductFiles = ARRAY(0x8e5885c)
Profile = HASH(0x8e49de4)
ReadPermission = group
RemoteUser =
Replace = HASH(0x8e4d6f4)
Require =
RequiredFields =
RobotLimit = 50
Route = HASH(0x8dfb820)
RouteDatabase = route
Route_repository = HASH(0x8d47f08)
SalesTax = state
SalesTaxFunction =
SalesTaxTable = HASH(0x8e588c8)
SaveDatabase = HASH(0x8e4addc)
SaveExpire = 2592000
SaveStaticDBM = static
ScratchDefault = HASH(0x8e49cf4)
ScratchDir = /var/www/catalogs/jimbos/tmp
SearchProfile = ARRAY(0x8e528a4)
SearchProfileName = HASH(0x8e528d4)
SecureURL = https://www.some.net/cgi-bin/jimbos
SendMailProgram = /usr/lib/sendmail
SeparateItems = 1
SessionDB =
SessionDatabase = /var/www/catalogs/jimbos/session
SessionExpire = 3600
SessionLockFile = etc/session.lock
SessionType = File
SetGroup =
Shipping =
Shipping_desc = HASH(0x8e589ac)
Shipping_line = ARRAY(0x8e3d934)
Shipping_zone = HASH(0x8e448cc)
Source =
Special = HASH(0x8e44710)
SpecialPage = HASH(0x8e44710)
SpecialPageDir = special_pages
Static = 0
StaticAll = 1
StaticDepth = 2
StaticDir = /var/www/html/jimbos/pages
StaticFly = 1
StaticLogged = 1
StaticPage = HASH(0x8e5188c)
StaticPath = http://www.some.net/jimbos/pages
StaticPattern =
StaticSuffix = .html
Sub = HASH(0x8e44800)
TableRestrict = HASH(0x8e4e9a8)
TaxShipping =
TemplateDir = ARRAY(0x8da6604)
TrackFile = /var/www/catalogs/jimbos/logs/usertrack
Umask = 7
UpsZoneFile = products/450.csv
UseCode = yes
UseModifier = ARRAY(0x8df9de4)
UserDB = HASH(0x8e4af08)
UserDB_repository = HASH(0x8e4ae84)
UserDatabase =
UserTag = HASH(0x8ddb998)
ValuesDefault = HASH(0x8e49ed4)
Variable = HASH(0x8d36580)
VariableDatabase = variable
VendRoot = /var/www/catalogs/rob
VendURL = http://www.some.net/cgi-bin/jimbos
WideOpen = 0
WritePermission = group
_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users