Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Major update to order status functions in UI. Much of this is funded

  thanks to Gary Norton and Broadgap Technologies.

* Created new update_order_status.tag usertag which does most
  of the functions done previously in admin/order_status.html

* Order status funky page code replaced with [table-editor version].

* Now can "Shipped checked orders". If you check the ship_auto
  check box, it will:

	-- settle CC charge with payment processor if that is needed
	   or wanted
  	-- ship all lines on order
	-- update all status to shipped
	-- archive the order

* Added following fields to transactions:

  auth_code  -- contains authorization code needed for charge settlement
  tracking_number -- separate shipping tracking number from status

  Also updated log_transaction to insert auth_code if available.

* Regularized database types for orderline and transactions

* Removed unnecessary blank "reports" sampledata for orderline and
  transaction

* Added much metadata for orderline, transactions, and payment
  settings

* Fix auto-encryption of credit card number in Vend::Payment even
  if no EncryptKey or credit card number.

* Modified Vend::Payment::TestPayment to allow testing of charge
  settlement.

* Allow setting link-no-blank=1 in [table-editor] to prevent addition
  of rows in a linked table for a particular view.

* To test out settlement and batch updates with Vend::Payment::TestPayment

	1. Uncomment "Require" line in interchange.cfg.
	2. Set following payment preferences in Administration->Preferences:

		MV_PAYMENT_MODE    testpayment
		MV_PAYMENT_ID      test
		SETTLE_TRANSACTION 1

	3. Restart, place a new order, and use Order Manager to ship.
  • Loading branch information...
commit 6f30209074972835e2d012f5bd0a3a8c5a528998 1 parent f1c3bdd
@perusionmike perusionmike authored
Showing with 738 additions and 525 deletions.
  1. +3 −2 MANIFEST
  2. +10 −0 WHATSNEW
  3. +229 −0 code/UI_Tag/update_order_status.tag
  4. +2 −2 configure
  5. +1 −1  dist/foundation/config/additional_fields
  6. +18 −17 dist/foundation/dbconf/mysql/orderline.mysql
  7. +43 −41 dist/foundation/dbconf/mysql/transactions.mysql
  8. +3 −2 dist/foundation/dbconf/oracle/transactions.ora
  9. +18 −17 dist/foundation/dbconf/pgsql/orderline.pgsql
  10. +3 −1 dist/foundation/dbconf/pgsql/transactions.pgsql
  11. +2 −1  dist/foundation/etc/log_transaction
  12. +14 −5 dist/foundation/products/mv_metadata.asc
  13. +1 −1  dist/foundation/products/transactions.txt
  14. +6 −0 dist/foundation/products/variable.txt
  15. +0 −1  dist/foundation/templates/sampledata/reports/products/orderline.txt
  16. +0 −1  dist/foundation/templates/sampledata/reports/products/transactions.txt
  17. +16 −16 dist/foundation/templates/sampledata/tools/products/transactions.txt
  18. +7 −0 dist/interchange.cfg.dist
  19. +2 −2 dist/lib/UI/pages/admin/db_metaconfig.html
  20. +3 −2 dist/lib/UI/pages/admin/item.html
  21. +109 −2 dist/lib/UI/pages/admin/order.html
  22. +109 −359 dist/lib/UI/pages/admin/order_status.html
  23. +5 −2 lib/Vend/Order.pm
  24. +3 −6 lib/Vend/Payment.pm
  25. +18 −4 lib/Vend/Payment/AuthorizeNet.pm
  26. +82 −20 lib/Vend/Payment/TestPayment.pm
  27. +23 −16 lib/Vend/Table/Editor.pm
  28. +8 −4 scripts/makecat.PL
View
5 MANIFEST
@@ -15,6 +15,7 @@ WHATSNEW
code/ActionMap/foo.am
code/Filter/date2time.filter
code/Filter/lc.filter
+code/Filter/next_sequential.filter
code/SystemTag/accessories.coretag
code/SystemTag/accounting.coretag
code/SystemTag/area.coretag
@@ -168,6 +169,7 @@ code/UI_Tag/tabbed_display.coretag
code/UI_Tag/table_editor.coretag
code/UI_Tag/uneval.coretag
code/UI_Tag/unlink_file.coretag
+code/UI_Tag/update_order_status.tag
code/UI_Tag/version.coretag
code/UI_Tag/widget.coretag
code/UI_Tag/with.coretag
@@ -794,10 +796,8 @@ dist/foundation/templates/sampledata/reports/products/cat.txt
dist/foundation/templates/sampledata/reports/products/inventory.txt
dist/foundation/templates/sampledata/reports/products/merchandising.txt
dist/foundation/templates/sampledata/reports/products/options.txt
-dist/foundation/templates/sampledata/reports/products/orderline.txt
dist/foundation/templates/sampledata/reports/products/pricing.txt
dist/foundation/templates/sampledata/reports/products/products.txt
-dist/foundation/templates/sampledata/reports/products/transactions.txt
dist/foundation/templates/sampledata/reports/products/userdb.txt
dist/foundation/templates/sampledata/tools/etc/after.cfg
dist/foundation/templates/sampledata/tools/etc/before.cfg
@@ -1216,6 +1216,7 @@ lib/Vend/Server.pm
lib/Vend/Session.pm
lib/Vend/SessionDB.pm
lib/Vend/SessionFile.pm
+lib/Vend/Swish.pm
lib/Vend/Table/Common.pm
lib/Vend/Table/DBI.pm
lib/Vend/Table/DB_File.pm
View
10 WHATSNEW
@@ -156,6 +156,12 @@ Payment
their site's interaction with the Interchange Payment system, without
actually being connected to a real Payment Services Provider.
+* Change AuthorizeNet.pm to more easily enable settlement of orders
+ done via AUTH_ONLY.
+
+* Prevent automatic try at credit card encryption if no EncryptKey
+ is present.
+
Filters
-------
@@ -370,6 +376,10 @@ UI
* Ability to employ database entries in filters supported by profile
"process_filter" now.
+* Major update to order status update program. Now can batch ship by
+ checking boxes, sequence ship, settle transactions previously done
+ via auth_only with realtime payment gateway, and more.
+
* Many, many, minor bug fixes and improvements.
Forum
View
229 code/UI_Tag/update_order_status.tag
@@ -0,0 +1,229 @@
+UserTag update-order-status Order order_number
+UserTag update-order-status addAttr
+UserTag update-order-status Version $Id: update_order_status.tag,v 1.1 2002-10-17 04:46:23 mheins Exp $
+UserTag update-order-status Routine <<EOR
+sub {
+ my ($on, $opt) = @_;
+ my $die = sub {
+ logError(@_);
+ return undef;
+ };
+ my $odb = database_exists_ref($opt->{orderline_table} || 'orderline')
+ or return $die->("No %s table!", 'orderline');
+ my $tdb = database_exists_ref($opt->{transactions_table} || 'transactions')
+ or return $die->("No %s table!", 'transactions');
+ my $udb = database_exists_ref($opt->{userdb_table} || 'userdb')
+ or return $die->("No %s table!", 'userdb');
+
+ my $trec = $tdb->row_hash($on);
+
+ if(! $trec) {
+ return $die->("Bad transaction number: %s", $on);
+ }
+
+ my $user = $trec->{username};
+ my $wants_copy = $udb->field($user, 'email_copy');
+
+ for(qw/
+ settle_transaction
+ status
+ archive
+ lines_shipped
+ send_email
+ ship_all
+ /)
+ {
+ $opt->{$_} = $CGI::values{$_} if ! defined $opt->{$_};
+ }
+
+ $wants_copy = $opt->{send_email} if length $opt->{send_email};
+#Log("Order number=$on username=$user wants=$wants_copy");
+ delete $::Scratch->{ship_notice_username};
+ delete $::Scratch->{ship_notice_email};
+ if($wants_copy) {
+ $::Scratch->{ship_notice_username} = $user;
+ $::Scratch->{ship_notice_email} = $udb->field($user, 'email')
+ or delete $::Scratch->{ship_notice_username};
+ }
+
+
+ if($opt->{settle_transaction}) {
+ my $oid = $trec->{order_id};
+ my $amount = $trec->{total_cost};
+ SETTLE: {
+ if(! $oid) {
+ Vend::Tags->error( {
+ name => 'settle_transaction',
+ set => "No order ID to settle!",
+ });
+ return undef;
+ }
+ elsif($oid =~ /\*$/) {
+ Vend::Tags->error( {
+ name => 'settle_transaction',
+ set => "Order ID $oid already settled!",
+ });
+ return undef;
+ }
+ else {
+#::logDebug("auth-code: $trec->{auth_code} oid=$oid");
+ my $settled = Vend::Tags->charge( {
+ route => $::Variable->{MV_PAYMENT_MODE},
+ order_id => $oid,
+ amount => $amount,
+ auth_code => $trec->{auth_code},
+ transaction => 'settle_prior',
+ });
+ if($settled) {
+ $tdb->set_field($on, 'order_id', "$oid*");
+ Vend::Tags->warning(
+ errmsg(
+ "Order ID %s settled with processor.",
+ $oid,
+ ),
+ );
+ }
+ else {
+ Vend::Tags->error( {
+ name => 'settle_transaction',
+ set => errmsg(
+ "Order ID %s settle operation failed. Reason: %s",
+ $oid,
+ $Vend::Session->{payment_result}{MErrMsg},
+ ),
+ });
+ return undef;
+ }
+
+ }
+ }
+ }
+
+ if($opt->{status} =~ /\d\d\d\d/) {
+ $tdb->set_field($on, 'status', $opt->{status});
+ }
+ else {
+ $tdb->set_field($on, 'status', 'shipped');
+ }
+
+ my @shiplines = grep /\S/, split /\0/, $opt->{lines_shipped};
+ if(! @shiplines and ! $opt->{ship_all}) {
+ my @keys = grep /status__1/, keys %CGI::values;
+#::logDebug("keys to ship: " . join(',', @keys));
+ my %stuff;
+ for(@keys) {
+ m/^(\d+)_/;
+ my $n = $1 || 0;
+ $n++;
+ if($opt->{ship_all} or $CGI::values{$_} eq 'shipped') {
+ push @shiplines, $n;
+#::logDebug("ship $n");
+ }
+ }
+ }
+ else {
+ @shiplines = map { s/.*\D//; $_; } @shiplines;
+ }
+ my $to_ship = scalar @shiplines;
+
+ my $count_q = "select * from orderline where order_number = '$on'";
+ my $lines_ary = $odb->query($count_q);
+ if(! $lines_ary) {
+ $::Scratch->{ui_message} = "No order lines for order $on";
+ return;
+ }
+ my $total_lines = scalar @$lines_ary;
+#::logDebug("total_lines=$total_lines to_ship=$to_ship shiplines=" . uneval(\@shiplines));
+
+ my $odb_keypos = $odb->config('KEY_INDEX');
+
+ # See if some items have already shipped
+ my %shipping;
+ my %already;
+
+ for(@$lines_ary) {
+ my $code = $_->[$odb_keypos];
+ my $status = $odb->field($code, 'status');
+ my $line = $code;
+ $line =~ s/.*\D//;
+ $line =~ s/^0+//;
+ if($status eq 'shipped') {
+ $already{$line} = 1;
+ }
+ elsif($opt->{ship_all}) {
+ $shipping{$line} = 1;
+ }
+ }
+
+ my $ship_mesg;
+ my $g_status;
+
+ @shiplines = grep ! $already{$_}, @shiplines;
+ @shipping{@shiplines} = @shiplines;
+
+ if($total_lines == $to_ship) {
+ $ship_mesg = "Order $on complete, $total_lines lines set shipped.";
+ $::Scratch->{ship_notice_complete} = $ship_mesg;
+ $g_status = 'shipped';
+ }
+ else {
+ $ship_mesg = "Order $on partially shipped ($to_ship of $total_lines lines).";
+ delete $::Scratch->{ship_notice_complete};
+ $g_status = 'partial';
+ }
+
+ my $minor_mesg = '';
+
+ my $email_mesg = $::Scratch->{ship_notice_username}
+ ? "Email copy sent to $::Scratch->{ship_notice_email}."
+ : "No email copy sent as per user preference.";
+
+ # Actually update the orderline database
+ for(@$lines_ary) {
+ my $code = $_->[$odb_keypos];
+ my $line = $code;
+ $line =~ s/.*\D//;
+ next if $already{$line};
+ my $status = $shipping{$line} ? 'shipped' : 'backorder';
+ $odb->set_field($code, 'status', $status)
+ or do {
+ $::Scratch->{ui_message} = "Orderline $code ship status update failed.";
+ return;
+ };
+
+ }
+
+ for(keys %already) {
+ $shipping{$_} = $_;
+ }
+
+ my $total_shipped_now = scalar keys %shipping;
+
+ delete $::Scratch->{ship_now_complete};
+ if (
+ $total_lines != scalar @shiplines
+ and
+ $total_shipped_now == $total_lines
+ )
+ {
+ $g_status = 'shipped';
+ $::Scratch->{ship_now_complete} = 1
+ if $total_shipped_now == $total_lines;
+ $ship_mesg = "Order $on now complete (all $total_lines lines).";
+ }
+
+ $tdb->set_field($on, 'status', $g_status);
+ $tdb->set_field($on, 'archived', 1)
+ if $opt->{archive} and $g_status = 'shipped';
+
+ Vend::Tags->warning("$ship_mesg $email_mesg");
+ delete $::Scratch->{ship_notice_username};
+ delete $::Scratch->{ship_notice_email};
+ if($wants_copy) {
+ $::Scratch->{ship_notice_username} = $user;
+ $::Scratch->{ship_notice_email} = $trec->{email}
+ or delete $::Scratch->{ship_notice_username};
+ }
+ return;
+}
+EOR
View
4 configure
@@ -1,6 +1,6 @@
#!/bin/sh
-# $Id: configure,v 2.6 2002-08-15 20:18:48 mheins Exp $
+# $Id: configure,v 2.7 2002-10-17 04:46:23 mheins Exp $
cat <<EOF
@@ -102,6 +102,6 @@ echo "If you get a CPAN error, rerun the configuration and it should go away."
echo
fi
-$PERL Makefile.PL
+$PERL Makefile.PL $*
make
make test && make install
View
2  dist/foundation/config/additional_fields
@@ -247,5 +247,5 @@ Our Price Sale Price Best Price
DEMOMODE
Set to 1 to display demo helper features in your store
- 1 0
+__MVC_DEMOMODE__ 1 0
View
35 dist/foundation/dbconf/mysql/orderline.mysql
@@ -5,24 +5,25 @@ endif
ifdef SQLPASS
Database orderline PASS __SQLPASS__
endif
+Database orderline DEFAULT_TYPE varchar(128)
Database orderline COLUMN_DEF "code=char(14) NOT NULL PRIMARY KEY"
-Database orderline COLUMN_DEF "store_id=CHAR(9) DEFAULT '' NOT NULL"
-Database orderline COLUMN_DEF "order_number=CHAR(14) NOT NULL"
-Database orderline COLUMN_DEF "session=CHAR(32) NOT NULL"
-Database orderline COLUMN_DEF "username=CHAR(20) default '' NOT NULL"
-Database orderline COLUMN_DEF "shipmode=CHAR(32) default '' NOT NULL"
-Database orderline COLUMN_DEF "sku=CHAR(64) NOT NULL"
-Database orderline COLUMN_DEF "quantity=CHAR(9) NOT NULL"
-Database orderline COLUMN_DEF "price=CHAR(12) NOT NULL"
-Database orderline COLUMN_DEF "subtotal=CHAR(12) NOT NULL"
-Database orderline COLUMN_DEF "shipping=CHAR(12)"
-Database orderline COLUMN_DEF "taxable=CHAR(3)"
-Database orderline COLUMN_DEF "mv_mi=VARCHAR(64)"
-Database orderline COLUMN_DEF "mv_si=VARCHAR(3)"
-Database orderline COLUMN_DEF "mv_mp=VARCHAR(3)"
-Database orderline COLUMN_DEF "options=VARCHAR(255)"
+Database orderline COLUMN_DEF "store_id=varchar(9) DEFAULT '' NOT NULL"
+Database orderline COLUMN_DEF "order_number=varchar(14) NOT NULL"
+Database orderline COLUMN_DEF "session=varchar(32) NOT NULL"
+Database orderline COLUMN_DEF "username=varchar(20) default '' NOT NULL"
+Database orderline COLUMN_DEF "shipmode=varchar(32) default '' NOT NULL"
+Database orderline COLUMN_DEF "sku=varchar(64) NOT NULL"
+Database orderline COLUMN_DEF "quantity=varchar(9) NOT NULL"
+Database orderline COLUMN_DEF "price=varchar(12) NOT NULL"
+Database orderline COLUMN_DEF "subtotal=varchar(12) NOT NULL"
+Database orderline COLUMN_DEF "shipping=varchar(12)"
+Database orderline COLUMN_DEF "taxable=varchar(3)"
+Database orderline COLUMN_DEF "mv_mi=varchar(64)"
+Database orderline COLUMN_DEF "mv_si=varchar(3)"
+Database orderline COLUMN_DEF "mv_mp=varchar(3)"
+Database orderline COLUMN_DEF "options=varchar(255)"
Database orderline COLUMN_DEF "order_date=varchar(32) NOT NULL"
Database orderline COLUMN_DEF "update_date=timestamp"
-Database orderline COLUMN_DEF "status=VARCHAR(32)"
-Database orderline COLUMN_DEF "parent=CHAR(9)"
+Database orderline COLUMN_DEF "status=varchar(32)"
+Database orderline COLUMN_DEF "parent=varchar(9)"
Database orderline INDEX store_id order_number
View
84 dist/foundation/dbconf/mysql/transactions.mysql
@@ -5,53 +5,55 @@ endif
ifdef SQLPASS
Database transactions PASS __SQLPASS__
endif
-Database transactions transactions.raw SQL
+Database transactions DEFAULT_TYPE varchar(128)
Database transactions COLUMN_DEF "code=char(14) NOT NULL PRIMARY KEY"
-Database transactions COLUMN_DEF "store_id=CHAR(9) DEFAULT '' NOT NULL"
+Database transactions COLUMN_DEF "store_id=varchar(9) DEFAULT '' NOT NULL"
Database transactions INDEX store_id
-Database transactions COLUMN_DEF "order_number=CHAR(14) NOT NULL"
+Database transactions COLUMN_DEF "order_number=varchar(14) NOT NULL"
Database transactions INDEX order_number
-Database transactions COLUMN_DEF "session=CHAR(32) NOT NULL"
-Database transactions COLUMN_DEF "username=CHAR(20) default '' NOT NULL"
-Database transactions COLUMN_DEF "shipmode=CHAR(32) NOT NULL"
-Database transactions COLUMN_DEF "nitems=CHAR(9) NOT NULL"
-Database transactions COLUMN_DEF "subtotal=CHAR(12) NOT NULL"
-Database transactions COLUMN_DEF "shipping=CHAR(12) NOT NULL"
-Database transactions COLUMN_DEF "handling=CHAR(12)"
-Database transactions COLUMN_DEF "salestax=CHAR(12)"
-Database transactions COLUMN_DEF "total_cost=CHAR(16) NOT NULL"
-Database transactions COLUMN_DEF "fname=VARCHAR(30)"
-Database transactions COLUMN_DEF "lname=VARCHAR(30)"
-Database transactions COLUMN_DEF "company=VARCHAR(30)"
-Database transactions COLUMN_DEF "address1=VARCHAR(64)"
-Database transactions COLUMN_DEF "address2=VARCHAR(64)"
-Database transactions COLUMN_DEF "city=VARCHAR(30) NOT NULL"
-Database transactions COLUMN_DEF "state=VARCHAR(10)"
-Database transactions COLUMN_DEF "zip=CHAR(10) DEFAULT '00000' NOT NULL"
-Database transactions COLUMN_DEF "country=CHAR(10) DEFAULT '' NOT NULL"
-Database transactions COLUMN_DEF "phone_day=VARCHAR(20)"
-Database transactions COLUMN_DEF "phone_night=VARCHAR(20)"
-Database transactions COLUMN_DEF "fax=VARCHAR(20)"
-Database transactions COLUMN_DEF "email=VARCHAR(42)"
-Database transactions COLUMN_DEF "b_fname=VARCHAR(30)"
-Database transactions COLUMN_DEF "b_lname=VARCHAR(30)"
-Database transactions COLUMN_DEF "b_company=VARCHAR(30)"
-Database transactions COLUMN_DEF "b_address1=VARCHAR(64)"
-Database transactions COLUMN_DEF "b_address2=VARCHAR(64)"
-Database transactions COLUMN_DEF "b_city=VARCHAR(30)"
-Database transactions COLUMN_DEF "b_state=VARCHAR(10)"
-Database transactions COLUMN_DEF "b_zip=CHAR(10) DEFAULT '00000' NOT NULL"
-Database transactions COLUMN_DEF "b_country=CHAR(10) DEFAULT '' NOT NULL"
-Database transactions COLUMN_DEF "b_phone=VARCHAR(20)"
+Database transactions COLUMN_DEF "session=varchar(32) NOT NULL"
+Database transactions COLUMN_DEF "username=varchar(20) default '' NOT NULL"
+Database transactions COLUMN_DEF "shipmode=varchar(32) NOT NULL"
+Database transactions COLUMN_DEF "nitems=varchar(9) NOT NULL"
+Database transactions COLUMN_DEF "subtotal=varchar(12) NOT NULL"
+Database transactions COLUMN_DEF "shipping=varchar(12) NOT NULL"
+Database transactions COLUMN_DEF "handling=varchar(12)"
+Database transactions COLUMN_DEF "salestax=varchar(12)"
+Database transactions COLUMN_DEF "total_cost=varchar(16) NOT NULL"
+Database transactions COLUMN_DEF "fname=varchar(30)"
+Database transactions COLUMN_DEF "lname=varchar(30)"
+Database transactions COLUMN_DEF "company=varchar(30)"
+Database transactions COLUMN_DEF "address1=varchar(64)"
+Database transactions COLUMN_DEF "address2=varchar(64)"
+Database transactions COLUMN_DEF "city=varchar(30) NOT NULL"
+Database transactions COLUMN_DEF "state=varchar(10)"
+Database transactions COLUMN_DEF "zip=varchar(10) DEFAULT '00000' NOT NULL"
+Database transactions COLUMN_DEF "country=varchar(10) DEFAULT '' NOT NULL"
+Database transactions COLUMN_DEF "phone_day=varchar(20)"
+Database transactions COLUMN_DEF "phone_night=varchar(20)"
+Database transactions COLUMN_DEF "fax=varchar(20)"
+Database transactions COLUMN_DEF "email=varchar(42)"
+Database transactions COLUMN_DEF "b_fname=varchar(30)"
+Database transactions COLUMN_DEF "b_lname=varchar(30)"
+Database transactions COLUMN_DEF "b_company=varchar(30)"
+Database transactions COLUMN_DEF "b_address1=varchar(64)"
+Database transactions COLUMN_DEF "b_address2=varchar(64)"
+Database transactions COLUMN_DEF "b_city=varchar(30)"
+Database transactions COLUMN_DEF "b_state=varchar(10)"
+Database transactions COLUMN_DEF "b_zip=varchar(10) DEFAULT '00000' NOT NULL"
+Database transactions COLUMN_DEF "b_country=varchar(10) DEFAULT '' NOT NULL"
+Database transactions COLUMN_DEF "b_phone=varchar(20)"
Database transactions COLUMN_DEF "payment_method=varchar(128)"
Database transactions COLUMN_DEF "avs=varchar(32)"
-Database transactions COLUMN_DEF "order_id=varchar(32)"
Database transactions COLUMN_DEF "order_date=varchar(32) NOT NULL"
Database transactions COLUMN_DEF "update_date=timestamp"
-Database transactions COLUMN_DEF "status=VARCHAR(32)"
-Database transactions COLUMN_DEF "parent=CHAR(9)"
-Database transactions COLUMN_DEF "archived=CHAR(1) DEFAULT ''"
-Database transactions COLUMN_DEF "deleted=CHAR(1) DEFAULT ''"
-Database transactions COLUMN_DEF "complete=CHAR(1) DEFAULT ''"
+Database transactions COLUMN_DEF "order_id=varchar(32)"
+Database transactions COLUMN_DEF "auth_code=varchar(32)"
+Database transactions COLUMN_DEF "tracking_number=varchar(64)"
+Database transactions COLUMN_DEF "status=varchar(32)"
+Database transactions COLUMN_DEF "parent=varchar(9)"
+Database transactions COLUMN_DEF "archived=varchar(1) DEFAULT ''"
+Database transactions COLUMN_DEF "deleted=varchar(1) DEFAULT ''"
+Database transactions COLUMN_DEF "complete=varchar(1) DEFAULT ''"
Database transactions COLUMN_DEF "comments=text"
Database transactions COLUMN_DEF "currency_locale=varchar(32)"
View
5 dist/foundation/dbconf/oracle/transactions.ora
@@ -6,7 +6,6 @@ endif
ifdef SQLPASS
Database transactions PASS __SQLPASS__
endif
-Database transactions transactions.raw SQL
Database transactions DEFAULT_TYPE VARCHAR2(128)
Database transactions COLUMN_DEF "code=VARCHAR2(14) PRIMARY KEY"
Database transactions COLUMN_DEF "store_id=VARCHAR2(9) DEFAULT ''"
@@ -48,6 +47,8 @@ Database transactions COLUMN_DEF "b_phone=VARCHAR2(20)"
Database transactions COLUMN_DEF "payment_method=VARCHAR2(128)"
Database transactions COLUMN_DEF "avs=VARCHAR2(32)"
Database transactions COLUMN_DEF "order_id=VARCHAR2(32)"
+Database transactions COLUMN_DEF "auth_code=VARCHAR2(32)"
+Database transactions COLUMN_DEF "tracking_number=VARCHAR2(64)"
Database transactions COLUMN_DEF "order_date=VARCHAR2(32)"
Database transactions COLUMN_DEF "update_date=DATE DEFAULT SYSDATE"
Database transactions COLUMN_DEF "status=VARCHAR2(32)"
@@ -56,4 +57,4 @@ Database transactions COLUMN_DEF "archived=VARCHAR2(1) DEFAULT ''"
Database transactions COLUMN_DEF "deleted=VARCHAR2(1) DEFAULT ''"
Database transactions COLUMN_DEF "complete=VARCHAR2(1) DEFAULT ''"
Database transactions COLUMN_DEF "comments=VARCHAR2(2000)"
-Database transactions COLUMN_DEF "currency_locale=varchar2(32)"
+Database transactions COLUMN_DEF "currency_locale=VARCHAR2(32)"
View
35 dist/foundation/dbconf/pgsql/orderline.pgsql
@@ -5,23 +5,24 @@ endif
ifdef SQLPASS
Database orderline PASS __SQLPASS__
endif
-Database orderline COLUMN_DEF "code=VARCHAR(14) NOT NULL PRIMARY KEY"
-Database orderline COLUMN_DEF "store_id=VARCHAR(9)"
-Database orderline COLUMN_DEF "order_number=VARCHAR(14) NOT NULL"
-Database orderline COLUMN_DEF "session=VARCHAR(32) NOT NULL"
-Database orderline COLUMN_DEF "username=VARCHAR(20)"
-Database orderline COLUMN_DEF "shipmode=VARCHAR(32)"
-Database orderline COLUMN_DEF "sku=VARCHAR(64) NOT NULL"
-Database orderline COLUMN_DEF "quantity=VARCHAR(9) NOT NULL"
-Database orderline COLUMN_DEF "price=VARCHAR(12) NOT NULL"
-Database orderline COLUMN_DEF "subtotal=VARCHAR(12) NOT NULL"
-Database orderline COLUMN_DEF "shipping=VARCHAR(12)"
-Database orderline COLUMN_DEF "taxable=VARCHAR(3)"
-Database orderline COLUMN_DEF "size=VARCHAR(30)"
-Database orderline COLUMN_DEF "color=VARCHAR(30)"
-Database orderline COLUMN_DEF "options=VARCHAR(255)"
+Database orderline DEFAULT_TYPE varchar(128)
+Database orderline COLUMN_DEF "code=varchar(14) NOT NULL PRIMARY KEY"
+Database orderline COLUMN_DEF "store_id=varchar(9)"
+Database orderline COLUMN_DEF "order_number=varchar(14) NOT NULL"
+Database orderline COLUMN_DEF "session=varchar(32) NOT NULL"
+Database orderline COLUMN_DEF "username=varchar(20)"
+Database orderline COLUMN_DEF "shipmode=varchar(32)"
+Database orderline COLUMN_DEF "sku=varchar(64) NOT NULL"
+Database orderline COLUMN_DEF "quantity=varchar(9) NOT NULL"
+Database orderline COLUMN_DEF "price=varchar(12) NOT NULL"
+Database orderline COLUMN_DEF "subtotal=varchar(12) NOT NULL"
+Database orderline COLUMN_DEF "shipping=varchar(12)"
+Database orderline COLUMN_DEF "taxable=varchar(3)"
+Database orderline COLUMN_DEF "size=varchar(30)"
+Database orderline COLUMN_DEF "color=varchar(30)"
+Database orderline COLUMN_DEF "options=varchar(255)"
Database orderline COLUMN_DEF "order_date=varchar(32) NOT NULL"
Database orderline COLUMN_DEF "update_date=timestamp"
-Database orderline COLUMN_DEF "status=VARCHAR(32)"
-Database orderline COLUMN_DEF "parent=VARCHAR(9)"
+Database orderline COLUMN_DEF "status=varchar(32)"
+Database orderline COLUMN_DEF "parent=varchar(9)"
Database orderline INDEX store_id order_number
View
4 dist/foundation/dbconf/pgsql/transactions.pgsql
@@ -5,7 +5,7 @@ endif
ifdef SQLPASS
Database transactions PASS __SQLPASS__
endif
-Database transactions transactions.raw SQL
+Database transactions DEFAULT_TYPE varchar(128)
Database transactions COLUMN_DEF "code=VARCHAR(14) NOT NULL PRIMARY KEY"
Database transactions COLUMN_DEF "store_id=VARCHAR(9)"
Database transactions COLUMN_DEF "order_number=VARCHAR(14) NOT NULL"
@@ -44,6 +44,8 @@ Database transactions COLUMN_DEF "b_phone=VARCHAR(20)"
Database transactions COLUMN_DEF "payment_method=varchar(128)"
Database transactions COLUMN_DEF "avs=varchar(32)"
Database transactions COLUMN_DEF "order_id=varchar(32)"
+Database transactions COLUMN_DEF "auth_code=varchar(32)"
+Database transactions COLUMN_DEF "tracking_number=varchar(64)"
Database transactions COLUMN_DEF "order_date=varchar(32) NOT NULL"
Database transactions COLUMN_DEF "update_date=timestamp"
Database transactions COLUMN_DEF "archived=CHAR(1) DEFAULT ''"
View
3  dist/foundation/etc/log_transaction
@@ -67,7 +67,7 @@ Payment processing...payment_method=[value mv_order_profile]
Real-time charge FAILED. Reason: [data session cybercash_error]
[calc]
die errmsg(
- "Real-time charge failed. Reason: %s",
+ "Real-time charge failed. Reason: %s\n",
errmsg($Session->{cybercash_error}),
);
[/calc]
@@ -172,6 +172,7 @@ b_phone: [value filter=strip name=b_phone]
payment_method: [value mv_payment]
payment_mode: [data session payment_mode]
order_id: [data session payment_id]
+auth_code: [calc] ($Session->{payment_result} || {})->{'pop.auth-code'}; [/calc]
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_wday: [value name=order_wday set="[tag time]%u[/tag]"]
View
19 dist/foundation/products/mv_metadata.asc
@@ -101,7 +101,7 @@ metaconfig::mv_metadata::name text 20 Variable name Normally left empty,
text2html=Simple text to HTML,
urlencode=URL encode (%20, etc),
pagefile=Safe for Interchange page name,
- entities=HTML entities (& -> &amp;), date_change=MM/DD/YYYY to YYYYMMDD option_format
+ entities=HTML entities (& -> &amp;), date_change=MM/DD/YYYY to YYYYMMDD option_format
dbconfig::mv_metadata::height text 4 Select page rows Number of rows to display at selector page. digits
dbconfig::mv_metadata::help textarea 70 4 Help displays at top of page
dbconfig::mv_metadata::help_url text 70 4 Help URL links below help text
@@ -168,8 +168,8 @@ optmaster::options::o_simple select =No,1=Yes Enable options Whether any
inventory::stock_message select In stock,
Ships in 3-5 days,
Ships in 4-6 weeks,
- Special order Out of stock message stock_message
-item_select::products 50 Item Editor {'ui_show_fields' => "sku
+ Special order Out of stock message stock_message
+item_select::products 50 Item Editor {'ui_show_fields' => "sku
description
prod_group
category
@@ -197,7 +197,11 @@ shipping text description
new=New item,
expired=expired Promotions Selects where to feature the item for a promotion. option_format <A HREF="admin/add_meta_option?item_id=_UI_TABLE_::_UI_COLUMN_&ui_return_to=admin/item&ui_return_to=ui_return_table=products">add...</A>
merchandising::finish_date date End date
-merchandising::sku text products sku
+merchandising::sku text products sku
+merchandising::start_date date Start date date_change
+merchandising::timed_promotion select =No,
+1=Yes Timed? <B>Yes</B> if the promotion is timed with the start and end dates.
+merchandising::upsell_to text 50 products Up-sell SKUs &nbsp;&nbsp;<A HREF="admin/sku_selector?caller=item_up&table=_UI_TABLE_&col=_UI_COLUMN_&item_id=_UI_KEY_&value=_UI_URL_VALUE_">select...</A>
metaconfig::mv_metadata::append textarea 60 5 Append HTML <SMALL>HTML to be appended to the widget.
Will substitute in the macros _UI_TABLE_, _UI_COLUMN_,
_UI_KEY, and _UI_VALUE_, and will resolve relative links
@@ -265,10 +269,16 @@ variable::Variable::FORUM_EMAIL_NOTIFY text 50 Forum notify email An emai
=Ordering information
+description
+price
+differential
+modular::options::differential text 12 Price offset Adjustment to option price when phantom. A positive or negative
+number.
modular::options::o_default select =No,
1=Yes Default? Yes if the default selection for the group.
modular::options::o_enable select =No,
1=Yes Follow? Enable for next level
+modular::options::o_group combo 5 options Option group Scanned to see if it applies (or doesn't apply) to this product. o_group nullselect
modular::options::o_group combo 5 options Option group Scanned to see if it applies (or doesn't apply) to this product. o_group nullselect
modular::options::o_master select options =none Master item Always included when the base SKU is equal to this. sku
modular::options::o_master select options =none Master item Always included when the base SKU is equal to this. sku
@@ -285,4 +295,3 @@ variant::options::o_width text 4 Width of widget
o_master
sku
o_group
-modular::options::price text 12 Price Price of option
View
2  dist/foundation/products/transactions.txt
@@ -1 +1 @@
-code store_id order_number session__MVC_FIELDMUNGE__ username shipmode nitems subtotal shipping handling salestax total_cost fname lname company address1 address2 city state zip country phone_day phone_night fax email b_fname b_lname b_company b_address1 b_address2 b_city b_state b_zip b_country b_phone order_date order_ymd order_wday payment_method po_number payment_mode avs order_id update_date status tracking_number affiliate campaign parent archived deleted complete comments currency_locale
+code store_id order_number session__MVC_FIELDMUNGE__ username shipmode nitems subtotal shipping handling salestax total_cost fname lname company address1 address2 city state zip country phone_day phone_night fax email b_fname b_lname b_company b_address1 b_address2 b_city b_state b_zip b_country b_phone order_date order_ymd order_wday payment_method po_number payment_mode avs order_id auth_code update_date status tracking_number affiliate campaign parent archived deleted complete comments currency_locale
View
6 dist/foundation/products/variable.txt
@@ -63,6 +63,11 @@ MENUBAR_WEIGHT normal Catalog Colors and Style
MV_DEFAULT_SEARCH_DB 1 Database
MV_DEMO_MODE __MVC_DEMOMODE__ General
MV_OPTION_TABLE options Item display
+MV_PAYMENT_ID Payment
+MV_PAYMENT_SECRET Payment
+MV_PAYMENT_MODE Payment
+MV_PAYMENT_HOST Payment
+MV_PAYMENT_REFERER Payment
MYSQL __MVC_MYSQL__ Database
ORACLE __MVC_ORACLE__ Database
ORDERS_TO __MVC_MAILORDERTO__ Order
@@ -77,6 +82,7 @@ SAMPLEURL __MVC_SAMPLEURL__ Directories and Paths
SECURE_ENABLE __MVC_ENABLESECURE__ General
SECURE_SERVER __MVC_SECURESERVERNAME__ Directories and Paths
SERVER_NAME __MVC_SERVERNAME__ Directories and Paths
+SETTLE_TRANSACTION Payment
SHIP_DEFAULT_COUNTRY US Shipping
SHIP_DEFAULT_MODE upsg Shipping
SHIP_FLAT_DOM_RATE 5 Shipping
View
1  dist/foundation/templates/sampledata/reports/products/orderline.txt
@@ -1 +0,0 @@
-code store_id order_number session__MVC_FIELDMUNGE__ username shipmode sku quantity price subtotal shipping taxable mv_mi mv_si size__MVC_FIELDMUNGE__ color options order_date update_date status parent affiliate campaign description mv_mp
View
1  dist/foundation/templates/sampledata/reports/products/transactions.txt
@@ -1 +0,0 @@
-code store_id order_number session__MVC_FIELDMUNGE__ username shipmode nitems subtotal shipping handling salestax total_cost fname lname company address1 address2 city state zip country phone_day phone_night fax email b_fname b_lname b_company b_address1 b_address2 b_city b_state b_zip b_country b_phone order_date order_ymd order_wday payment_method po_number payment_mode avs order_id update_date status tracking_number affiliate campaign parent archived deleted complete comments currency_locale
View
32 dist/foundation/templates/sampledata/tools/products/transactions.txt
@@ -1,16 +1,16 @@
-code store_id order_number session__MVC_FIELDMUNGE__ username shipmode nitems subtotal shipping handling salestax total_cost fname lname company address1 address2 city state zip country phone_day phone_night fax email b_fname b_lname b_company b_address1 b_address2 b_city b_state b_zip b_country b_phone order_date order_ymd order_wday payment_method po_number avs order_id update_date status tracking_number affiliate campaign parent archived deleted complete comments currency_locale
-00001 00001 AhGiHXgR T00001 upsg (UPS Ground) 1 19.99 5.73 0 0 25.72 Ueber Mensch 16 Hauptstrasse Portland OR 97201 US 503-555-1212 devnull@icdevgroup.net 20001006 11:35:39 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1 0 0
-00002 00002 AhGiHXgR ckirk upsg (UPS Ground) 27 641.73 15.06 0 41.71 698.5 Charles Kirk Auto Exchange Express 123 Exchange Dr. Seattle WA 34987 US 360-111-1234 360-111-1244 kirk@icdevgroup.net 20001006 11:37:01 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ backorder 0
-00003 00003 AhGiHXgR jking upsg (UPS Ground) 150 1948.5 61.01 0 116.91 2126.42 John King Car Parts, Inc. 123 Auto Blvd. Miami FL 39807 US 305-111-1234 305-111-1239 king@icdevgroup.net 20001006 11:39:36 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1 0 0
-00004 00004 AhGiHXgR ladams upsg (UPS Ground) 27 257.89 11.13 0 15.47 284.49 Louis Adams Electronics Inc. 123 California Street Los Angeles CA 78902 US 714-111-1234 714-111-1235 adams@icdevgroup.net 20001006 11:40:39 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ credit 0
-00005 00005 AhGiHXgR lriley upsg (UPS Ground) 17 164.83 6.9 6.59 178.32 Larry Riley Computerz Inc. 123 Monitor Rd. New York NY 46890 US 518-111-1234 518-111-1242 riley@icdevgroup.net 20001006 11:42:01 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ partial hardhat
-00006 00006 AhGiHXgR T00002 upsr (UPS Next Day) 1 29.99 0 0 0 29.99 Bobby Bodega Computerz Inc. 9500 W. Covina Valdez AK 99686 US 907-111-1234 milton@icdevgroup.net 20001006 11:44:34 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
-00007 00007 AhGiHXgR mcarter upsg (UPS Ground) 2 89.98 9.84 0 4.50 104.32 Michele Carter Spare Parts, Inc. 123 Parts Ctr Blvd. Annapolis MD 32498 US 301-111-1234 703-111-1241 carter@icdevgroup.net 20001006 12:07:52 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1 0 0
-00008 00008 AhGiHXgR mkeller upsg (UPS Ground) 3 53.97 5.17 0 0 59.14 Michael Keller InfoMed, Inc. 123 Oak St. Portland OR 45098 US 541-111-1234 541-111-1240 keller@icdevgroup.net 20001006 12:08:36 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
-00009 00009 AhGiHXgR mmichaels upsg (UPS Ground) 100 100 0 0 6.3 106.3 Michael Michaels Medical Supplies Co. 123 South Street Austin TX 30987 US 512-111-9876 512-111-1237 michael@icdevgroup.net 20001006 12:09:48 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 0 0 0
-00010 00010 AhGiHXgR tlucas upsg (UPS Ground) 5 57.95 6.43 0 2.90 67.28 Thomas Lucas Construct Buildings Inc. 123 Building Dr. Phoenix AZ 56987 US 520-111-1234 520-111-1245 lucas@icdevgroup.net 20001006 12:10:47 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ canceled 0
-00011 00011 AhGiHXgR jrollins upsg (UPS Ground) 1 44.99 6.87 0 1.57 53.43 Joseph Rollins Expert Repair, Inc. 123 Area Rd. Richmond VA 22398 US 804-111-1234 804-111-1243 Rollins@icdevgroup.net 20001006 12:11:34 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
-00012 00012 AhGiHXgR ssmith upsg (UPS Ground) 1 18.99 5.61 24.6 Steve Smith Pharm Supplies, Inc. 456 Hopkins Ave Washington DC 20090 US 202-111-8763 202-111-1238 smith@icdevgroup.net 20001006 12:12:13 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1
-00013 00013 AhGiHXgR mmichaels upsg (UPS Ground) 1 14.99 5.35 0.94 21.28 Michael Michaels Medical Supplies Co. 123 South Street Austin TX 30987 US 512-111-9876 512-111-1237 michael@icdevgroup.net 20001006 12:12:55 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped consolidated 1
-00014 00014 9bmBpw9j T00003 upsg (UPS Ground) 3 59.97 6.4 0 0 66.37 James Kelos 1414 Woodruff Ave. Idaho Falls ID 83401 US (208) 524- 7202 devnull@icdevgroup.net 20001006 12:20:25 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
-00015 00015 e69CSkSu ladams upsg (UPS Ground) 4 54.96 6.23 0 3.30 64.49 Louis Adams Electronics Inc. 123 California Street Los Angeles CA 78902 US 714-111-1234 714-111-1235 adams@icdevgroup.net 20001006 12:46:50 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
+code store_id order_number session__MVC_FIELDMUNGE__ username shipmode nitems subtotal shipping handling salestax total_cost fname lname company address1 address2 city state zip country phone_day phone_night fax email b_fname b_lname b_company b_address1 b_address2 b_city b_state b_zip b_country b_phone order_date order_ymd order_wday payment_method po_number avs order_id auth_code update_date status tracking_number affiliate campaign parent archived deleted complete comments currency_locale
+00001 00001 AhGiHXgR T00001 upsg (UPS Ground) 1 19.99 5.73 0 0 25.72 Ueber Mensch 16 Hauptstrasse Portland OR 97201 US 503-555-1212 devnull@icdevgroup.net 20001006 11:35:39 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1 0 0
+00002 00002 AhGiHXgR ckirk upsg (UPS Ground) 27 641.73 15.06 0 41.71 698.5 Charles Kirk Auto Exchange Express 123 Exchange Dr. Seattle WA 34987 US 360-111-1234 360-111-1244 kirk@icdevgroup.net 20001006 11:37:01 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ backorder 0
+00003 00003 AhGiHXgR jking upsg (UPS Ground) 150 1948.5 61.01 0 116.91 2126.42 John King Car Parts, Inc. 123 Auto Blvd. Miami FL 39807 US 305-111-1234 305-111-1239 king@icdevgroup.net 20001006 11:39:36 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1 0 0
+00004 00004 AhGiHXgR ladams upsg (UPS Ground) 27 257.89 11.13 0 15.47 284.49 Louis Adams Electronics Inc. 123 California Street Los Angeles CA 78902 US 714-111-1234 714-111-1235 adams@icdevgroup.net 20001006 11:40:39 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ credit 0
+00005 00005 AhGiHXgR lriley upsg (UPS Ground) 17 164.83 6.9 6.59 178.32 Larry Riley Computerz Inc. 123 Monitor Rd. New York NY 46890 US 518-111-1234 518-111-1242 riley@icdevgroup.net 20001006 11:42:01 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ partial hardhat
+00006 00006 AhGiHXgR T00002 upsr (UPS Next Day) 1 29.99 0 0 0 29.99 Bobby Bodega Computerz Inc. 9500 W. Covina Valdez AK 99686 US 907-111-1234 milton@icdevgroup.net 20001006 11:44:34 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
+00007 00007 AhGiHXgR mcarter upsg (UPS Ground) 2 89.98 9.84 0 4.50 104.32 Michele Carter Spare Parts, Inc. 123 Parts Ctr Blvd. Annapolis MD 32498 US 301-111-1234 703-111-1241 carter@icdevgroup.net 20001006 12:07:52 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1 0 0
+00008 00008 AhGiHXgR mkeller upsg (UPS Ground) 3 53.97 5.17 0 0 59.14 Michael Keller InfoMed, Inc. 123 Oak St. Portland OR 45098 US 541-111-1234 541-111-1240 keller@icdevgroup.net 20001006 12:08:36 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
+00009 00009 AhGiHXgR mmichaels upsg (UPS Ground) 100 100 0 0 6.3 106.3 Michael Michaels Medical Supplies Co. 123 South Street Austin TX 30987 US 512-111-9876 512-111-1237 michael@icdevgroup.net 20001006 12:09:48 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 0 0 0
+00010 00010 AhGiHXgR tlucas upsg (UPS Ground) 5 57.95 6.43 0 2.90 67.28 Thomas Lucas Construct Buildings Inc. 123 Building Dr. Phoenix AZ 56987 US 520-111-1234 520-111-1245 lucas@icdevgroup.net 20001006 12:10:47 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ canceled 0
+00011 00011 AhGiHXgR jrollins upsg (UPS Ground) 1 44.99 6.87 0 1.57 53.43 Joseph Rollins Expert Repair, Inc. 123 Area Rd. Richmond VA 22398 US 804-111-1234 804-111-1243 Rollins@icdevgroup.net 20001006 12:11:34 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
+00012 00012 AhGiHXgR ssmith upsg (UPS Ground) 1 18.99 5.61 24.6 Steve Smith Pharm Supplies, Inc. 456 Hopkins Ave Washington DC 20090 US 202-111-8763 202-111-1238 smith@icdevgroup.net 20001006 12:12:13 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped 1
+00013 00013 AhGiHXgR mmichaels upsg (UPS Ground) 1 14.99 5.35 0.94 21.28 Michael Michaels Medical Supplies Co. 123 South Street Austin TX 30987 US 512-111-9876 512-111-1237 michael@icdevgroup.net 20001006 12:12:55 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ shipped consolidated 1
+00014 00014 9bmBpw9j T00003 upsg (UPS Ground) 3 59.97 6.4 0 0 66.37 James Kelos 1414 Woodruff Ave. Idaho Falls ID 83401 US (208) 524- 7202 devnull@icdevgroup.net 20001006 12:20:25 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
+00015 00015 e69CSkSu ladams upsg (UPS Ground) 4 54.96 6.23 0 3.30 64.49 Louis Adams Electronics Inc. 123 California Street Los Angeles CA 78902 US 714-111-1234 714-111-1235 adams@icdevgroup.net 20001006 12:46:50 20001006 5 Credit Card (visa) __MVC_SQLUDATE__ pending 0 0 0
View
7 dist/interchange.cfg.dist
@@ -27,6 +27,13 @@ Variable TRAFFIC low
#========================================================================#
+# Require an external module
+
+# This one tests the realtime payment gateway code, uncomment to test.
+## Require module Vend::Payment::TestPayment
+
+#========================================================================#
+
# Disable old C-style meta-directives like #ifdef, #endif, and #include.
ConfigParseComments No
View
4 dist/lib/UI/pages/admin/db_metaconfig.html
@@ -174,7 +174,7 @@
'extended.widget_cell_class' => 'Widget cell class (standard row)',
'extended.help_cell_class' => 'Help cell class (standard row)',
'extended.bottom_buttons' => 'Buttons only on bottom',
- 'extended.top_buttons' => 'Buttons only on top',
+ 'extended.top_buttons' => 'Buttons only on top',
}`
@@ -279,4 +279,4 @@
]
@_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ -->
+<!-- page: @@MV_PAGE@@ version: $Id: db_metaconfig.html,v 2.8 2002-10-17 04:46:23 mheins Exp $ -->
View
5 dist/lib/UI/pages/admin/item.html
@@ -51,6 +51,7 @@
[perl tables="[cgi mv_data_table] [scratch extra_tables] __UI_META_TABLE__"]
delete $Scratch->{ui_location};
+ my $dest = $CGI->{ui_sequence_destination} || '__UI_BASE__/item_edit';
if($CGI->{ui_sequence_edit}) {
my $doit;
if($CGI->{item_id_left} =~ s/^(.*?),//) {
@@ -69,7 +70,7 @@
return unless $doit;
$Scratch->{ui_location}
= $Tag->area( {
- href => '__UI_BASE__/item_edit',
+ href => $dest,
form => qq{
item_id=$CGI->{item_id}
item_id_left=$CGI->{item_id_left}
@@ -570,4 +571,4 @@
<!-- ----- END REAL STUFF ----- -->
@_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ Revision: $Id: item.html,v 2.12 2002-10-11 18:42:47 mheins Exp $ -->
+<!-- page: @@MV_PAGE@@ Revision: $Id: item.html,v 2.13 2002-10-17 04:46:23 mheins Exp $ -->
View
111 dist/lib/UI/pages/admin/order.html
@@ -41,6 +41,11 @@
@_UI_STD_HEAD_@
+[comment]
+<!-- sequence_edit: [cgi ui_sequence_edit] -->
+<!-- item_id_left: [cgi item_id_left] -->
+[/comment]
+
[value name=mv_data_table set=transactions hide=1]
[if-mm !tables]
[set ui_error]
@@ -53,6 +58,42 @@
[include include/order_delete_archive]
+[perl tables="[cgi mv_data_table] [scratch extra_tables] __UI_META_TABLE__"]
+ delete $Scratch->{ui_location};
+ my $dest = $CGI->{ui_sequence_destination} || '__UI_BASE__/order_status';
+ if($CGI->{ui_sequence_edit}) {
+ my $doit;
+ $CGI->{item_id_left} =~ s/-_NULL_-/\0/g;
+ $CGI->{item_id_left} =~ s/\0+/,/g;
+ $CGI->{item_id_left} =~ s/,+/,/g;
+ if($CGI->{item_id_left} =~ s/^(.*?),//) {
+ $CGI->{item_id} = $1;
+ $doit = 1;
+ }
+ elsif ($CGI->{item_id_left}) {
+ $CGI->{item_id} = delete $CGI->{item_id_left};
+ delete $CGI->{ui_sequence_edit};
+ $doit = 1;
+ }
+ else {
+ delete $CGI->{item_id};
+ delete $CGI->{ui_sequence_edit};
+ }
+ return unless $doit;
+ $Scratch->{ui_location}
+ = $Tag->area( {
+ href => $dest,
+ form => qq{
+ item_id=$CGI->{item_id}
+ item_id_left=$CGI->{item_id_left}
+ ui_sequence_edit=$CGI->{ui_sequence_edit}
+ },
+ });
+ return;
+ }
+
+[/perl]
+
[calc]
if ($CGI->{mv_like_spec}) {
my @f = split /\0/, $CGI->{mv_like_field};
@@ -289,13 +330,79 @@
`]
[scratch archive_nm]order=1[/button]
-<p>
+&nbsp;&nbsp;&nbsp;[button form=batch src="__UI_IMG__icon_merch.gif"
+ link-text-too=1
+ text="Ship checked orders"
+ ]
+ui_sequence_edit=[calc]
+ $CGI->{item_id} = delete $CGI->{order};
+ $CGI->{item_id_left} = $CGI->{item_id};
+ $CGI->{item_id_left} =~ s/\0+/,/g;
+ if($CGI->{item_id_left} =~ s/^(.*?),//) {
+ $CGI->{item_id} = $1;
+ return 1;
+ }
+ else {
+ delete $CGI->{item_id_left};
+ return '';
+ }
+[/calc]
+mv_nextpage=__UI_BASE__/order_status
+[/button]
+
+&nbsp;
+&nbsp;
+&nbsp;
+&nbsp;
+<table>
+ <tr>
+ <td>
+
<A HREF="javascript:checkAll(document.batch, 'order', 0)"><img src="__UI_IMG__box_checked.gif" border=0>Check all</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<A HREF="javascript:checkAll(document.batch, 'order', 1)"><img src="__UI_IMG__box_empty.gif" border=0>Uncheck all</A>
+
+ </td>
+
+[if scratch old_browser]
+ <td>
+<input type=checkbox name=ship_auto value=1> <span title="Ship all lines of all orders, archive[if variable SETTLE_TRANSACTION], settle[/if]">Ship all automatically</span>
+ </td>
+[else]
+ <td>
+<script>
+ function div_vis (show) {
+ var el = document.getElementById('ship_auto_help');
+ el.style.display = show ? 'block' : 'none';
+ }
+</script>
+ <span onMouseOver="div_vis(1)" onMouseOut="div_vis(0)">
+ <input type=checkbox name=ship_auto value=1> Ship all automatically
+ &nbsp;
+ &nbsp;
+ </span>
+ </td>
+ <td height=50>
+ <div
+ id=ship_auto_help
+ style="
+ display: none;
+ border: 2px solid black;
+ padding: 5px;
+ ">
+ Ship all lines of all orders,<br>
+ archive[if variable SETTLE_TRANSACTION], settle[/if]
+ </div>
+ </td>
+
+[/else]
+[/if]
+
+ </tr>
+</table>
</FORM>
[/search-region]
<!-- ----- END REAL STUFF ----- -->
@_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ -->
+<!-- page: @@MV_PAGE@@ version: $Id: order.html,v 2.9 2002-10-17 04:46:23 mheins Exp $ -->
View
468 dist/lib/UI/pages/admin/order_status.html
@@ -1,100 +1,53 @@
-[if !cgi order]
- [bounce page="__UI_BASE__/order"]
-[/if]
-
[calc]
$Values->{ui_data_fields} = $CGI->{ui_data_fields} = 'status archive delete';
$CGI->{mv_data_table} = 'transactions';
- $CGI->{item_id} = $CGI->{order};
- return;
-[/calc]
-
-[comment]BEGIN former UI_STD_DBEDIT_HEAD[/comment]
-
-[if cgi mv_data_table]
-[value name=mv_data_table set="[cgi mv_data_table]" hide=1]
-[else]
-[value name=mv_data_table set="[calc]$Config->{ProductFiles}[0][/calc]" hide=1]
-[/else]
-[/if]
-
-[if-mm !tables]
- [calc]
- delete $Scratch->{no_bounce};
- my $tmp = delete $Scratch->{ui_override_table};
- if($tmp eq $Values->{mv_data_table}) {
- $Scratch->{no_bounce} = 1;
+ $CGI->{item_id} ||= $CGI->{order};
+
+ $Tag->tmp('hidden');
+ my $hidden;
+ if($CGI->{ui_sequence_edit}) {
+ $Scratch->{mv_nextpage} = "__UI_BASE__/order";
+ $hidden = {
+ item_id_left => $CGI->{item_id_left},
+ ui_sequence_edit => $CGI->{ui_sequence_edit},
}
- return;
- [/calc]
- [if scratch no_bounce]
- [set no_bounce][/set]
- [else]
- [seti ui_error][msg arg.0="[value mv_data_table]"]Not authorized for table %s.[/msg][/seti]
- [bounce page="__UI_BASE__/error"]
- [/else]
- [/if]
-[/if-mm]
-
-[if-mm function=keys name="[cgi item_id]"]
-[else][bounce href="[area admin/special/key_violation]"][/else]
-[/if-mm]
-
-[perl tables="[value mv_data_table] __UI_META_TABLE__"]
-my $table = $Values->{mv_data_table};
-my $db = $Db{$table};
-my $mdb = $Db{__UI_META_TABLE__};
-if(! $db) {
- $Scratch->{ui_error} = errmsg("Bad table '%s'", $table);
- $Tag->bounce( { page => '__UI_BASE__/error' } );
-}
-
-$Values->{ui_data_key_name} = $db->config('KEY');
-
-###############################################################
-# Get the field display information including breaks and labels
-###############################################################
-if( $mdb
- and ! $CGI->{ui_data_fields}
- and ! $CGI->{ui_data_fields_all}
- and $mdb->record_exists($table)
- )
-{
- $CGI->{ui_data_fields} = $mdb->field($table, 'options');
- $CGI->{ui_data_fields} =~ s/\r\n/\n/g;
- $CGI->{ui_data_fields} =~ s/\r/\n/g;
- if($CGI->{ui_data_fields} =~ /\n\n/) {
- my @breaks;
- my @break_labels;
- while ($CGI->{ui_data_fields} =~ s/\n+(?:\n=(.*)\n)?\n+(\w+)/\n$2/) {
- push @breaks, $2;
- push @break_labels, "$2=$1" if $1;
- }
- $CGI->{ui_break_before} = join " ", @breaks;
- $CGI->{ui_break_before_label} = join ",", @break_labels;
}
- $CGI->{ui_data_fields} =~ s/^\s+//;
- $CGI->{ui_data_fields} =~ s/\s+$//;
-}
-
-$Values->{ui_data_fields} =
- $CGI->{ui_data_fields} ||
- $CGI->{mv_data_fields} ||
- $Values->{"$table:ui_data_fields"} ||
- (join " ", $db->columns());
-#Log("data fields: '$Values->{ui_data_fields}' cgi='$CGI->{ui_data_fields}'");
-$Values->{ui_data_fields} =~ s/[,\0\s]+/ /g;
-###############################################################
-
-my @cols = split /[,\0\s]/, $Values->{ui_data_fields};
-@cols = grep /:/ || $db->column_exists($_), @cols;
+ else {
+ $CGI->{ui_sequence_destination} ||= '__UI_BASE__/order';
+ $Scratch->{mv_nextpage} = $CGI->{ui_sequence_destination};
+ $hidden = { };
+ }
+ $hidden->{ui_sequence_destination} = q{@@MV_PAGE@@};
+ $Scratch->{hidden} = $hidden;
+ $CGI->{order} = $CGI->{item_id};
+ return;
+[/calc]
-$Values->{ui_data_fields} = $CGI->{ui_data_fields} = join " ", @cols;
-return;
+[if cgi ship_auto]
+[calc]
+ my $orders = join ",", delete $CGI->{item_id}, delete $CGI->{item_id_left};
+ $orders =~ s/-_NULL_-/\0/g;
+ $orders =~ s/\0+/,/g;
+ $orders =~ s/,+/,/g;
+ delete $CGI->{order};
+ $Scratch->{order_list} = $orders;
+[/calc]
+[loop list="[scratch order_list]"]
+ [update-order-status
+ order_number="[loop-code]"
+ ship_all=1
+ [if-loop-data transactions order_id]
+ settle_transaction="__SETTLE_TRANSACTION__"
+ [/if-loop-data]
+ archive=1]
+[/loop]
+
-[/perl]
-[comment]END former UI_STD_DBEDIT_HEAD[/comment]
+[/if]
+[if !cgi order]
+ [bounce page="__UI_BASE__/order"]
+[/if]
[set ui_class]Orders[/set]
[seti page_title][L]Order status[/L] -- [cgi order][/seti]
@@ -104,284 +57,81 @@
@_UI_STD_HEAD_@
-[tmp order_lines_tmp][loop search="
- fi=orderline
- st=db
- sf=order_number
- se=[cgi order]
- ml=1000
- "][loop-code] [/loop][/tmp]
-
-<FORM METHOD=POST ACTION="[area ui]" NAME=transactions>
-<INPUT TYPE=hidden NAME=mv_doit VALUE="set">
-<INPUT TYPE=hidden NAME=mv_click VALUE="process_filter">
-<INPUT TYPE=hidden NAME=mv_nextpage VALUE="__UI_BASE__/order_view">
-<INPUT TYPE=hidden NAME=code VALUE="[cgi order]">
-<INPUT TYPE=hidden NAME=mv_data_table VALUE="[value mv_data_table]">
-<INPUT TYPE=hidden NAME=ui_meta_specific VALUE="[cgi ui_meta_specific]">
-<INPUT TYPE=hidden NAME=mv_data_key VALUE="[value ui_data_key_name]">
-<INPUT TYPE=hidden NAME=mv_update_empty VALUE="1">
-<INPUT TYPE=hidden NAME=mv_data_fields VALUE="code status archived deleted">
-<table width="95%"><tr><td class=rborder>
-<table width="100%"><tr><td class=rnorm>
-<table CELLSPACING=0 CELLMARGIN=0 WIDTH="100%">
-[loop list="[cgi order]"]
-<TR>
-<TD ALIGN=RIGHT class=rmarq>[L]Order date[/L]</TD>
-<TD class=rnorm>
-[convert-date][loop-data transactions order_date][/convert-date]</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT class=rmarq>[L]Status last updated[/L]</TD>
-<TD class=rnorm>
-[convert-date][loop-data transactions update_date][/convert-date]</TD>
-</TR>
-[loop prefix=row list="status deleted archived"]
-[display table=transactions column="[row-code]" key="[loop-code]" applylocale=1
- template=|
-<TR class=rnorm>
-<TD ALIGN=right class=rmarq>
- $LABEL$
-</TD>
-<TD VALIGN=TOP class=rnorm>
- <TABLE CELLSPACING=0 CELLMARGIN=0><TR><TD>$WIDGET$</TD><TD><I>$HELP$</I>{HELPURL}<BR><A HREF="$HELP_URL$">help</A>{/HELPURL}</TD></TR></TABLE>
-</TD>
-</TR>
-|]
-[/loop]
-<TR>
-<TD ALIGN=RIGHT class=rmarq>&nbsp;</TD>
-<TD class=rnorm>
-[if-mm advanced order]
- [button form=transactions bold=1 text="[L]Ship checked order lines, send email to customer if appropriate[/L]"]
+[tmp form_include]
+<tr class=rnorm>
+<td class=clabel align=center style="font-size: larger">
+ Actions
+</td>
+<td class=cdata>
+ <div
+ style="
+ border: 2px solid black;
+ padding: 8px;
+ ">
+ <select name=ship_all>
+ <option value=1> Ship all lines
+ <option value=0> Ship per status above
+ </select>
+
+ [button form=tform bold=1 text="[L]Ship the order[/L]"]
mv_todo=back
order=[cgi code]
[tag flag write]orderline transactions[/tag]
- [perl tables="orderline transactions userdb __UI_META_TABLE__"]
- my $odb = $Db{orderline}
- or die "No orderline database!\n";
- my $tdb = $Db{transactions}
- or die "No transactions database!\n";
- my $udb = $Db{userdb}
- or die "No userdb database!\n";
-
- my $on = $Scratch->{ship_notice_order_number} = $CGI->{code};
- my $user = $tdb->field($on, 'username');
- my $wants_copy = $udb->field($user, 'email_copy');
-#Log("Order number=$on username=$user wants=$wants_copy");
- delete $Scratch->{ship_notice_username};
- delete $Scratch->{ship_notice_email};
- if($wants_copy) {
- $Scratch->{ship_notice_username} = $user;
- $Scratch->{ship_notice_email} = $udb->field($user, 'email')
- or delete $Scratch->{ship_notice_username};
- }
-
- if($CGI->{status} =~ /\d\d\d\d/) {
- $tdb->set_field($on, 'status', $CGI->{status});
- }
- else {
- $tdb->set_field($on, 'status', 'shipped');
- }
-
- my @shiplines = grep /\S/, split /\0/, $CGI->{lines_shipped};
- my $to_ship = scalar @shiplines;
-
- my $count_q = "select * from orderline where order_number = '$on'";
- my $lines_ary = $odb->query($count_q);
- if(! $lines_ary) {
- $Scratch->{ui_message} = "No order lines for order $on";
- return;
- }
- my $total_lines = scalar @$lines_ary;
-
- my $odb_keypos = $odb->config('KEY_INDEX');
-
- # See if some items have already shipped
- my %already;
- for(@$lines_ary) {
- my $code = $_->[$odb_keypos];
- my $status = $odb->field($code, 'status');
- if($status eq 'shipped') {
- $already{$code} = $code;
- }
- }
-
- my $ship_mesg;
- my $g_status;
- my %shipping;
-
- @shipping = grep ! $already{$_}, @shipping;
- @shipping{@shiplines} = @shiplines;
-
- if($total_lines == $to_ship) {
- $ship_mesg = "Order $on complete, $total_lines lines set shipped.";
- $Scratch->{ship_notice_complete} = $ship_mesg;
- $g_status = 'shipped';
- }
- else {
- $ship_mesg = "Order $on partially shipped ($to_ship of $total_lines lines).";
- delete $Scratch->{ship_notice_complete};
- $g_status = 'partial';
- }
-
- my $minor_mesg = '';
-
- my $email_mesg = $Scratch->{ship_notice_username}
- ? "Email copy sent to $Scratch->{ship_notice_email}."
- : "No email copy sent as per user preference.";
-
- # Actually update the orderline database
- for(@$lines_ary) {
- my $code = $_->[$odb_keypos];
- next if $already{$code};
- my $status = $shipping{$code} ? 'shipped' : 'backorder';
- $odb->set_field($code, 'status', $status)
- or do {
- $Scratch->{ui_message} = "Orderline $code ship status update failed.";
- return;
- };
-
- }
-
- for(keys %already) {
- $shipping{$_} = $_;
- }
-
- my $total_shipped_now = scalar keys %shipping;
-
-
- delete $Scratch->{ship_now_complete};
- if (
- $total_lines != scalar @shipping
- and
- $total_shipped_now == $total_lines
- )
- {
- $g_status = 'shipped';
- $Scratch->{ship_now_complete} = 1
- if $total_shipped_now == $total_lines;
- $ship_mesg = "Order $on now complete (all $total_lines lines).";
- }
-
- $tdb->set_field($on, 'status', $g_status);
-
- $Scratch->{ui_message} = "$ship_mesg $email_mesg";
- delete $Scratch->{ship_notice_username};
- delete $Scratch->{ship_notice_email};
- if($wants_copy) {
- $Scratch->{ship_notice_username} = $user;
- $Scratch->{ship_notice_email} = $tdb->field($on, 'email')
- or $Scratch->{ship_notice_email} = $tdb->field($on, 'email')
- or delete $Scratch->{ship_notice_username};
- }
- return;
- [/perl]
-
+ [update-order-status order-number="[cgi code]"]
[if scratch ship_notice_username]
[email-raw][include etc/ship_notice][/email-raw]
[/if]
- [/button] <BR>
-
- [loop prefix=partial list="[scratch order_lines_tmp]"]
- <INPUT TYPE=checkbox NAME=lines_shipped VALUE="[partial-code]" CHECKED> Line [partial-increment] ([partial-filter 16][partial-data orderline description][/partial-filter])<BR>
- [/loop]
- <BR>
- [button bold=1 text="[L]Change global status[/L]"]
- order=[cgi code]
- [/button]&nbsp;&nbsp;&nbsp;
- [button text="[L]Cancel[/L]"]
- mv_nextpage=__UI_BASE__/order_view
- order=[cgi code]
- mv_todo=back
- [set Cancel][/set]
- [/button]
-[else]
- [button text="[L]Back[/L]"]
- mv_nextpage=__UI_BASE__/order_view
- order=[cgi code]
- mv_todo=back
[/button]
-[/else]
-[/if-mm]
-</TD>
-</table>
-</td></tr></table>
-</td></tr></table>
-</FORM>
-
-[/loop]
-
-<h2>[L]Individual line item status[/L]</H2>
-<TABLE>
-[loop search="
- fi=orderline
- st=db
- sf=order_number
- se=[cgi order]
- ml=1000
- tf=code
-"]
-[calc]
- $Values->{ui_data_fields} = $CGI->{ui_data_fields} = 'code status delete';
- $CGI->{mv_data_table} = 'transactions';
- $CGI->{item_id} = $CGI->{order};
- return;
-[/calc]
-
-<TR><TD>
-<FORM METHOD=POST ACTION="[area ui]" NAME="orderline[loop-increment]">
-<INPUT TYPE=hidden NAME=mv_doit VALUE="set">
-<INPUT TYPE=hidden NAME=mv_click VALUE="process_filter">
-<INPUT TYPE=hidden NAME=mv_nextpage VALUE="@@MV_PAGE@@">
-<INPUT TYPE=hidden NAME=code VALUE="[loop-code]">
-<INPUT TYPE=hidden NAME=order VALUE="[cgi order]">
-<INPUT TYPE=hidden NAME=mv_data_table VALUE="orderline">
-<INPUT TYPE=hidden NAME=ui_meta_specific VALUE="[cgi ui_meta_specific]">
-<INPUT TYPE=hidden NAME=mv_data_key VALUE="code">
-<INPUT TYPE=hidden NAME=mv_update_empty VALUE="1">
-<INPUT TYPE=hidden NAME=mv_data_fields VALUE="code status">
-<table width="95%"><tr><td class=rborder>
-<table width="100%"><tr><td>
-<table CELLSPACING=0 CELLMARGIN=0 WIDTH="100%">
-<TR>
-<TD ALIGN=RIGHT class=rmarq>[L]SKU[/L]/[L]Description[/L]</TD>
-<TD class=rnorm>
-[L]SKU[/L]: [loop-data orderline sku], [loop-data orderline quantity]@[filter %.2f][loop-data orderline price][/filter] = [currency][loop-data orderline subtotal][/currency]<BR>
-[loop-data orderline description]
-</TD>
-</TR>
-<TR>
-<TD ALIGN=RIGHT class=rmarq>[L]Last updated[/L]</TD>
-<TD class=rnorm>
-[convert-date][loop-data orderline update_date][/convert-date]</TD>
-</TR>
-[display table=orderline column="status" key="[loop-code]"
- template=|
-<TR class=rnorm>
-<TD ALIGN=right class=rmarq>
- $LABEL$
-</TD>
-<TD VALIGN=TOP>
- <TABLE CELLSPACING=0 CELLMARGIN=0><TR><TD>$WIDGET$</TD><TD><I>$HELP$</I>{HELPURL}<BR><A HREF="$HELP_URL$">help</A>{/HELPURL}</TD></TR></TABLE>
-</TD>
-</TR>
-|]
-<TR>
-<TD ALIGN=RIGHT class=rmarq>&nbsp;</TD>
-<TD class=rnorm>
-<INPUT TYPE=submit VALUE="[msg arg.0="[loop-increment]"]Update status of line %s[/msg]">
-</TD>
-</table>
-</td></tr></table>
-</td></tr></table>
-</FORM>
-
-</TD></TR>
-[/loop]
-</TABLE>
+ Email
+ <select name=send_email>
+ <option value="">[L]Use customer preference[/L]</option>
+ <option value="0">[L]No[/L]</option>
+ <option value="1">[L]Yes[/L]</option>
+ </select>
+
+ [if variable SETTLE_TRANSACTION]
+ <br>
+ [if type=data term="transactions::order_id::[cgi order]"]
+ <input type=checkbox name=settle_transaction value=1 CHECKED> <b>Settle transaction </b>
+ [/if]
+ [/if]
+ </div>
+</td>
+</tr>
+[/tmp]
+
+[table-editor
+ table=transactions
+ key="[cgi order]"
+ form-name=tform
+ table-width="100%"
+ no-table-meta=1
+ mv-nextpage="[scratch mv_nextpage]"
+ ui_data_fields="code status tracking_number order_id auth_code archived deleted"
+ include-form="[scratch form_include]"
+ include-before="order_id"
+ help.order_id="* = settled"
+ link-table=orderline
+ link-key=order_number
+ link-before=order_id
+ link-no-blank=1
+ link-label="Ordered Items"
+ hidden=`$Scratch->{hidden}`
+/]
+
+<script>
+ var f = document.tform;
+ if(f != undefined) {
+ var str = f.order_id.value;
+// alert("in check, str=" + str);
+ if(str.match(/\*$/) ) {
+ f.settle_transaction.checked = false;
+// alert("set checked status!");
+ }
+ }
+</script>
@_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ -->
+<!-- page: @@MV_PAGE@@ version: $Id: order_status.html,v 2.6 2002-10-17 04:46:23 mheins Exp $ -->
View
7 lib/Vend/Order.pm
@@ -1,6 +1,6 @@
# Vend::Order - Interchange order routing routines
#
-# $Id: Order.pm,v 2.33 2002-09-18 19:07:08 mheins Exp $
+# $Id: Order.pm,v 2.34 2002-10-17 04:46:24 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -28,7 +28,7 @@
package Vend::Order;
require Exporter;
-$VERSION = substr(q$Revision: 2.33 $, 10);
+$VERSION = substr(q$Revision: 2.34 $, 10);
@ISA = qw(Exporter);
@@ -830,6 +830,9 @@ sub pgp_encrypt {
if("\L$cmd" eq 'none') {
return ::errmsg("NEED ENCRYPTION ENABLED.");
}
+ elsif(! $key) {
+ return ::errmsg("NEED ENCRYPTION KEY POINTER.");
+ }
elsif($cmd =~ m{^(?:/\S+/)?\bgpg$}) {
$cmd .= " --batch --always-trust -e -a -r '%s'";
}
View
9 lib/Vend/Payment.pm
@@ -1,6 +1,6 @@
# Vend::Payment - Interchange payment processing routines
#
-# $Id: Payment.pm,v 2.6 2002-07-24 18:54:09 mheins Exp $
+# $Id: Payment.pm,v 2.7 2002-10-17 04:46:24 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -22,7 +22,7 @@
package Vend::Payment;
require Exporter;
-$VERSION = substr(q$Revision: 2.6 $, 10);
+$VERSION = substr(q$Revision: 2.7 $, 10);
@ISA = qw(Exporter);
@@ -468,13 +468,10 @@ sub charge {
$Vend::Session->{payment_id} = $result{'order-id'};
my $encrypt = charge_param('encrypt');
- $encrypt = 1 unless defined $encrypt;
- if($encrypt) {
+ if($encrypt and $CGI::values{mv_credit_card_number} and $Vend::Cfg->{EncryptKey}) {
my $prog = charge_param('encrypt_program') || $Vend::Cfg->{EncryptProgram};
if($prog =~ /pgp|gpg/) {
- local($Vend::Cfg->{Encrypt_program});
- $Vend::Cfg->{Encrypt_program} = $prog;
$CGI::values{mv_credit_card_force} = 1;
(
undef,
View
22 lib/Vend/Payment/AuthorizeNet.pm
@@ -1,6 +1,6 @@
# Vend::Payment::AuthorizeNet - Interchange AuthorizeNet support
#
-# $Id: AuthorizeNet.pm,v 2.5 2002-06-17 22:24:11 jon Exp $
+# $Id: AuthorizeNet.pm,v 2.6 2002-10-17 04:46:24 mheins Exp $
#
# Copyright (C) 1999-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -38,7 +38,7 @@ package Vend::Payment::AuthorizeNet;
=head1 Interchange AuthorizeNet Support
-Vend::Payment::AuthorizeNet $Revision: 2.5 $
+Vend::Payment::AuthorizeNet $Revision: 2.6 $
=head1 SYNOPSIS
@@ -316,6 +316,18 @@ sub authorizenet {
my $referer = $opt->{referer}
|| charge_param('referer');
+ my @override = qw/
+ order_id
+ auth_code
+ mv_credit_card_exp_month
+ mv_credit_card_exp_year
+ mv_credit_card_number
+ /;
+ for(@override) {
+ next unless defined $opt->{$_};
+ $actual->{$_} = $opt->{$_};
+ }
+
## Authorizenet does things a bit different, ensure we are OK
$actual->{mv_credit_card_exp_month} =~ s/\D//g;
$actual->{mv_credit_card_exp_month} =~ s/^0+//;
@@ -344,12 +356,12 @@ sub authorizenet {
mauthcapture => 'AUTH_CAPTURE',
mauthonly => 'AUTH_ONLY',
return => 'CREDIT',
- reverse => 'PRIOR_AUTH_CAPTURE',
+ settle_prior => 'PRIOR_AUTH_CAPTURE',
sale => 'AUTH_CAPTURE',
settle => 'CAPTURE_ONLY',
void => 'VOID',
);
-
+
if (defined $type_map{$transtype}) {
$transtype = $type_map{$transtype};
}
@@ -363,6 +375,7 @@ sub authorizenet {
$order_id = gen_order_id($opt);
+#::logDebug("auth_code=$actual->{auth_code} order_id=$opt->{order_id}");
my %query = (
x_Test_Request => $opt->{test} || charge_param('test'),
x_Card_Num => $actual->{mv_credit_card_number},
@@ -470,6 +483,7 @@ sub authorizenet {
$result{MErrMsg} = errmsg($msg, $result{x_response_reason_text});
}
}
+#::logDebug(qq{authorizenet result=} . uneval(\%result));
return (%result);
}
View
102 lib/Vend/Payment/TestPayment.pm
@@ -1,6 +1,6 @@
# Vend::Payment::TestPayment - Interchange payment test module
#
-# $Id: TestPayment.pm,v 1.1 2002-09-08 15:40:07 kwalsh Exp $
+# $Id: TestPayment.pm,v 1.2 2002-10-17 04:46:24 mheins Exp $
#
# Copyright (C) 2002 Cursor Software Limited.
# All Rights Reserved.
@@ -27,7 +27,7 @@ package Vend::Payment::TestPayment;
=head1 Interchange payment test module
-Vend::Payment::TestPayment $Revision: 1.1 $
+Vend::Payment::TestPayment $Revision: 1.2 $
=head1 SYNOPSIS
@@ -190,7 +190,7 @@ BEGIN {
unless $Vend::Quiet;
}
-$VERSION = substr(q$Revision: 1.1 $,10);
+$VERSION = substr(q$Revision: 1.2 $,10);
package Vend::Payment;
@@ -199,17 +199,17 @@ sub testpayment {
my $opt;
if (ref $user){
- $opt = $user;
- $user = $opt->{id} || undef;
- $secret = $opt->{secret} || undef;
+ $opt = $user;
+ $user = $opt->{id} || undef;
+ $secret = $opt->{secret} || undef;
}
else{
- $opt = {};
+ $opt = {};
}
my $actual;
if ($opt->{actual}){
- $actual = $opt->{actual};
+ $actual = $opt->{actual};
}
else{
my (%actual) = map_actual();
@@ -228,6 +228,19 @@ sub testpayment {
my $precision = $opt->{precision} || 2;
+ my @override = qw/
+ order_id
+ auth_code
+ mv_credit_card_exp_month
+ mv_credit_card_exp_year
+ mv_credit_card_number
+ /;
+ for(@override) {
+ next unless defined $opt->{$_};
+ $actual->{$_} = $opt->{$_};
+ }
+
+
$actual->{mv_credit_card_exp_month} =~ s/\D//g;
$actual->{mv_credit_card_exp_year} =~ s/\D//g;
$actual->{mv_credit_card_number} =~ s/\D//g;
@@ -248,25 +261,74 @@ sub testpayment {
$order_id = gen_order_id($opt);
my %result;
-
- if ($actual->{mv_credit_card_number} eq '4111111111111111'){
+
+ my $msg = $opt->{message_declined};
+
+ if($opt->{transaction} =~ /^settle/ ) {
+ $msg ||= 'Settlement failure: %s';
+ if(! $actual->{order_id}) {
+ $result{'pop.status'} = 'failure';
+ $result{'pop.error-message'} = errmsg($msg,'Need order-id');
+ }
+ elsif(! $actual->{auth_code}) {
+ $result{'pop.status'} = 'failure';
+ $result{'pop.error-message'} = errmsg($msg,'Need auth-code');
+ }
+ else {
+ $result{'pop.status'} = 'success';
+ $result{'pop.order-id'} = $opt->{order_id};
+ $result{'pop.auth-code'} = $opt->{auth_code};
+ }
+ }
+ elsif($opt->{transaction} eq 'void' ) {
+ $msg ||= 'Void failure: %s';
+ if(! $opt->{order_id}) {
+ $result{'pop.status'} = 'failure';
+ $result{'pop.error-message'} = errmsg($msg,'Need order-id');
+ }
+ elsif($opt->{auth_code}) {
+ $result{'pop.status'} = 'failure';
+ $result{'pop.error-message'} = errmsg($msg,'Need auth-code');
+ }
+ else {
+ $result{'pop.status'} = 'success';
+ $result{'pop.order-id'} = $opt->{order_id};
+ $result{'pop.auth-code'} = $opt->{auth_code};
+ }
+ }
+ elsif($opt->{transaction} eq 'return' ) {
+ $msg ||= 'Return/credit failure: %s';
+ if(! $opt->{order_id}) {
+ $result{'pop.status'} = 'failure';
+ $result{'pop.error-message'} = errmsg($msg,'Need order-id');
+ }
+ elsif($opt->{auth_code}) {
+ $result{'pop.status'} = 'failure';
+ $result{'pop.error-message'} = errmsg($msg,'Need auth-code');
+ }
+ else {
+ $result{'pop.status'} = 'success';
+ $result{'pop.order-id'} = $opt->{order_id};
+ $result{'pop.auth-code'} = $opt->{auth_code};
+ }
+ }
+ elsif ($actual->{mv_credit_card_number} eq '4111111111111111'){
$result{'pop.status'} = 'success';
- $result{'pop.order-id'} = $opt->{order_id};
- $result{'pop.auth-code'} = 'test_auth_code';
+ $result{'pop.order-id'} = $opt->{order_id};
+ $result{'pop.auth-code'} = 'test_auth_code';
}
elsif ($actual->{mv_credit_card_number} eq '4111111111111129'){
+ $msg ||= 'TestPayment error: %s. Please call in your order or try again.';
$result{'pop.status'} = 'failure';
- my $msg = $opt->{message_declined} ||
- 'TestPayment error: %s. Please call in your order or try again.';
- $result{'pop.error-message'} = errmsg($msg,'Payment declined by the card issuer');
+ $result{'pop.error-message'} =
+ errmsg($msg,'Payment declined by the card issuer');
}
else{
$result{'pop.status'} = 'failure';
- delete $result{'pop.order-id'};
- delete $result{'order-id'};
- my $msg = $opt->{message_declined} ||
- 'TestPayment error: %s. Please call in your order or try again.';
- $result{'pop.error-message'} = errmsg($msg,'Invalid test card number');
+ delete $result{'pop.order-id'};
+ delete $result{'order-id'};
+ $msg ||= 'TestPayment error: %s. Please call in your order or try again.';
+ $result{'pop.error-message'} = errmsg($msg,'Invalid test card number');
}
$result{MStatus} = $result{'pop.status'};
View
39 lib/Vend/Table/Editor.pm
@@ -1,6 +1,6 @@
# Vend::Table::Editor - Swiss-army-knife table editor for Interchange
#
-# $Id: Editor.pm,v 1.13 2002-10-09 14:23:32 mheins Exp $
+# $Id: Editor.pm,v 1.14 2002-10-17 04:46:24 mheins Exp $
#
# Copyright (C) 2002 ICDEVGROUP <interchange@icdevgroup.org>
# Copyright (C) 2002 Mike Heins <mike@perusion.net>
@@ -26,7 +26,7 @@
package Vend::Table::Editor;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.13 $, 10);
+$VERSION = substr(q$Revision: 1.14 $, 10);
use Vend::Util;
use Vend::Interpolate;
@@ -1089,6 +1089,7 @@ sub resolve_options {
link_sort
link_key
link_view
+ link_no_blank
link_template
link_extra
mv_blob_field
@@ -2374,6 +2375,7 @@ EOF
my @lview;
my @llab;
my @ltpl;
+ my @lnb;
my @lbefore;
my @lsort;
my $tcount = 1;
@@ -2384,6 +2386,7 @@ EOF
@lkey = @{$opt->{link_key}};
@llab = @{$opt->{link_label}};
@ltpl = @{$opt->{link_template}};
+ @lnb = @{$opt->{link_no_blank}};
@lbefore = @{$opt->{link_before}};
@lsort = @{$opt->{link_sort}};
}
@@ -2394,6 +2397,7 @@ EOF
@lkey = $opt->{link_key};
@llab = $opt->{link_label};
@ltpl = $opt->{link_template};
+ @lnb = $opt->{link_no_blank};
@lbefore = $opt->{link_before};
@lsort = $opt->{link_sort};
}
@@ -2403,6 +2407,7 @@ EOF
my $lk = shift @lkey;
my $ll = shift @llab;
my $lb = shift @lbefore;
+ my $lnb = shift @lnb;
my $ls = shift @lsort;
my $rcount = 0;
@@ -2464,20 +2469,22 @@ $l_pkey</td>};
push @lout, $Tag->row_edit(\%o);
push @lout, "</tr>";
}
- my %o = (
- table => $lt,
- blank => 1,
- extra => $opt->{link_extra},
- pointer => 999999,
- stacker => $tcount,
- columns => $lf,
- extra => $opt->{link_extra},
- );
- push @lout, qq{<tr><td$lextra>};
- push @lout, qq{<input size=8 name="999999_${l_pkey}__$tcount" value="">};
- push @lout, '</td>';
- push @lout, $Tag->row_edit(\%o);
- push @lout, '</tr>';
+ unless($lnb) {
+ my %o = (
+ table => $lt,
+ blank => 1,
+ extra => $opt->{link_extra},
+ pointer => 999999,
+ stacker => $tcount,
+ columns => $lf,
+ extra => $opt->{link_extra},
+ );
+ push @lout, qq{<tr><td$lextra>};
+ push @lout, qq{<input size=8 name="999999_${l_pkey}__$tcount" value="">};
+ push @lout, '</td>';
+ push @lout, $Tag->row_edit(\%o);
+ push @lout, '</tr>';
+ }
push @lout, "</table>";
$whash->{LABEL} = $ll;
$whash->{WIDGET} = join "", @lout;
View
12 scripts/makecat.PL
@@ -3,7 +3,7 @@
#
# Interchange catalog configurator
#
-# $Id: makecat.PL,v 2.16 2002-08-12 00:34:58 mheins Exp $
+# $Id: makecat.PL,v 2.17 2002-10-17 04:46:24 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -158,6 +158,8 @@ if (scalar @ARGV > 1) {
'imageurl' => \$Conf{imageurl},
'l' => \$Logfile,
'linkmode' => \$Conf{linkmode},
+ 'linkhost' => \$Conf{linkhost},
+ 'linkport' => \$Conf{linkport},
'linkprogram' => \$Conf{linkprogram},
'mailorderto' => \$Conf{mailorderto},
'interchangegroup' => \$Conf{interchangegroup},
@@ -208,6 +210,8 @@ if (scalar @ARGV > 1) {
imageurl=s
l=s
linkmode=s
+ linkhost=s
+ linkport=s
linkprogram=s
mailorderto=s
interchangegroup|minivendgroup|group=s
@@ -1350,7 +1354,7 @@ EOF
my %seen;
sethistory(grep !$seen{$_}++, @ports);
- $default = $defport || 7786;
+ $default = $defport || $Conf{linkport} || 7786;
$lp = $lh = '';
while(! $lp) {
$lp = prompt("TCP socket to use? ", $default);
@@ -1362,7 +1366,7 @@ EOF
}
sethistory(grep !$seen{$_}++, @hosts);
- $default = $defhost || 'localhost';
+ $default = $defhost || $Conf{linkhost} || 'localhost';
while(! $lh) {
$lh = prompt("Link host? ", $default);
redo INETASK if $lh eq '@';
@@ -2273,7 +2277,7 @@ makecat [--options] name
=head1 VERSION
-# $Id: makecat.PL,v 2.16 2002-08-12 00:34:58 mheins Exp $
+# $Id: makecat.PL,v 2.17 2002-10-17 04:46:24 mheins Exp $
=head1 INTRODUCTION
Please sign in to comment.
Something went wrong with that request. Please try again.