[interchange-cvs] interchange - heins modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sun Oct 23 10:23:46 EDT 2005
User: heins
Date: 2005-10-23 14:23:45 GMT
Modified: lib/Vend Data.pm Order.pm
Log:
* Add logic to have AutoModifier work for matrix items. Only works
for the non-table, non-foreign key call version, i.e.
AutoModifier modifier
or
AutoModifier modifier=field
It will look in the mv_ib first, then the first then second
products file, for both the code and the mv_sku.
This might not be completely what would always be wanted, since
it has the precedence:
mv_ib->code
mv_ib->mv_sku
products->code
products->mv_sku
variants->code
variants->mv_sku
It is important in this case to make sure you have the table set in
the item, as otherwise products->sku will shadow variants->code.
Revision Changes Path
2.54 +7 -1 interchange/lib/Vend/Data.pm
rev 2.54, prev_rev 2.53
Index: Data.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Data.pm,v
retrieving revision 2.53
retrieving revision 2.54
diff -u -r2.53 -r2.54
--- Data.pm 22 Sep 2005 16:37:52 -0000 2.53
+++ Data.pm 23 Oct 2005 14:23:45 -0000 2.54
@@ -1,6 +1,6 @@
# Vend::Data - Interchange databases
#
-# $Id: Data.pm,v 2.53 2005/09/22 16:37:52 mheins Exp $
+# $Id: Data.pm,v 2.54 2005/10/23 14:23:45 mheins Exp $
#
# Copyright (C) 2002-2004 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -1707,6 +1707,12 @@
if($table =~ /=/) {
($attr, $table) = split /\s*=\s*/, $table, 2;
+ }
+
+ if(! $key and ! $foreign) {
+ $attr ||= $table;
+ $item->{$attr} = item_common($item, $table);
+ next;
}
unless ($key) {
2.80 +8 -2 interchange/lib/Vend/Order.pm
rev 2.80, prev_rev 2.79
Index: Order.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Order.pm,v
retrieving revision 2.79
retrieving revision 2.80
diff -u -r2.79 -r2.80
--- Order.pm 14 Oct 2005 14:18:35 -0000 2.79
+++ Order.pm 23 Oct 2005 14:23:45 -0000 2.80
@@ -1,6 +1,6 @@
# Vend::Order - Interchange order routing routines
#
-# $Id: Order.pm,v 2.79 2005/10/14 14:18:35 racke Exp $
+# $Id: Order.pm,v 2.80 2005/10/23 14:23:45 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -29,7 +29,7 @@
package Vend::Order;
require Exporter;
-$VERSION = substr(q$Revision: 2.79 $, 10);
+$VERSION = substr(q$Revision: 2.80 $, 10);
@ISA = qw(Exporter);
@@ -2456,6 +2456,12 @@
if($table =~ /=/) {
($attr, $table) = split /\s*=\s*/, $table, 2;
+ }
+
+ if(! $key and ! $foreign) {
+ $attr ||= $table;
+ $item->{$attr} = item_common($item, $table);
+ next;
}
unless ($key) {
More information about the interchange-cvs
mailing list