Skip to content
Browse files

* 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.
  • Loading branch information...
1 parent 3565eb7 commit 80603f21b09fc5e8944c88a93bd9772ed69be7b4 @perusionmike perusionmike committed Oct 23, 2005
Showing with 15 additions and 3 deletions.
  1. +7 −1 lib/Vend/Data.pm
  2. +8 −2 lib/Vend/Order.pm
View
8 lib/Vend/Data.pm
@@ -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.
@@ -1709,6 +1709,12 @@ sub item_price {
($attr, $table) = split /\s*=\s*/, $table, 2;
}
+ if(! $key and ! $foreign) {
+ $attr ||= $table;
+ $item->{$attr} = item_common($item, $table);
+ next;
+ }
+
unless ($key) {
$key = $table;
$table = $item->{mv_ib};
View
10 lib/Vend/Order.pm
@@ -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);
@@ -2458,6 +2458,12 @@ sub add_items {
($attr, $table) = split /\s*=\s*/, $table, 2;
}
+ if(! $key and ! $foreign) {
+ $attr ||= $table;
+ $item->{$attr} = item_common($item, $table);
+ next;
+ }
+
unless ($key) {
$key = $table;
$table = $item->{mv_ib};

0 comments on commit 80603f2

Please sign in to comment.
Something went wrong with that request. Please try again.