log_transaction (interchange-5.8.2) | : | log_transaction (interchange-5.10.0) | ||
---|---|---|---|---|
skipping to change at line 211 | skipping to change at line 211 | |||
[/else] | [/else] | |||
[/if] | [/if] | |||
[calc] | [calc] | |||
$Values->{mv_payment} =~ s/\%c/$Values->{mv_credit_card_type}/g; | $Values->{mv_payment} =~ s/\%c/$Values->{mv_credit_card_type}/g; | |||
return; | return; | |||
[/calc] | [/calc] | |||
[/try] | [/try] | |||
[catch error-set="Payment process" error-scratch="mv_route_failed"] | [catch error-scratch="mv_route_failed"] | |||
There was an error accepting payment: $ERROR$ | There was an error accepting payment: $ERROR$ | |||
[if scratch pay_certs_to_capture] | ||||
voiding pay_cert auth, void id:[pay-cert tid="[scratch pay_certs_ | ||||
to_capture]" void=1] | ||||
[/if] | ||||
[/catch] | [/catch] | |||
[goto if="[scratch mv_route_failed]"] | [goto if="[scratch mv_route_failed]"] | |||
[comment] | [comment] | |||
Now we have accepted payment, update the order number. | Now we have accepted payment, update the order number. | |||
[/comment] | [/comment] | |||
Set order number in values: [value | Set order number in values: [value | |||
name=mv_order_number | name=mv_order_number | |||
skipping to change at line 295 | skipping to change at line 298 | |||
[/try] | [/try] | |||
[catch error-set="Customer record creation" error-scratch="mv_route_failed"] | [catch error-set="Customer record creation" error-scratch="mv_route_failed"] | |||
There was an error adding you to the customer table. | There was an error adding you to the customer table. | |||
[/catch] | [/catch] | |||
[/if] | [/if] | |||
[if value order_desk_entry] | [if value order_desk_entry] | |||
[try] | [try] | |||
[tmpn tmp_compare][/tmpn] | [tmpn tmp_compare][/tmpn] | |||
[tmp tmp_username][data table=userdb col=username key="[value customer_id ]"][/tmp] | [tmp tmp_username][data table=userdb col=usernick key="[value customer_id ]"][/tmp] | |||
[if !scratch tmp_username] | [if !scratch tmp_username] | |||
[calcn] | [calcn] | |||
$Tag->tmp('tmp_pass'); | $Tag->tmp('tmp_pass'); | |||
for(qw/ zip phone_day phone_night /) { | for(qw/ zip phone_day phone_night /) { | |||
my $pass = $Values->{$_}; | my $pass = $Values->{$_}; | |||
$pass =~ s/\s+//g; | $pass =~ s/\s+//g; | |||
next if length($pass) < 4; | next if length($pass) < 4; | |||
$Scratch->{tmp_pass} = $pass; | $Scratch->{tmp_pass} = $pass; | |||
} | } | |||
skipping to change at line 317 | skipping to change at line 320 | |||
$Scratch->{tmp_pass} .= $lets[ rand @lets ] | $Scratch->{tmp_pass} .= $lets[ rand @lets ] | |||
while length($Scratch->{tmp_pass}) < 5; | while length($Scratch->{tmp_pass}) < 5; | |||
return; | return; | |||
[/calcn] | [/calcn] | |||
[tmp hide_status][userdb | [tmp hide_status][userdb | |||
function=new_account | function=new_account | |||
no-login=1 | no-login=1 | |||
assign-username=1 | assign-username=1 | |||
password='[scratch tmp_pa ss]' | password='[scratch tmp_pa ss]' | |||
verify='[scratch tmp_pass ]' | verify='[scratch tmp_pass ]' | |||
profile=autocreate | ||||
][/tmp] | ][/tmp] | |||
[tmp tmp_username][data session auto_created_user][/tmp] | [tmp tmp_username][data session auto_created_user][/tmp] | |||
[if scratch hide_status] | [if scratch hide_status] | |||
Auto-created user [scratch tmp_username], no login. | Auto-created user [scratch tmp_username], no login. | |||
[userdb function=save scratch=NONE username="[scratch tmp _username]" hide=1] | [userdb function=save scratch=NONE username="[scratch tmp _username]" hide=1] | |||
[/if] | [/if] | |||
[/if] | [/if] | |||
[value name=usernick set="[scratch tmp_username]" hide=1] | ||||
[value name=customer_id set="[scratch tmp_username]" hide=1] | [value name=customer_id set="[scratch tmp_username]" hide=1] | |||
[if !value customer_id] | [if !value customer_id] | |||
Auto-create of user failed. Reason: [data session failure] | Auto-create of user failed. Reason: [data session failure] | |||
[perl] die errmsg("Auto-create of user failed. Reason: %s", $Session->{fa ilure}) [/perl] | [perl] die errmsg("Auto-create of user failed. Reason: %s", $Session->{fa ilure}) [/perl] | |||
[/else] | ||||
[/if] | [/if] | |||
[/try] | [/try] | |||
[catch error-set="Customer record creation" error-scratch="mv_route_failed"] | [catch error-set="Customer record creation" error-scratch="mv_route_failed"] | |||
There was an error adding to the customer table. | There was an error adding to the customer table. | |||
[/catch] | [/catch] | |||
[/if] | [/if] | |||
[comment][perl] Log("Starting report."); [/perl][/comment] | [comment][perl] Log("Starting report."); [/perl][/comment] | |||
skipping to change at line 363 | skipping to change at line 366 | |||
[if value order_desk_entry] | [if value order_desk_entry] | |||
[tmp tmp_username][value customer_id][/tmp] | [tmp tmp_username][value customer_id][/tmp] | |||
[tmp tmp_source][value name=salesperson default=ORDER_DESK][/tmp] | [tmp tmp_source][value name=salesperson default=ORDER_DESK][/tmp] | |||
Order desk entry, set next page to: [cgi name=mv_nextpage set="admin/orde r_view"] | Order desk entry, set next page to: [cgi name=mv_nextpage set="admin/orde r_view"] | |||
[else] | [else] | |||
[tmp tmp_username][data session username][/tmp] | [tmp tmp_username][data session username][/tmp] | |||
[tmp tmp_source][data session source][/tmp] | [tmp tmp_source][data session source][/tmp] | |||
[/else] | [/else] | |||
[/if] | [/if] | |||
[seti total_cost][total-cost noformat=1][/seti] | [seti total_cost][if scratch pay_cert_total][scratch tmp_remaining][else][total- cost noformat=1][/else][/if][/seti] | |||
Add main order [value mv_order_number] to transactions: | Add main order [value mv_order_number] to transactions: | |||
[import table=transactions type=LINE continue=NOTES no-commit=1] | [import table=transactions type=LINE continue=NOTES no-commit=1] | |||
code: [value mv_order_number] | code: [value mv_order_number] | |||
store_id: __STORE_ID__ | store_id: __STORE_ID__ | |||
order_number: [value mv_order_number] | order_number: [value mv_order_number] | |||
session: [data session id] | session: [data session id] | |||
username: [scratch tmp_username] | username: [scratch tmp_username] | |||
shipmode: [value mv_shipmode] ([shipping-desc]) | shipmode: [value mv_shipmode] ([shipping-desc]) | |||
shipping: [shipping noformat=1] | shipping: [shipping noformat=1] | |||
nitems: [nitems] | nitems: [nitems] | |||
skipping to change at line 402 | skipping to change at line 405 | |||
b_lname: [scratch tmp_lname] | b_lname: [scratch tmp_lname] | |||
b_address1: [scratch tmp_address1] | b_address1: [scratch tmp_address1] | |||
b_address2: [scratch tmp_address2] | b_address2: [scratch tmp_address2] | |||
b_city: [scratch tmp_city] | b_city: [scratch tmp_city] | |||
b_state: [scratch tmp_state] | b_state: [scratch tmp_state] | |||
b_zip: [scratch tmp_zip] | b_zip: [scratch tmp_zip] | |||
b_country: [scratch tmp_country] | b_country: [scratch tmp_country] | |||
b_phone: [scratch tmp_phone] | b_phone: [scratch tmp_phone] | |||
payment_method: [value mv_payment] | payment_method: [value mv_payment] | |||
payment_mode: [data session payment_mode] | payment_mode: [data session payment_mode] | |||
avs: [calc] ($Session->{payment_result} || {})->{'pop.avs_code'}; [/calc] | ||||
order_id: [data session payment_id] | order_id: [data session payment_id] | |||
auth_code: [calc] ($Session->{payment_result} || {})->{'pop.auth-code'}; [/calc] | auth_code: [calc] ($Session->{payment_result} || {})->{'pop.auth-code'}; [/calc] | |||
tracking_number: | tracking_number: | |||
order_date: [value name=order_date set="[tag time]%Y%m%d %H:%M:%S[/tag]"] | order_date: [value name=order_date set="[tag time]%Y%m%d %H:%M:%S[/tag]"] | |||
order_ymd: [value name=order_date set="[tag time]%Y%m%d[/tag]"] | order_ymd: [value name=order_date set="[tag time]%Y%m%d[/tag]"] | |||
order_wday: [value name=order_wday set="[tag time]%u[/tag]"] | order_wday: [value name=order_wday set="[tag time]%u[/tag]"] | |||
status: pending | status: pending | |||
deleted: 0 | deleted: 0 | |||
archived: 0 | archived: 0 | |||
complete: 0 | complete: 0 | |||
comments: [value filter=mac name=gift_note] | comments: [value filter=mac name=gift_note] | |||
affiliate: [scratch tmp_source] | affiliate: [scratch tmp_source] | |||
campaign: [value campaign] | campaign: [value campaign] | |||
parent: __PARENT__ | parent: __PARENT__ | |||
po_number: [value filter=strip name=po_number] | po_number: [value filter=strip name=po_number] | |||
[if scratch pay_cert_total]pay_cert_total: [scratch pay_cert_total] | ||||
pay_cert_ord_total: [total-cost noformat=1][/if] | ||||
[/import] | [/import] | |||
[/try] | [/try] | |||
[catch error-set="log_orderline_table" error-scratch="mv_route_failed"] | [catch error-set="log_orderline_table" error-scratch="mv_route_failed"] | |||
There was an error adding the order to the transaction table. It was: $ERROR$ | There was an error adding the order to the transaction table. It was: $ERROR$ | |||
[/catch] | [/catch] | |||
[goto if="[scratch mv_route_failed]"] | [goto if="[scratch mv_route_failed]"] | |||
[try] | [try] | |||
skipping to change at line 452 | skipping to change at line 458 | |||
[import table=orderline type=LINE continue=NOTES no-commit=1] | [import table=orderline type=LINE continue=NOTES no-commit=1] | |||
code: [value mv_order_number]-[item-increment] | code: [value mv_order_number]-[item-increment] | |||
store_id: __STORE_ID__ | store_id: __STORE_ID__ | |||
order_number: [value mv_order_number] | order_number: [value mv_order_number] | |||
session: [data session id] | session: [data session id] | |||
username: [scratch tmp_username] | username: [scratch tmp_username] | |||
shipmode: [item-modifier mv_shipmode] | shipmode: [item-modifier mv_shipmode] | |||
sku: [item-code] | sku: [item-code] | |||
options: [item-filter mac strip][item-options report=1 type=value][/item-filter] | options: [item-filter mac strip][item-options report=1 type=value][/item-filter] | |||
quantity: [item-quantity] | quantity: [item-quantity] | |||
price: [item-price noformat] | price: [item-discount-price noformat] | |||
subtotal: [item-subtotal noformat] | subtotal: [item-discount-subtotal noformat] | |||
taxable: [if-item-data !products nontaxable]1[/if-item-data] | ||||
mv_mi: [item-modifier mv_mi] | mv_mi: [item-modifier mv_mi] | |||
mv_si: [item-modifier mv_si] | mv_si: [item-modifier mv_si] | |||
mv_mp: [item-modifier mv_mp] | mv_mp: [item-modifier mv_mp] | |||
order_date: [value order_date] | order_date: [value order_date] | |||
affiliate: [scratch tmp_source] | affiliate: [scratch tmp_source] | |||
campaign: [value campaign] | campaign: [value campaign] | |||
status: pending | status: pending | |||
description: [filter mac][item-description][/filter] | description: [filter mac][item-description][/filter] | |||
[/import] | [/import] | |||
skipping to change at line 476 | skipping to change at line 483 | |||
table=inventory | table=inventory | |||
col=quantity | col=quantity | |||
key="[item-code]" | key="[item-code]" | |||
increment=1 | increment=1 | |||
value="-[item-quantity]" | value="-[item-quantity]" | |||
] | ] | |||
[/if] | [/if] | |||
[comment] Handle purchase of payment certificates [/comment] | [comment] Handle purchase of payment certificates [/comment] | |||
[if-item-field gift_cert] | [if-item-field gift_cert] | |||
[if value mv_payment =~ /credit.*card/i] | Issue payment cert=[pay-cert | |||
Issue payment cert=[pay-cert | issue=1 | |||
issue=1 | no-cookie=1 | |||
amount="[item-subtotal noformat]" | amount="[item-subtotal noformat]" | |||
expires="__GIFT_CERT_PERIOD__" | expires="__GIFT_CERT_PERIOD__" | |||
item-pointer="[item-param mv_ip]" | item-pointer="[item-param mv_ip]" | |||
] | ] | |||
[/if] | ||||
[/if-item-field] | [/if-item-field] | |||
[comment] Handle downloadables [/comment] | [comment] Handle downloadables [/comment] | |||
[if-item-field download] | [if-item-field download] | |||
[if value mv_payment =~ /credit.*card/i] | [if value mv_payment =~ /credit.*card/i] | |||
[set download_present]1[/set] | [set download_present]1[/set] | |||
[userdb | [userdb | |||
function=set_file_acl | function=set_file_acl | |||
mode="expire 7 days" | mode="expire 7 days" | |||
location="[item-code]" | location="[item-code]" | |||
skipping to change at line 574 | skipping to change at line 580 | |||
$Scratch->{tmp_user_save} =~ s/\s+/ /g; | $Scratch->{tmp_user_save} =~ s/\s+/ /g; | |||
return; | return; | |||
[/calc] | [/calc] | |||
[elsif type=explicit compare="[userdb save]"] | [elsif type=explicit compare="[userdb save]"] | |||
[tmpn tmp_user_save]SUCCESS[/tmpn] | [tmpn tmp_user_save]SUCCESS[/tmpn] | |||
[/elsif][/if] | [/elsif][/if] | |||
Saved user information to user database: [scratch tmp_user_save] | Saved user information to user database: [scratch tmp_user_save] | |||
[if scratch auto_create] | [if scratch auto_create] | |||
Logout auto-created user: [userdb function=logout clear=0 clear_cart=0] | Logout auto-created user: [userdb function=logout clear=0 clear_cart=0] | |||
Clear auto-created user's usernick: [calc] delete $Scratch->{usernick}; r eturn 1; [/calc] | ||||
[/if] | [/if] | |||
[/try] | [/try] | |||
[catch | [catch | |||
error-set="log_userdb_table" | error-set="log_userdb_table" | |||
error-scratch="mv_route_failed" | error-scratch="mv_route_failed" | |||
] | ] | |||
There was an error updating the user information: $ERROR$ | There was an error updating the user information: $ERROR$ | |||
[/catch] | [/catch] | |||
[goto if="[scratch mv_route_failed]"] | [goto if="[scratch mv_route_failed]"] | |||
End of changes. 12 change blocks. | ||||
15 lines changed or deleted | 23 lines changed or added |