[interchange-cvs] interchange - pajamian modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Nov 9 03:17:27 EST 2007
User: pajamian
Date: 2007-11-09 08:17:27 GMT
Modified: . WHATSNEW-5.5
Modified: lib/Vend/Options Matrix.pm
Log:
* Allow the default display_type for Matrix widgets to be set from catalog.cfg
as follows:
Options Matrix display_type separate
* Clean up and simplify code a bit.
Revision Changes Path
1.71 +5 -0 interchange/WHATSNEW-5.5
rev 1.71, prev_rev 1.70
Index: WHATSNEW-5.5
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.5,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- WHATSNEW-5.5 9 Nov 2007 03:27:57 -0000 1.70
+++ WHATSNEW-5.5 9 Nov 2007 08:17:26 -0000 1.71
@@ -56,6 +56,11 @@
* Allow for the proper display of product options that use text or textarea
widgets by showing the actual value if a label doesn't exist for the value.
+* You can now change the default display type for Matrix widgets (ie if you
+ want the default to be seperate widgets instead of single widget) with a line
+ in catalog.cfg like this:
+ Options Matrix display_type separate
+
UI
--
1.16 +4 -12 interchange/lib/Vend/Options/Matrix.pm
rev 1.16, prev_rev 1.15
Index: Matrix.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Options/Matrix.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Matrix.pm 9 Aug 2007 13:40:55 -0000 1.15
+++ Matrix.pm 9 Nov 2007 08:17:27 -0000 1.16
@@ -1,6 +1,6 @@
# Vend::Options::Matrix - Interchange Matrix product options
#
-# $Id: Matrix.pm,v 1.15 2007/08/09 13:40:55 pajamian Exp $
+# $Id: Matrix.pm,v 1.16 2007/11/09 08:17:27 pajamian Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group <interchange at icdevgroup.org>
# Copyright (C) 2002-2003 Mike Heins <mikeh at perusion.net>
@@ -23,7 +23,7 @@
package Vend::Options::Matrix;
-$VERSION = substr(q$Revision: 1.15 $, 10);
+$VERSION = substr(q$Revision: 1.16 $, 10);
=head1 NAME
@@ -109,16 +109,8 @@
return undef;
};
- my $record;
- if($db->record_exists($sku)) {
- $record = $db->row_hash($sku)
- }
- else {
- $record = {};
- for(qw/display_type/) {
- $record->{$_} = $loc->{$_};
- }
- }
+ my $record = $db->row_hash($sku) || {};
+ $record->{display_type} ||= $loc->{display_type};
my $tname = $db->name();
More information about the interchange-cvs
mailing list