[interchange-cvs] interchange - heins modified 36 files
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Tue Feb 11 23:00:00 2003
User: heins
Date: 2003-02-12 03:59:13 GMT
Modified: . MANIFEST
Modified: code/SystemTag options.coretag price.coretag
Modified: dist/foundation/pages flypage.html
Modified: dist/foundation/products mv_metadata.asc options.txt
Modified: products.txt
Modified: dist/foundation/templates/components cart
Modified: dist/foundation/templates/sampledata/reports/products
Modified: products.txt
Modified: dist/foundation/templates/sampledata/tools/etc after.cfg
Modified: dist/foundation/templates/sampledata/tools/products
Modified: options.txt products.txt
Modified: dist/lib/UI/pages/admin item.html item_option.html
Modified: order.html
Modified: dist/lib/UI/pages/include/meta mv_metadata.asc
Modified: lib/Vend Config.pm Data.pm Interpolate.pm Order.pm
Modified: lib/Vend/Table Editor.pm
Added: dist/foundation/dbconf/default_db variants.dbm
Added: dist/foundation/dbconf/mysql variants.mysql
Added: dist/foundation/dbconf/oracle variants.ora
Added: dist/foundation/dbconf/pgsql variants.pgsql
Added: dist/foundation/dbconf/sqlite variants.lite
Added: dist/foundation/products variants.txt
Added: dist/foundation/templates/sampledata/tools/products
Added: variants.txt
Added: dist/lib/UI/pages/admin item_option_old.html
Added: lib/Vend Options.pm
Added: lib/Vend/Options Matrix.pm Old48.pm Simple.pm
Removed: dist/lib/UI/pages/include item_option_matrix
Removed: item_option_modular item_option_simple
Log:
* Major update to product options.
* Options are now modular in much the same way as Vend::Payment is.
You can add an unlimited number of option types simply by dropping
a module into Vend::Options.
* By default, the old 4.8 style options are in force, implemented
with Vend::Options::Old48.
If you add this to catalog.cfg (in etc/after.cfg in foundation):
OptionsEnable option_type
The "option_type" names a field in the products file which controls
the option type. This enables new-style options.
It can also be in a specific table and field, ala AutoModifier:
OptionsEnable table:field
Indeed, this is added to AutoModifer after catalog.cfg.
* There are two new-style options included:
Vend::Options::Matrix
Vend::Options::Simple
These are equivalent to the current matrix and simple options.
* Options behavior is controlled in catalog.cfg by a locale-style
multiple hash (ala UserDb or Route):
Options Matrix sort o_sort,o_group
Options Matrix variant_table my_variants
* To find and add a new option type, simply set something in
catalog.cfg:
Options MyOptions table my_options
That will cause a require of Vend::Options::MyOptions.
* The matrix products have been moved to the "variants" table.
* The options table contains options for both Matrix and Simple types,
but only fields for building those simple-type options (which are
used to generate variants for Matrix). The followign fields
have been removed from options:
differential
mv_shipmode
o_enable
o_exclude
o_footer
o_header
o_include
o_master
o_matrix
o_modular
phantom
volume
weight
* The variants table is a subset of the fields in products.
* The admin page for each option style is defined in its
admin_page routine, usually an include from inclued/Options/OptionType.
* size and color fields removed from products table, option_type added.
Revision Changes Path
2.85 +17 -3 interchange/MANIFEST
rev 2.85, prev_rev 2.84
Index: MANIFEST
===================================================================
RCS file: /var/cvs/interchange/MANIFEST,v
retrieving revision 2.84
retrieving revision 2.85
diff -u -r2.84 -r2.85
--- MANIFEST 27 Jan 2003 19:03:35 -0000 2.84
+++ MANIFEST 12 Feb 2003 03:59:10 -0000 2.85
@@ -287,6 +287,7 @@
dist/foundation/dbconf/default_db/tree.dbm
dist/foundation/dbconf/default_db/userdb.dbm
dist/foundation/dbconf/default_db/variable.dbm
+dist/foundation/dbconf/default_db/variants.dbm
dist/foundation/dbconf/locales/de_DE.cfg
dist/foundation/dbconf/locales/default.cfg
dist/foundation/dbconf/mysql/2ndDayAir.dbm
@@ -316,6 +317,7 @@
dist/foundation/dbconf/mysql/tree.mysql
dist/foundation/dbconf/mysql/userdb.mysql
dist/foundation/dbconf/mysql/variable.dbm
+dist/foundation/dbconf/mysql/variants.mysql
dist/foundation/dbconf/oracle/2ndDayAir.dbm
dist/foundation/dbconf/oracle/Ground.dbm
dist/foundation/dbconf/oracle/NextDayAir.dbm
@@ -342,6 +344,7 @@
dist/foundation/dbconf/oracle/tree.ora
dist/foundation/dbconf/oracle/userdb.ora
dist/foundation/dbconf/oracle/variable.dbm
+dist/foundation/dbconf/oracle/variants.ora
dist/foundation/dbconf/pgsql/2ndDayAir.dbm
dist/foundation/dbconf/pgsql/Ground.dbm
dist/foundation/dbconf/pgsql/NextDayAir.dbm
@@ -369,6 +372,7 @@
dist/foundation/dbconf/pgsql/tree.pgsql
dist/foundation/dbconf/pgsql/userdb.pgsql
dist/foundation/dbconf/pgsql/variable.dbm
+dist/foundation/dbconf/pgsql/variants.pgsql
dist/foundation/dbconf/sqlite/2ndDayAir.dbm
dist/foundation/dbconf/sqlite/Ground.dbm
dist/foundation/dbconf/sqlite/NextDayAir.dbm
@@ -396,6 +400,7 @@
dist/foundation/dbconf/sqlite/tree.lite
dist/foundation/dbconf/sqlite/userdb.lite
dist/foundation/dbconf/sqlite/variable.dbm
+dist/foundation/dbconf/sqlite/variants.lite
dist/foundation/etc/area.recordnumber
dist/foundation/etc/cat.recordnumber
dist/foundation/etc/log_entry
@@ -691,6 +696,7 @@
dist/foundation/products/tree.txt
dist/foundation/products/userdb.txt
dist/foundation/products/variable.txt
+dist/foundation/products/variants.txt
dist/foundation/special_pages/badsearch.html
dist/foundation/special_pages/canceled.html
dist/foundation/special_pages/cc_not_valid.html
@@ -936,6 +942,7 @@
dist/foundation/templates/sampledata/tools/products/specs.txt
dist/foundation/templates/sampledata/tools/products/transactions.txt
dist/foundation/templates/sampledata/tools/products/userdb.txt
+dist/foundation/templates/sampledata/tools/products/variants.txt
dist/foundation/upload/.empty
dist/interchange.cfg.dist
dist/lib/UI/ContentEditor.pm
@@ -1022,6 +1029,7 @@
dist/lib/UI/pages/admin/item_group.html
dist/lib/UI/pages/admin/item_inventory.html
dist/lib/UI/pages/admin/item_option.html
+dist/lib/UI/pages/admin/item_option_old.html
dist/lib/UI/pages/admin/item_option_phantom.html
dist/lib/UI/pages/admin/item_price.html
dist/lib/UI/pages/admin/item_up.html
@@ -1126,10 +1134,12 @@
dist/lib/UI/pages/admin/wizard/step_style.html
dist/lib/UI/pages/admin/wizard/step_style_logo.html
dist/lib/UI/pages/admin/wizard/step_tax.html
+dist/lib/UI/pages/include/Options/Matrix
+dist/lib/UI/pages/include/Options/Simple
+dist/lib/UI/pages/include/Options/old/item_option_matrix
+dist/lib/UI/pages/include/Options/old/item_option_modular
+dist/lib/UI/pages/include/Options/old/item_option_simple
dist/lib/UI/pages/include/component_editor
-dist/lib/UI/pages/include/item_option_matrix
-dist/lib/UI/pages/include/item_option_modular
-dist/lib/UI/pages/include/item_option_simple
dist/lib/UI/pages/include/menus/Accounting.txt
dist/lib/UI/pages/include/menus/Admin.txt
dist/lib/UI/pages/include/menus/Commerce.txt
@@ -1268,6 +1278,10 @@
lib/Vend/MakeCat.pm
lib/Vend/Menu.pm
lib/Vend/ModPerl.pm
+lib/Vend/Options.pm
+lib/Vend/Options/Matrix.pm
+lib/Vend/Options/Old48.pm
+lib/Vend/Options/Simple.pm
lib/Vend/Order.pm
lib/Vend/Page.pm
lib/Vend/Parse.pm
1.2 +1 -1 interchange/code/SystemTag/options.coretag
rev 1.2, prev_rev 1.1
Index: options.coretag
===================================================================
RCS file: /var/cvs/interchange/code/SystemTag/options.coretag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- options.coretag 29 Jan 2002 05:52:38 -0000 1.1
+++ options.coretag 12 Feb 2003 03:59:11 -0000 1.2
@@ -1,4 +1,4 @@
UserTag options Order code
UserTag options addAttr
UserTag options PosNumber 1
-UserTag options MapRoutine Vend::Interpolate::tag_options
+UserTag options MapRoutine Vend::Options::tag_options
1.3 +1 -1 interchange/code/SystemTag/price.coretag
rev 1.3, prev_rev 1.2
Index: price.coretag
===================================================================
RCS file: /var/cvs/interchange/code/SystemTag/price.coretag,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- price.coretag 14 Jul 2002 02:58:41 -0000 1.2
+++ price.coretag 12 Feb 2003 03:59:11 -0000 1.3
@@ -5,7 +5,7 @@
UserTag price Routine <<EOR
sub {
my ($code, $ref) = @_;
- my $amount = Vend::Data::item_price($code, $ref->{quantity} || 1);
+ my $amount = Vend::Data::item_price($ref);
$amount = discount_price($code, $amount, $ref->{quantity})
if $ref->{discount};
return currency( $amount, $ref->{noformat} );
1.1 interchange/dist/foundation/dbconf/default_db/variants.dbm
rev 1.1, prev_rev 1.0
Index: variants.dbm
===================================================================
Database variants variants.txt TAB
1.1 interchange/dist/foundation/dbconf/mysql/variants.mysql
rev 1.1, prev_rev 1.0
Index: variants.mysql
===================================================================
Database variants variants.txt __SQLDSN__
Database variants DEFAULT_TYPE varchar(255)
Database variants COLUMN_DEF "code=varchar(64) NOT NULL PRIMARY KEY"
Database variants COLUMN_DEF "sku=varchar(64)"
Database variants COLUMN_DEF "description=varchar(128)"
Database variants COLUMN_DEF "comment=text"
Database variants COLUMN_DEF "thumb=varchar(128)"
Database variants COLUMN_DEF "image=varchar(128)"
Database variants COLUMN_DEF "price=varchar(12)"
Database variants COLUMN_DEF "weight=varchar(12)"
Database variants COLUMN_DEF "inactive=varchar(1) default ''"
Database variants NO_ASCII_INDEX 1
Database variants INDEX description price inactive sku
1.1 interchange/dist/foundation/dbconf/oracle/variants.ora
rev 1.1, prev_rev 1.0
Index: variants.ora
===================================================================
Database variants variants.txt __SQLDSN__
Database variants DEFAULT_TYPE varchar2(255)
Database variants COLUMN_DEF "code=varchar2(64) NOT NULL PRIMARY KEY"
Database variants COLUMN_DEF "sku=varchar2(64)"
Database variants COLUMN_DEF "description=varchar2(128)"
Database variants COLUMN_DEF "comment=text"
Database variants COLUMN_DEF "thumb=varchar2(128)"
Database variants COLUMN_DEF "image=varchar2(128)"
Database variants COLUMN_DEF "price=varchar2(12)"
Database variants COLUMN_DEF "weight=varchar2(12)"
Database variants COLUMN_DEF "inactive=varchar2(1) default ''"
Database variants NO_ASCII_INDEX 1
Database variants INDEX description price inactive sku
1.1 interchange/dist/foundation/dbconf/pgsql/variants.pgsql
rev 1.1, prev_rev 1.0
Index: variants.pgsql
===================================================================
Database variants variants.txt __SQLDSN__
Database variants DEFAULT_TYPE varchar(255)
Database variants COLUMN_DEF "code=varchar(64) NOT NULL PRIMARY KEY"
Database variants COLUMN_DEF "sku=varchar(64)"
Database variants COLUMN_DEF "description=varchar(128)"
Database variants COLUMN_DEF "comment=text"
Database variants COLUMN_DEF "thumb=varchar(128)"
Database variants COLUMN_DEF "image=varchar(128)"
Database variants COLUMN_DEF "price=varchar(12)"
Database variants COLUMN_DEF "weight=varchar(12)"
Database variants COLUMN_DEF "inactive=varchar(1) default ''"
Database variants NO_ASCII_INDEX 1
Database variants INDEX description price inactive sku
1.1 interchange/dist/foundation/dbconf/sqlite/variants.lite
rev 1.1, prev_rev 1.0
Index: variants.lite
===================================================================
Database variants variants.txt __SQLDSN__
Database variants DEFAULT_TYPE varchar(255)
Database variants COLUMN_DEF "code=varchar(64) NOT NULL PRIMARY KEY"
Database variants COLUMN_DEF "sku=varchar(64)"
Database variants COLUMN_DEF "description=varchar(128)"
Database variants COLUMN_DEF "comment=text"
Database variants COLUMN_DEF "thumb=varchar(128)"
Database variants COLUMN_DEF "image=varchar(128)"
Database variants COLUMN_DEF "price=varchar(12)"
Database variants COLUMN_DEF "weight=varchar(12)"
Database variants COLUMN_DEF "inactive=varchar(1) default ''"
Database variants NO_ASCII_INDEX 1
Database variants INDEX description price inactive sku
2.5 +3 -13 interchange/dist/foundation/pages/flypage.html
rev 2.5, prev_rev 2.4
Index: flypage.html
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/pages/flypage.html,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -r2.4 -r2.5
--- flypage.html 8 Feb 2003 15:25:39 -0000 2.4
+++ flypage.html 12 Feb 2003 03:59:11 -0000 2.5
@@ -88,28 +88,18 @@
<td colspan="2"> </td>
</tr>
- [if-item-data options o_enable]
<tr>
<td colspan="2">
[if ordered [item-code]]
[msg arg.0="[page ord/basket]" arg.1="</a>"]This item is currently in your %sshopping cart%s.[/msg]
<br>
[/if]
- [if-item-data options o_enable]
- [if-item-data !options o_modular]
- [table-organize cols=2 table=' ' font="size=1" pretty=1]
- [item-options td=1 label=1 bold=1 price=1]
- [/table-organize]
- [/if-item-data]
- [/if-item-data]
+ [table-organize cols=2 table=' ' font="size=1" pretty=1]
+ [item-options td=1 label=1 bold=1 price=1]
+ [/table-organize]
- [if-item-data options o_modular]
- [set arg][item-code][/set]
- [include templates/components/modular_buy]
- [/if-item-data]
</td>
</tr>
- [/if-item-data]
<tr>
[if-item-data inventory quantity < 1]
2.28 +25 -12 interchange/dist/foundation/products/mv_metadata.asc
rev 2.28, prev_rev 2.27
Index: mv_metadata.asc
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/products/mv_metadata.asc,v
retrieving revision 2.27
retrieving revision 2.28
diff -u -r2.27 -r2.28
--- mv_metadata.asc 18 Jan 2003 15:47:56 -0000 2.27
+++ mv_metadata.asc 12 Feb 2003 03:59:11 -0000 2.28
@@ -24,7 +24,7 @@
cat::search textarea 50 4
cat::sel text Select code
cat::selector textarea 50 3
-country table 200 code
name(40)
shipmodes
tax Int'l Shipping/Taxing Settings country {'panel_shade' => "f",'spread_height' => "50",'ui_data_fields' => "=Identification
code
name
=Shipping/Taxing
shipmodes
tax
=Sort/Display
region
sorder
=Extended information
iso
isonum",}
+country table 25 code
name(40)
shipmodes
tax Int'l Shipping/Taxing Settings country {'panel_shade' => "f",'spread_height' => "50",'ui_sort_field' => "name",'ui_more_alpha' => "1",'ui_data_fields' => "=Identification
code
name
=Shipping/Taxing
shipmodes
tax
=Sort/Display
region
sorder
=Extended information
iso
isonum",'ui_more_decade' => "0",}
country::code text 5 Country Code Two-letter code
country::iso text 5 ISO Country code Not normally used by Interchange; some credit card companies require this. A three letter code.
country::isonum text 5 ISO Country Number Not normally used by Interchange.
@@ -48,11 +48,8 @@
dbconfig::mv_metadata::lookup text 20
dbconfig::mv_metadata::name text 70 4 Description
dbconfig::mv_metadata::options move_combo 20 8 columns:: Fields to edit Recommended fields to display on editor screen, in order of
display. If a blank line is between them, a break line will
be put in.
-dbconfig::mv_metadata::outboard multiple 8 NONE,
Qty price;pricing:q5:rn=Qty price,
Options;options:o_enable:r=Options,
Up-sell;merchandising:upsell_to:r=Up-sell,
Cross-sell;merchandising:cross_sell:r=Cross-sell,
Promo;merchandising:featured:r=Promo,
Inventory;inventory:quantity:rn=Inventory Special display These are extra links for the item editor -- various merchandising, inventory, and pricing links. null_to_comma
dbconfig::mv_metadata::type select =No,
1=Yes Display with meta (spreadsheet) filesafe
dbconfig::mv_metadata::width text 4 Default spreadsheet column width digits
-gish::products table 50 Product information Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn gish products {'bottom_buttons' => "",'include_form_expand' => "1",'spread_textarea' => "",'tab_vert_offset' => "",'widget_cell_class' => "cwidget",'restrict_allow' => "area",'ui_sort_field' => "",'link_table' => "",'ui_show_fields' => "sku
description(30.)
prod_group
category
price(%.2f align=right)",'link_extra' => "",'break_row_class' => "rmarq",'label_cell_class' => "clabel",'tab_horiz_offset' => "",'link_before' => "",'ui_special_add' => "Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",'top_buttons' => "",'left_width' => "20%",'spread_fields' => "sku
description
price
comment
nontaxable",'combo_row_class' => "rnorm",'include_before' => "price",'tab_height' => "",'ui_meta_specific' => "",'link_view' => "",'link_fields' => "",'spread_meta' => "comment nontaxable",'tab_width' => "120",'data_row_class' => "rnorm",'ui_sort_option' => "",'panel_height' => "700",'include_form' => "<td class=clabel> Product images </td>
<td class=cdata>
<script>
function get_images (sku) {
var path = '[var IMAGE_DIR]';
var el;
var divit = document.getElementById('images_table');
divit.style.display= 'none';
el = document.getElementById('thumb_img');
el.src = path + '/thumb/' + sku + '_b.gif';
el = document.getElementById('item_img');
el.src = path + '/items/' + sku + '.gif';
divit.style.display= 'block';
}
</script>
<table id=images_table>
<tr class=rmarq>
<td>Image</td>
<td>Thumb</td>
</tr>
<tr>
<td><img id=item_img src=\"[var IMAGE_DIR]/items/[cgi item_id].gif\"></td>
<td><img id=thumb_img src=\"[var IMAGE_DIR]/thumb/[cgi item_id]_b.gif\"></td>
</tr
ll_class' => "chelp",'spacer_row_class' => "rspacer",'ui_data_fields' => "=General
sku
description
prod_group
category
comment
=Pricing
price
wholesale
=Images
image
thumb
image_large
=Shipping/Tax/Other
weight
gift_cert
nontaxable",'ui_sort_combined' => "",'spread_width' => "8",'file_upload' => "1",'spread_height' => "25",'tabbed' => "1",'include_form_interpolate' => "",'spread_textarea_rows' => "4",'table_width' => "800",'link_sort' => "",'panel_width' => "800",'link_key' => "",'data_cell_class' => "cdata",'link_label' => "",'view_from' => "",}
-gish::products::image imagehelper Image <img src="_UI_VALUE_"><br>
ichelp table 100 ichelp {'panel_shade' => "f",'ui_show_fields' => "code
title",'include_form' => "<td class=clabel>
Send result to ICDEVGROUP
</td>
<td class=cdata>
<input type=checkbox name=mv_cleanup value=send_to_icdevgroup>
<span class=chelp style=\"font-size: smaller\">If you believe this help edit is generally applicable, you can check this button to send to ICDEVGROUP for possible inclusion in the distribution. (Emailed, your email must be working.)</span>
</td>",'ui_sort_field' => "code",}
ichelp::helptext textarea 72 15 Help Text
icmenu table 12 50 code
mgroup
msort
next_line
page
name(30)
inactive
Interchange menus icmenu
@@ -77,9 +74,13 @@
inventory::quantity text 8 On hand
inventory::sku text 16 SKU
inventory::stock_message select In stock,Ships in 3-5 days,Ships in 4-6 weeks,Special order Out of stock message Some absurd amount of help on the same line to make sure the colspan is good for use. stock_message
-item_select::products table 50 Item Editor item_select products {'ui_show_fields' => "sku
description
prod_group
category
price(%.2f align=right)",'ui_sort_field' => "description",'ui_special_add' => "Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",}
+item_select::products table 50 Item Editor item_select products {'ui_show_fields' => "sku
description
prod_group
category
price(%.2f align=right)",'ui_sort_field' => "description",'ui_special_add' => "Qty price;pricing:q5:rn,Option;products:option_type:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",}
+locale table 10 {'panel_shade' => "f",'ui_sort_field' => "code",'ui_more_alpha' => "1",'ui_more_decade' => "100",}
matrix::options::price text 12 Price digits_dot
-matrix_options::options table 100 code
sku
=Option information
o_group
o_label
o_value
matrix_options options {'panel_shade' => "f",'ui_show_fields' => "code
sku
o_group
o_value
o_label",'ui_sort_field' => "sku",'ui_sort_combined' => "sku,o_group",}
+matrix_options::options table 100 code
sku
=Option information
o_group
o_label
o_value
matrix_options options {'panel_shade' => "f",'ui_show_fields' => "code
sku
o_group
o_value
o_label",'ui_sort_field' => "sku",'ui_sort_combined' => "sku,o_group",'ui_data_fields' => "code
sku
=Option information
o_group
o_label
o_value
=Widget information
o_widget
o_width
o_height
=Price differential
price
",}
+matrix_options::options::o_value textarea 30 8 Options One option per line, value to left of = sign, label to right. Example:<blockquote>VALUE=The label for the value</blockquote> line2options options2line
+matrix_options::options::price textarea 20 8 Price differential Only used in "create all possible combinations" line2options options2line
+merchandising table {'link_row_qual' => "o_group",'link_auto_number' => "1",'panel_shade' => "f",'link_row_blank' => "6",'link_fields' => "code sku o_group",'link_key' => "sku",'link_rows_blank' => "5",'link_table' => "options",'ui_more_decade' => "10",}
merchandising::banner_image text Banner image if appropriate
merchandising::banner_text text Banner text for use where appropriate.
merchandising::blurb_begin text Teaser catch line for feature display
@@ -170,10 +171,10 @@
optmaster::options::o_modular select =Not modular,1=Modular options Modular options?
optmaster::options::o_simple select =No,1=Yes Enable options Whether any options processing is done
order_returns::username text Username
-order_view::orderline::status display pending=Pending, shipped=Shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
-order_view::transactions::status display pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
+order_view::orderline::status display pending=Pending, shipped=Shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
+order_view::transactions::status display pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
orderline table code,sku,description,price, quantity,subtotal orderline 1 {'bottom_buttons' => "",'spread_textarea' => "",'tab_vert_offset' => "",'widget_cell_class' => "",'ui_sort_field' => "",'link_table' => "",'ui_show_fields' => "",'link_extra' => "",'break_row_class' => "",'label_cell_class' => "",'tab_horiz_offset' => "",'link_before' => "",'ui_special_add' => "",'top_buttons' => "",'left_width' => "",'spread_fields' => "code
status
sku
quantity
price",'combo_row_class' => "",'include_before' => "",'ui_meta_specific' => "",'tab_height' => "",'link_view' => "",'link_fields' => "",'spread_meta' => "status",'tab_width' => "",'data_row_class' => "",'ui_sort_option' => "",'panel_height' => "",'include_form' => "",'help_cell_class' => "",'spacer_row_class' => "",'ui_data_fields' => "",'ui_sort_combined' => "",'spread_width' => "",'file_upload' => "",'spread_height' => "",'tabbed' => "",'table_width' => "",'spread_textarea_rows' => "",'link_sort' => "",'panel_width' => "",'link_key' => "",'data_cell_class' => "",'link_label' => "",}
-orderline::status select pending=Pending, shipped=Shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
+orderline::status select pending=Pending, shipped=Shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
page_metaconfig::mv_metadata::code hidden_text Page
page_metaconfig::mv_metadata::extended.bottom_template combo UI_STD_FOOTER=Standard UI,NOLEFT_BOTTOM=Catalog page, no left/right,LEFTONLY_BOTTOM=Catalog page, left only,LEFTRIGHT_BOTTOM=Catalog page, left and right Variable for Bottom Template nullselect
page_metaconfig::mv_metadata::extended.display_class text Display Class Type of admin page template to use
@@ -239,6 +240,7 @@
pages/admin/survey/index {'third_menu' => "Surveys",}
pages/admin/survey/overall {'mv_logical_page' => "admin/survey/index",'ui_style_edit' => "1",'icon_name' => "icon_pages.gif",'help_name' => "survey.overall",'ui_class' => "Content",}
pages/admin/tax {'third_menu' => "Commerce",}
+pages/admin/tax_simple {'third_menu' => "Commerce",'top_template' => "UI_STD_HEAD",'bottom_template' => "UI_STD_FOOTER",}
pages/admin/testpage {'page_content' => "This is some content!!!",'icon_name' => "icon_regen.gif",'page_title' => "This is a test virtual page",'top_template' => "UI_STD_HEAD",'bottom_template' => "UI_STD_FOOTER",'ui_class' => "Admin",}
pricing table Pricing Settings 2 pricing {'panel_shade' => "f",'panel_height' => "400",'ui_show_fields' => "sku
price_group
w2(align=right)
w5(align=right)
w10(align=right)
w25(align=right)
w100(align=right)",'ui_data_fields' => "=General
sku
price_group
products:price
products:wholesale
=Retail quantity pricing (if used)
q2 q5 q10
q25 q100
=Wholesale quantity pricing (if used)
w2 w5 w10
w25 w100
",}
pricing::price_group combo pricing Discount group price_group nullselect
@@ -253,7 +255,7 @@
pricing::w2 text 6 Qty 2
pricing::w25 text 6 Qty 25
pricing::w5 text 6 Qty 5
-products table 50 Product information Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn products {'include_form_expand' => "1",'restrict_allow' => "area var page",'include_form' => "<td class=clabel> Product images </td>
<td class=cdata>
<script>
function get_images (sku) {
var path = '[var IMAGE_DIR]';
var el;
var divit = document.getElementById('images_table');
divit.style.display= 'none';
el = document.getElementById('thumb_img');
el.src = path + '/thumb/' + sku + '_b.gif';
el = document.getElementById('item_img');
el.src = path + '/items/' + sku + '.gif';
divit.style.display= 'block';
}
</script>
<table id=images_table>
<tr class=rmarq>
<td>Image</td>
<td>Thumb</td>
</tr>
<tr>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=item_img src=\"[var IMAGE_DIR]/items/[cgi item_id].gif\"></a></td>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=thumb_img src=\"[var IMAGE_DIR]/thumb/[cgi item_id]_b.gif\"></A></td>
</tr>
</table>
</td>
",'ui_show_fields' => "sku
description(30.)
prod_group
category
price(%.2f align=right)",'ui_data_fields' => "=General
sku
description
prod_group category
comment
inactive
=Pricing
price
wholesale
=Images
image
thumb
image_large
=Shipping/Tax/Other
weight
nontaxable gift_cert",'panel_shade' => "f",'file_upload' => "1",'spread_width' => "8",'tabbed' => "1",'spread_height' => "25",'ui_special_add' => "Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",'left_width' => "20%",'include_before' => "price",'spread_fields' => "sku
description
price
comment
nontaxable",'spread_textarea_rows' => "4",'spread_meta' => "comment nontaxable",'view_from' => "prod_group",}
+products table 50 Product information Qty price;pricing:q5:rn,Option;products:option_type:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn products {'include_form_expand' => "1",'restrict_allow' => "area var page",'include_form' => "<td class=clabel> Product images </td>
<td class=cdata>
<script>
function get_images (sku) {
var path = '[var IMAGE_DIR]';
var el;
var divit = document.getElementById('images_table');
divit.style.display= 'none';
el = document.getElementById('thumb_img');
el.src = path + '/thumb/' + sku + '_b.gif';
el = document.getElementById('item_img');
el.src = path + '/items/' + sku + '.gif';
divit.style.display= 'block';
}
</script>
<table id=images_table>
<tr class=rmarq>
<td>Image</td>
<td>Thumb</td>
</tr>
<tr>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=item_img src=\"[var IMAGE_DIR]/items/[cgi item_id].gif\"></a></td>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=thumb_img src=\"[var IMAGE_DIR]/thumb/[cgi item_id]_b.gif\"></A></td>
</tr>
</table>
</td>
",'ui_show_fields' => "sku
description(30.)
prod_group
category
price(%.2f align=right)",'ui_data_fields' => "=General
sku
description
prod_group category
comment
inactive
=Pricing
price
wholesale
=Images
image
thumb
image_large
=Shipping/Tax/Other
weight
nontaxable gift_cert",'panel_shade' => "f",'file_upload' => "1",'spread_width' => "8",'tabbed' => "1",'spread_height' => "25",'ui_special_add' => "Qty price;pricing:q5:rn,NewOptions;products:option_type,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",'left_width' => "20%",'include_before' => "price",'spread_fields' => "sku
description
price
comment
nontaxable",'spread_textarea_rows' => "4",'spread_meta' => "comment nontaxable",'view_from' => "prod_group",}
products::artist text 30 Artist
products::category combo 20 1 products =--none-- Category Enter in box for new category. category nullselect nullselect
products::color textarea 70 2
@@ -311,8 +313,7 @@
transactions::auth_code text 16 Authorization
transactions::deleted yesno Deleted
transactions::order_id text 32 Order ID
-transactions::status select pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
-ui-version 4.9.7
+transactions::status select pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
ui_component::mv_metadata table ui_component mv_metadata {'ui_data_fields' => "=Main
code
label
default
type
width
height
options
filter
=Database lookup
lookup
field
db
=Help and misc
help
help_url
prepend
append
pre_filter",'table_width' => "80%",'left_width' => "30%",}
ui_component::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
with absolute links.</SMALL>
ui_component::mv_metadata::attribute text 20 Column name Do not set this.
@@ -417,4 +418,16 @@
variant::options::price text 12 Price Price of this variant.
variant::options::weight text 8 Weight Weight for this variant.
variant::options::wholesale text 12 Dealer price
+variant::variants table {'panel_shade' => "f",'ui_data_fields' => "code
sku
description
comment
price
wholesale
sale_price
inventory:quantity
weight",}
+variants table {'panel_shade' => "f",'ui_data_fields' => "code
sku
description
comment
price
wholesale
sale_price
weight",}
+variants::code text Variant ID
+variants::comment textarea 70 8 Details
+variants::description text 64 Short Description
+variants::inactive yesno Inactive?
+variants::price text 12 Price digits_dot
+variants::sale_price text 12 Sale Price digits_dot
+variants::sku text BaseSKU
+variants::weight text 8 Weight digits digits_dot
+variants::wholesale text 12 Dealer Price digits_dot
wiki::wikitext textarea 80 24 Body
+ui-version 4.9.7
2.1 +1 -1 interchange/dist/foundation/products/options.txt
rev 2.1, prev_rev 2.0
Index: options.txt
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/products/options.txt,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- options.txt 18 Jul 2001 02:21:27 -0000 2.0
+++ options.txt 12 Feb 2003 03:59:11 -0000 2.1
@@ -1 +1 @@
-code o_master sku o_group o_sort phantom o_enable o_matrix o_modular o_default o_label o_value o_widget o_footer o_header o_height o_width description price wholesale differential weight volume mv_shipmode o_exclude o_include
+code sku o_group o_sort o_default o_label o_value o_widget o_height o_width description price wholesale display_type
2.1 +1 -1 interchange/dist/foundation/products/products.txt
rev 2.1, prev_rev 2.0
Index: products.txt
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/products/products.txt,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- products.txt 18 Jul 2001 02:21:27 -0000 2.0
+++ products.txt 12 Feb 2003 03:59:11 -0000 2.1
@@ -1 +1 @@
-sku description title template_page comment__MVC_FIELDMUNGE__ thumb image price wholesale prod_group category tax_category nontaxable weight size__MVC_FIELDMUNGE__ color gift_cert related featured download dl_type dl_location inactive url sale_price image_large
+sku description title template_page comment__MVC_FIELDMUNGE__ thumb image price wholesale prod_group category tax_category nontaxable weight option_type gift_cert related featured download dl_type dl_location inactive url sale_price image_large
2.1 interchange/dist/foundation/products/variants.txt
rev 2.1, prev_rev 2.0
2.11 +5 -55 interchange/dist/foundation/templates/components/cart
rev 2.11, prev_rev 2.10
Index: cart
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/templates/components/cart,v
retrieving revision 2.10
retrieving revision 2.11
diff -u -r2.10 -r2.11
--- cart 5 Feb 2003 15:49:39 -0000 2.10
+++ cart 12 Feb 2003 03:59:11 -0000 2.11
@@ -62,15 +62,12 @@
[if items]
[then]
-[item-list modular=1]
+[item-list]
[item-change 2][condition]2[/condition]
[/item-change 2]
[item-calc]
- return if '[item-modifier mv_si]';
- delete $Scratch->{subitems[item-increment]};
- my $master = '[item-modifier mv_mi]';
#Log("Checking master item $master");
$row_class = ++$count % 2 ? 'maincontent' : 'contentbar1';
my $item = '[item-increment]';
@@ -79,15 +76,6 @@
$upsell_remove{'[item-code]'} = 1;
$cross_remove{'[item-code]'} = 1;
my %seen = ( '' => 1 );
- my @subitems;
-
- for my $i (@$Items) {
- next unless $i->{mv_si};
- push @subitems, $i->{code}
- if $i->{mv_mi} eq $master;
- }
-
- $Scratch->{subitems[item-increment]} = join " ", @subitems;
$Scratch->{upsell} .= " $up" if $up;
$Scratch->{cross_codes} .= " $cr" if $cr;
@@ -193,13 +181,9 @@
<br>
- [if-item-data options o_enable]
- [if-item-data !options o_modular]
- [table-organize cols=4 table=' ' font="size=1" pretty=1]
- [item-options td=1 label=1 bold=1 price=1]
- [/table-organize]
- [/if-item-data]
- [/if-item-data]
+ [table-organize cols=4 table=' ' font="size=1" pretty=1]
+ [item-options td=1 label=1 bold=1 price=1]
+ [/table-organize]
</TD>
@@ -219,7 +203,7 @@
<TD ALIGN=right>
Regular price <STRIKE>[item-price]</STRIKE>
<BR>
- <B>Your price: [item-discount-price]<br>
+ <B>Your price: [discount-price]<br>
You save: [item-difference]
</TD>
<TD ALIGN=right>
@@ -235,40 +219,6 @@
[/else]
[/if-item-field]
</TR>
-
-[if scratch subitems[item-increment]]
- [calc]
- $string = <<EOF;
-[loop list="[scratch subitems[item-increment]]"][loop-description]
-[/loop]
-EOF
- my $modify = $Tag->area( {
- href => 'modular_modify',
- form => '
- mv_arg=[item-modifier mv_mi]
- sku=[item-code]
- ',
- });
-
- my @lines = split /\n/, $string;
- my $half = int(scalar(@lines) / 2);
- my $first = join "<BR>", splice @lines, 0, $half;
- my $last = join "<BR>", @lines;
-
- return <<EOF;
-<TR class="[item-calc]$row_class || 'cartalt'[/item-calc]">
- <TD COLSPAN=3 align="left">
- $first<BR>
- <A HREF="$modify">modify</A>
- </td>
- <TD COLSPAN=3 align="left">
- $last
- </td>
- <td> </td>
-</TR>
-EOF
- [/calc]
-[/if]
[item-tag-address
set="[cgi mv_an[item-modifier mv_ip]]"
2.1 +11 -11 interchange/dist/foundation/templates/sampledata/reports/products/products.txt
rev 2.1, prev_rev 2.0
Index: products.txt
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/templates/sampledata/reports/products/products.txt,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- products.txt 18 Jul 2001 02:21:42 -0000 2.0
+++ products.txt 12 Feb 2003 03:59:11 -0000 2.1
@@ -1,11 +1,11 @@
-sku description title template_page comment__MVC_FIELDMUNGE__ thumb image price wholesale prod_group category nontaxable weight size__MVC_FIELDMUNGE__ color gift_cert related featured download dl_type dl_location inactive sale_price image_large
-90773sh Automotive Strategy Report The Built-to-order Business Get the inside scoop on how to make car sales work for you. thumb.gif yourimage.gif 89.99 -10% Automotive Strategy 1 1 application/pdf download/90773sh.pdf
-59330rt Sales Lead Development Court The Web Customer Drive up sales by attracting customers on the web. thumb.gif yourimage.gif 120.00 -10% Automotive Development 1 1 application/pdf download/59330rt.pdf
-59402fw Engineering Possibilities Cars Go Live Find new engineering avenues to enhance your product. thumb.gif yourimage.gif 99.98 -10% Automotive Development 1 1 application/pdf download/59402fw.pdf
-83491vp Moving Customer Service Online The Virtual Service How to move customer service online and save money. thumb.gif yourimage.gif 210.00 -10% Marketing Development 1 1 application/pdf download/83491vp.pdf
-00352as Securing The Market Trade Fears About Trading Off the Mark Supporting evidence proves effective security for market trading. thumb.gif yourimage.gif 119.99 -10% Marketing Strategy 1 1 application/pdf download/00352as.pdf
-49503cg Making the Experience Personal Make Shopping Theirs Evidence proves that a personalized shopping experience leads to happier customers. thumb.gif yourimage.gif 89.99 -10% Marketing Sales 1 1 application/pdf download/49503cg.pdf
-22083da Effectively Up-selling to Your Audience Buy More and Be Happy Proven theories in up-selling to your customers that really work. thumb.gif yourimage.gif 130.99 -10% Marketing Sales 1 1 application/pdf download/22083da.pdf
-73358ee Moving Your Business Online Entering the Online Arena Eight easy steps to painlessly moving your business online. thumb.gif yourimage.gif 120.00 -10% Retail Development 1 1 application/pdf download/73358ee.pdf
-11993ab Stepping Above the Competition Standing Out, Stepping Up Helpful hints for standing out from your competition. thumb.gif yourimage.gif 99.99 -10% Retail Strategy 1 1 application/pdf download/11993ab.pdf
-66548ch Targeting The Elusive Customer Hunting for Dollars Simple ways to find customers for the budget conscience. thumb.gif yourimage.gif 100.00 -10% Retail Sales 1 1 application/pdf download/66548ch.pdf
+sku description title template_page comment__MVC_FIELDMUNGE__ thumb image price wholesale prod_group category nontaxable weight option_type gift_cert related featured download dl_type dl_location inactive sale_price image_large
+90773sh Automotive Strategy Report The Built-to-order Business Get the inside scoop on how to make car sales work for you. thumb.gif yourimage.gif 89.99 -10% Automotive Strategy 1 1 application/pdf download/90773sh.pdf
+59330rt Sales Lead Development Court The Web Customer Drive up sales by attracting customers on the web. thumb.gif yourimage.gif 120.00 -10% Automotive Development 1 1 application/pdf download/59330rt.pdf
+59402fw Engineering Possibilities Cars Go Live Find new engineering avenues to enhance your product. thumb.gif yourimage.gif 99.98 -10% Automotive Development 1 1 application/pdf download/59402fw.pdf
+83491vp Moving Customer Service Online The Virtual Service How to move customer service online and save money. thumb.gif yourimage.gif 210.00 -10% Marketing Development 1 1 application/pdf download/83491vp.pdf
+00352as Securing The Market Trade Fears About Trading Off the Mark Supporting evidence proves effective security for market trading. thumb.gif yourimage.gif 119.99 -10% Marketing Strategy 1 1 application/pdf download/00352as.pdf
+49503cg Making the Experience Personal Make Shopping Theirs Evidence proves that a personalized shopping experience leads to happier customers. thumb.gif yourimage.gif 89.99 -10% Marketing Sales 1 1 application/pdf download/49503cg.pdf
+22083da Effectively Up-selling to Your Audience Buy More and Be Happy Proven theories in up-selling to your customers that really work. thumb.gif yourimage.gif 130.99 -10% Marketing Sales 1 1 application/pdf download/22083da.pdf
+73358ee Moving Your Business Online Entering the Online Arena Eight easy steps to painlessly moving your business online. thumb.gif yourimage.gif 120.00 -10% Retail Development 1 1 application/pdf download/73358ee.pdf
+11993ab Stepping Above the Competition Standing Out, Stepping Up Helpful hints for standing out from your competition. thumb.gif yourimage.gif 99.99 -10% Retail Strategy 1 1 application/pdf download/11993ab.pdf
+66548ch Targeting The Elusive Customer Hunting for Dollars Simple ways to find customers for the budget conscience. thumb.gif yourimage.gif 100.00 -10% Retail Sales 1 1 application/pdf download/66548ch.pdf
2.1 +2 -1 interchange/dist/foundation/templates/sampledata/tools/etc/after.cfg
rev 2.1, prev_rev 2.0
Index: after.cfg
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/templates/sampledata/tools/etc/after.cfg,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- after.cfg 18 Jul 2001 02:21:45 -0000 2.0
+++ after.cfg 12 Feb 2003 03:59:11 -0000 2.1
@@ -57,6 +57,7 @@
CommonAdjust :sale_price, ;:price, ;$, ==:options
PriceField 0
+OptionsEnable option_type
Replace ProductFiles
-ProductFiles products options
+ProductFiles products variants
2.1 +20 -35 interchange/dist/foundation/templates/sampledata/tools/products/options.txt
rev 2.1, prev_rev 2.0
Index: options.txt
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/templates/sampledata/tools/products/options.txt,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- options.txt 18 Jul 2001 02:21:51 -0000 2.0
+++ options.txt 12 Feb 2003 03:59:11 -0000 2.1
@@ -1,35 +1,20 @@
-code o_master sku o_group o_sort phantom o_enable o_matrix o_modular o_default o_label o_value o_widget o_footer o_header o_height o_width description price wholesale differential weight volume mv_shipmode o_exclude o_include
-00027 os28005 bristle 1 Bristle Type synthetic=Synthetic,
camel=Camel Hair select 0 0
-00028 os28005 color 1 Handle color BLK=Black,
BEIGE=Beige*,
WHITE=White radio 0 0
-00031 os28080 blade Blade material P=Plastic,
S=Steel*,
T=Titanium select 0 0 P=-1.22, T=100
-00033 os28080 knob Knob W=Wood,
E=Ebony select 0 0 E=20
-00037 os28009 blade Blade material P=Plastic,
S=Steel*,
T=Titanium select 0 0 P=-1.22, T=100
-00039 os28009 screws Screws G=Galvanized,
S=Steel select 0 0 S=.50
-00040 os28009 size Size M=medium,
L=Large* select 0 0 Size of the object L=10,M=-5
-00041 os28011 blade Blade material P=Plastic blade,
S=Steel blade*,
T=Titanium blade select 0 0 P=-1.22, T=100
-00042 os28011 handle Handle W=Wood handle,
E=Ebony handle select 0 0 E=20
-00122 os28004 00058 bristle 1 Bristle Type SYN=Synthetic,
CAM=Camel Hair select 0 0 camel=5.00
-00140 os28004 bristle 1 Bristle Type =None,
HUM=Human hair,
CAM=Camel hair*,
SYN=Synthetic select 0 0
-00146 os28004 color Handle color WHT=White,
BLK=Black select 0 0
-00155 os28005 logo logo c=Construct Something,
y=Your Logo* select 0 0
-00157 os28006 bristle 1 Bristle Type synthetic=Synthetic,
camel=Camel Hair select 0 0
-00158 os28006 color 1 Handle color BLK=Black,
BEIGE=Beige*,
WHITE=White radio 0 0
-00159 os28006 logo logo c=Construct Something,
y=Your Logo* select 0 0
-os28004 1 1 0 0
-os28004-CAM-BLK os28004 1 select 0 0 Ergo Roller - Camel hair, Black 16
-os28004-HUM os28004 1 select 0 0 Ergo Roller - Human hair 16.50
-os28004-SYN-BLK os28004 1 0 0 Ergo Roller - Synthetic, Black 16
-os28004-SYN-WHT os28004 1 select 0 0 Ergo Roller - Synthetic, White 12.25
-os28005 1 0 0
-os28006 1 0 0
-os28006-camel-BLK os28006 1 0 0 Painters Brush Set - Camel Hair, Black 40
-os28006-synthetic-WHITE os28006 1 0 0 Painters Brush Set - Synthetic, White 30
-os28007 1 0 0
-os28011 1 0 0
-os28011-P-W os28011 1 select 0 0 Spackling Knife - Plastic blade, Wood handle 2
-os28011-S-W os28011 1 0 0 Spackling Knife - Steel blade, Wood handle 10
-os28011-T-E os28011 1 select 0 0 Spackling Knife - Titanium blade, Ebony handle 150
-os28011-T-W os28011 1 select 0 0 Spackling Knife - Titanium blade, Wood handle 60
-os28072 1 0 0
-os28080 1 0 0
-os28108 1 0 0
+code sku o_group o_sort o_default o_label o_value o_widget o_height o_width description price wholesale display_type
+os28066 separate
+ os28004 bristle Bristle Type =None,HUM=Human hair,CAM=Camel hair*,SYN=Synthetic select 0 0 HUM=1.55,CAM=1.05,SYN=-2.70
+ os28004 color Handle color WHT=White,
BLK=Black select 0 0
+ os28005 bristle Bristle Type synthetic=Synthetic,camel=Camel Hair select 0 0
+ os28005 color Handle color BLK=Black,BEIGE=Beige*,WHITE=White select 0 0
+ os28005 logo Handle Logo c=Construct Something,y=Your Logo* radio 0 0 c=-1,y=3.00
+ os28006 bristle Bristle Type synthetic=Synthetic,
camel=Camel Hair select 0 0
+ os28006 color Handle color BLK=Black,BEIGE=Beige*,WHITE=White radio 0 0
+ os28006 logo logo c=Construct Something,
y=Your Logo* select 0 0
+ os28009 blade Blade material P=Plastic,
S=Steel*,
T=Titanium select 0 0 P=-1.22, T=100
+ os28009 screws Screws G=Galvanized,
S=Steel select 0 0 S=.50
+ os28009 size Size M=medium,
L=Large* select 0 0 Size of the object L=10,M=-5
+ os28011 blade Blade material P=Plastic blade,S=Steel blade*,T=Titanium blade select 0 0 P=-1.22, T=100
+ os28011 handle Handle W=Wood handle,E=Ebony handle select 0 0 E=20
+ os28066 blade 03 Blade material P=Plastic blade,S=Steel blade*,T=Titanium blade select 0 0 P=-1.44,T=100
+ os28066 handle 01 Handle W=Wood handle,E=Ebony handle radio 0 0 E=20,W=0
+ os28066 logo 02 Logo cs=Construct Something*,yl=Your Logo select 0 0 yl=3.33,cs=-1
+ os28080 blade Blade material P=Plastic,
S=Steel*,
T=Titanium select 0 0 P=-1.22, T=100
+ os28080 knob Knob W=Wood,
E=Ebony select 0 0 E=20
2.3 +40 -41 interchange/dist/foundation/templates/sampledata/tools/products/products.txt
rev 2.3, prev_rev 2.2
Index: products.txt
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/templates/sampledata/tools/products/products.txt,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- products.txt 17 Apr 2002 17:55:48 -0000 2.2
+++ products.txt 12 Feb 2003 03:59:11 -0000 2.3
@@ -1,41 +1,40 @@
-sku description title template_page comment__MVC_FIELDMUNGE__ thumb image price wholesale prod_group category tax_category nontaxable weight size__MVC_FIELDMUNGE__ color gift_cert related featured download dl_type dl_location inactive url sale_price image_large
-gift_cert Gift Certificate Gift Certificate gift_cert.gif gift_cert.gif 1.00 1 Miscellaneous Gift Certificate 1
-os28004 Ergo Roller Ergo Roller The special ergonomic design of our paint rollers has been recommended by physicians to ease the strain of repetitive movements. This unique roller design features "pores" to hold and evenly distribute more paint per wetting than any other brush. os28004_b.gif os28004.gif 21.99 16 Painting Supplies Rollers 1 1 1', 1.5' 14.95
-os28005 Trim Brush Trim Brush Our trim paint brushes are perfectly designed. The ergonomic look and feel will save hours of pain and the unique brush design allows paint to flow evenly and consistently. os28005_b.gif os28005.gif 8.99 6 Painting Supplies Paintbrushes 1 1 1", 2", 3"
-os28006 Painters Brush Set Painters Brush Set This set includes 2" and 3" trim brushes and our ergonomically designer paint roller. A perfect choice for any painting project. os28006_b.gif os28006.gif 29.99 25 Painting Supplies Paintbrushes 1 1 set
-os28007 Disposable Brush Set Disposable Brush Set This set of disposable foam brushes is ideal for any staining project. The foam design holds the maximum amount of stain and the wood handle allows you to preview the color before you apply it. This set includes a brush for all needs. 1/2", 1", 2", 3" are included. os28007_b.gif os28007.gif 14.99 10 Painting Supplies Paintbrushes 1 1 set
-os28008 Painters Ladder Painters Ladder This 6' painters ladder is perfect for getting around in almost any room. The paint tray is reinforced to hold up to a 5 gallon paint bucket. The only time you'll have to get down is to move your ladder! os28008_b.gif os28008.gif 29.99 25 Ladders Ladders 1 3 6'
-os28009 Brush Set Brush Set This Hand Brush set includes our carpenters hand brush and a flat handled brush for the bigger cleanups. Both brushes are made of the finest horsehair and are ideal for all surfaces. os28009_b.gif os28009.gif 9.99 6 Hand Tools Brushes 1 1
-os28011 Spackling Knife Spackling Knife A must have for all painters! This spackling knife is ergonomically designed for ease of use and boasts a newly designed finish to allow easy clean up. os28011_b.gif os28011.gif 14.99 10 Painting Supplies Putty Knives 1 1 2"
-os28044 Framing Hammer Framing Hammer Enjoy the perfect feel and swing of our line of hammers. This framing hammer is ideal for the most discriminating of carpenters. The handle is perfectly shaped to fit the hand and the head is weighted to get the most out of each swing. os28044_b.gif os28044.gif 19.99 12 Hand Tools Hammers 1 2 10oz, 15oz, 20 oz
-os28057a 16 Penny Nails 16 Penny Nails Try our high quality 16 penny titanium nails for a lifetime of holding power. Box count about 100 nails. os28057a_b.gif os28057a.gif 14.99 12 Hardware Nails 1 1
-os28057b 8 Penny Nails 8 Penny Nails Our 8 penny nails are perfect for those hard to reach spots. Made of titanium they are guaranteed to last as long as your project. Box count about 200 nails. os28057b_b.gif os28057b.gif 12.99 10 Hardware Nails 1 1
-os28057c 10 Penny Nails 10 Penny Nails Perfect for all situations our titanium 10 Penny nails should be a part of every project. Box count about 100 nails. os28057c_b.gif os28057c.gif 13.99 11 Hardware Nails 1 1
-os28062 Electricians Plier Set Electricians Plier Set This electricians set includes heavy duty needle-nose pliers and wire cutters. The needle-nose pliers have an extended tip making them easy to get into those hard to reach places, and the cutters are equipped with spring action so they bounce back ready for the next cut. os28062_b.gif os28062.gif 24.99 19 Hand Tools Pliers 1 1 set
-os28064 Mechanics Wrench Set Mechanics Wrench Set This 5 piece set is ideal for all mechanics. Available in standard and metric sizes these tools are guaranteed to cover all of your needs. os28064_b.gif os28064.gif 19.99 16 Hand Tools Wrenches 1 2 standard, metric
-os28065 Mechanics Pliers Mechanics Pliers Our mechanics pliers are available in multiple sizes for all of your needs. From 1/4" to 3" in diameter. os28065_b.gif os28065.gif 18.99 14 Hand Tools Pliers 1 2 1/4", 1/2", 3/4", 1", 2", 3"
-os28066 Big L Carpenters Square Big L Carpenters Square The "Big L" is a must for every carpenter. Designed for ease of use, this square is perfect for measuring and marking cuts, ensuring that you get the right cut every time! os28066_b.gif os28066.gif 14.99 12 Measuring Tools Squares 1 1 1', 3'
-os28068a Breathe Right Face Mask Breathe Right Face Mask The unique design of our "Breathe Right" face mask is a must for all applications. Our patented micro-fiber insures that 90% of all dust and harmful materials are filtered out before you breathe them in. os28068a_b.gif os28068a.gif 5.99 4 Safety Equipment Breathing Protection 1 1
-os28068b The Bug Eye Wear The Bug Eye Wear Nothing protects your vision like "The Bug". The unique design of these safety goggles is practically impenetrable and our special venting technology will make you forget you even have them on. os28068b_b.gif os28068b.gif 12.00 10 Safety Equipment Eye Protection 1 1
-os28069 Flat Top Toolbox Flat Top Toolbox This heavy weight tool box is perfect for any handy person. The lift out top is perfect for a carry along, and there is plenty of open space for larger tool storage. os28069_b.gif os28069.gif 44.99 35 Tool Storage Toolboxes 1 2 20"x 8.5" x 9"
-os28070 Electricians Tool Belt Electricians Tool Belt This tool belt is perfectly designed for the specialized tools of the electrical trade. There is even a pocket for your voltage meter in this 100% leather belt! os28070_b.gif os28070.gif 39.99 30 Tool Storage Tool Belts 1 1
-os28072 Deluxe Hand Saw Deluxe Hand Saw Our deluxe hand saw is perfect for precision work. This saw features an ergonomic handle and carbide tipped teeth. Available in 2', 2.5', and 3' lengths. os28072_b.gif os28072.gif 17.99 14 Hand Tools Hand Saws 1 1 2', 2.5', 3'
-os28073 Mini-Sledge Mini-Sledge Our mini-sledge hammer is superior for smaller jobs that require a little more power. Give this one a try on landscaping stakes and concrete frames. os28073_b.gif os28073.gif 24.99 18 Hand Tools Hammers 1 3 20oz, 30oz, 50oz
-os28074 Rubber Mallet Rubber Mallet Perfectly weighted and encased in rubber this mallet is designed for ease of use in all applications. os28074_b.gif os28074.gif 24.99 18 Hand Tools Hammers 1 2 30oz
-os28075 Modeling Hammer Modeling Hammer Ideal for the hobbiest this modeling hammer is made for the delicate work. Fits easily into small spaces and the smaller head size is perfect for intricate projects. os28075_b.gif os28075.gif 14.99 10 Hand Tools Hammers 1 2 8oz
-os28076 Digger Hand Trencher Digger Hand Trencher The "Digger" is a gardeners dream. Specially designed for moving dirt it boasts two different styles of blade. Use the one side for trenching, or use the other side with it's wider angle to get hard to handle roots out of the ground. Available in 3" size only. os28076_b.gif os28076.gif 18.99 15 Hand Tools Picks & Hatchets 1 1 3"
-os28077 Carpenter's Tool Belt Carpenter's Tool Belt Specially designed this tool belt comes with all of the carpenter's necessities. Made of 100% leather this tool belt boasts a hammer hockey, tape measure hockey, and cordless drill holster. Multiple pockets will allow you to eliminate those extra trips back to the tool box. os28077_b.gif os28077.gif 39.99 30 Tool Storage Tool Belts 1 1
-os28080 The Blade Hand Planer The Blade Hand Planer The perfect precision hand planer. Our patented blade technology insures that you will never have to change or sharpen the blade. Available in 1", 1.5", and 2" widths. os28080_b.gif os28080.gif 19.99 16 Hand Tools Hand Planes 1 1 1", 1.5", 2"
-os28081 Steel Wool Steel Wool Available in all different weights this steel wool is more durable than any other. Perfect for stain removal or smoothing hard to reach surfaces. os28081_b.gif os28081.gif 8.99 6 Painting Supplies Sandpaper 1 1 fine, light, course
-os28082 24" Level 24" Level Certified accuracy, High strength, long life, Built-in rubber grips for usefulness. Easy to clean. os28082_b.gif os28082.gif 34.99 17.5 Measuring Tools Levels 1 24"
-os28084 Tape Measure Tape Measure No matter what you need to measure you are sure to find the ideal tape measure here. All of our tape measures are spring loaded for fast retraction and all lock in place for extended measuring. Available in 10', 16', 24', and 36'. os28084_b.gif os28084.gif 19.99 15 Measuring Tools Tape Measures 1 1 10', 16', 24', 36'
-os28085 Big A A-Frame Ladder Big A A-Frame Ladder The "Big A" is the ideal A-Frame ladder. Available in both 6' and 12' heights you are sure to find the one that meets your needs. The treads of both sides are reinforced for climbing making placement a breeze. os28085_b.gif os28085.gif 36.99 30 Ladders Ladders 1 3 6', 12'
-os28086 Folding Ruler Folding Ruler This 6' folding ruler is a perfect fit in almost any toolbox. Only 12" folded this measuring tool is handy and portable. os28086_b.gif os28086.gif 12.99 9 Measuring Tools Rulers 1 1 6'
-os28087 Sanders Multi-Pac Sanders Multi-Pac This multi-pack of sand paper includes all levels of sand paper from a very fine grit to a very course grit. Ideal for all applications! os28087_b.gif os28087.gif 11.99 8 Painting Supplies Sandpaper 1 1 set
-os28108 Hand Brush Hand Brush This carpenters hand brush is ideal for the small clean ups needed for precision work. Made of refined horse hair it is perfect for even the most sensitive of materials. os28108_b.gif os28108.gif 5.99 3 Hand Tools Brushes 1 1 3", 5", 10"
-os28109 Mini-Spade Mini-Spade This mini-spade is perfect hole digging, tree planting, or trenching. The easy grip handle allows more control over thrust and direction. Available in 4' only os28109_b.gif os28109.gif 24.99 19 Hand Tools Shovels 1 2 4'
-os28110 Mighty Mouse Tin Snips Mighty Mouse Tin Snips Small and ready to go these tin snips are ideal for cutting patches and vent holes. With the patented blades they are also perfect for cutting aluminum flashing. Available in 3" length only. os28110_b.gif os28110.gif 14.99 12 Hand Tools Shears 1 1 3"
-os28111 Hedge Shears Hedge Shears A perfect fit for all users these 10" hedge shears are designed to make the most out of every cut. The ergonomic handle design will allow hours of cutting time so you can tackle those really big projects. One size only os28111_b.gif os28111.gif 19.99 15 Hand Tools Shears 1 1 10"
-os28112 Garden Shovel Garden Shovel The blade on this garden shovel is 7" inches long making it ideal for the potting enthusiast. Ergonomic design makes for ease of use with this tool. os28112_b.gif os28112.gif 13.99 10 Hand Tools Shovels 1 2 7"
-os28113 The Claw Hand Rake The Claw Hand Rake Extend the reach of your potting with "The Claw". Perfect for agitating soil in the most difficult places this 3 tine tool is ideal for every gardener. Small and Large sizes available. os28113_b.gif os28113.gif 14.99 12 Hand Tools Picks & Hatchets 1 1 small, large
-os29000 3' Step Ladder 3' Step Ladder os29000_b.gif os29000.gif 44.99 22.5 Ladders Step Stools
+sku description title template_page comment__MVC_FIELDMUNGE__ thumb image price wholesale prod_group category tax_category nontaxable weight option_type gift_cert related featured download dl_type dl_location inactive url sale_price image_large
+os28004 Ergo Roller Ergo Roller The special ergonomic design of our paint rollers has been recommended by physicians to ease the strain of repetitive movements. This unique roller design features "pores" to hold and evenly distribute more paint per wetting than any other brush. os28004_b.gif os28004.gif 21.99 16 Painting Supplies Rollers 1 1 Matrix 14.95
+os28005 Trim Brush Trim Brush Our trim paint brushes are perfectly designed. The ergonomic look and feel will save hours of pain and the unique brush design allows paint to flow evenly and consistently. os28005_b.gif os28005.gif 8.99 6 Painting Supplies Paintbrushes 1 1 Simple
+os28006 Painters Brush Set Painters Brush Set This set includes 2" and 3" trim brushes and our ergonomically designer paint roller. A perfect choice for any painting project. os28006_b.gif os28006.gif 29.99 25 Painting Supplies Paintbrushes 1 1
+os28007 Disposable Brush Set Disposable Brush Set This set of disposable foam brushes is ideal for any staining project. The foam design holds the maximum amount of stain and the wood handle allows you to preview the color before you apply it. This set includes a brush for all needs. 1/2", 1", 2", 3" are included. os28007_b.gif os28007.gif 14.99 10 Painting Supplies Paintbrushes 1 1
+os28008 Painters Ladder Painters Ladder This 6' painters ladder is perfect for getting around in almost any room. The paint tray is reinforced to hold up to a 5 gallon paint bucket. The only time you'll have to get down is to move your ladder! os28008_b.gif os28008.gif 29.99 25 Ladders Ladders 1 3
+os28009 Brush Set Brush Set This Hand Brush set includes our carpenters hand brush and a flat handled brush for the bigger cleanups. Both brushes are made of the finest horsehair and are ideal for all surfaces. os28009_b.gif os28009.gif 9.99 6 Hand Tools Brushes 1 1
+os28011 Spackling Knife Spackling Knife A must have for all painters! This spackling knife is ergonomically designed for ease of use and boasts a newly designed finish to allow easy clean up. os28011_b.gif os28011.gif 14.99 10 Painting Supplies Putty Knives 1 1 Simple
+os28044 Framing Hammer Framing Hammer Enjoy the perfect feel and swing of our line of hammers. This framing hammer is ideal for the most discriminating of carpenters. The handle is perfectly shaped to fit the hand and the head is weighted to get the most out of each swing. os28044_b.gif os28044.gif 19.99 12 Hand Tools Hammers 1 2
+os28057a 16 Penny Nails 16 Penny Nails Try our high quality 16 penny titanium nails for a lifetime of holding power. Box count about 100 nails. os28057a_b.gif os28057a.gif 14.99 12 Hardware Nails 1 1
+os28057b 8 Penny Nails 8 Penny Nails Our 8 penny nails are perfect for those hard to reach spots. Made of titanium they are guaranteed to last as long as your project. Box count about 200 nails. os28057b_b.gif os28057b.gif 12.99 10 Hardware Nails 1 1
+os28057c 10 Penny Nails 10 Penny Nails Perfect for all situations our titanium 10 Penny nails should be a part of every project. Box count about 100 nails. os28057c_b.gif os28057c.gif 13.99 11 Hardware Nails 1 1
+os28062 Electricians Plier Set Electricians Plier Set This electricians set includes heavy duty needle-nose pliers and wire cutters. The needle-nose pliers have an extended tip making them easy to get into those hard to reach places, and the cutters are equipped with spring action so they bounce back ready for the next cut. os28062_b.gif os28062.gif 24.99 19 Hand Tools Pliers 1 1
+os28064 Mechanics Wrench Set Mechanics Wrench Set This 5 piece set is ideal for all mechanics. Available in standard and metric sizes these tools are guaranteed to cover all of your needs. os28064_b.gif os28064.gif 19.99 16 Hand Tools Wrenches 1 2
+os28065 Mechanics Pliers Mechanics Pliers Our mechanics pliers are available in multiple sizes for all of your needs. From 1/4" to 3" in diameter. os28065_b.gif os28065.gif 18.99 14 Hand Tools Pliers 1 2
+os28066 Big L Carpenters Square Big L Carpenters Square The "Big L" is a must for every carpenter. Designed for ease of use, this square is perfect for measuring and marking cuts, ensuring that you get the right cut every time! os28066_b.gif os28066.gif 14.99 12 Measuring Tools Squares 1 1 Matrix
+os28068a Breathe Right Face Mask Breathe Right Face Mask The unique design of our "Breathe Right" face mask is a must for all applications. Our patented micro-fiber insures that 90% of all dust and harmful materials are filtered out before you breathe them in. os28068a_b.gif os28068a.gif 5.99 4 Safety Equipment Breathing Protection 1 1
+os28068b The Bug Eye Wear The Bug Eye Wear Nothing protects your vision like "The Bug". The unique design of these safety goggles is practically impenetrable and our special venting technology will make you forget you even have them on. os28068b_b.gif os28068b.gif 12.00 10 Safety Equipment Eye Protection 1 1
+os28069 Flat Top Toolbox Flat Top Toolbox This heavy weight tool box is perfect for any handy person. The lift out top is perfect for a carry along, and there is plenty of open space for larger tool storage. os28069_b.gif os28069.gif 44.99 35 Tool Storage Toolboxes 1 2
+os28070 Electricians Tool Belt Electricians Tool Belt This tool belt is perfectly designed for the specialized tools of the electrical trade. There is even a pocket for your voltage meter in this 100% leather belt! os28070_b.gif os28070.gif 39.99 30 Tool Storage Tool Belts 1 1
+os28072 Deluxe Hand Saw Deluxe Hand Saw Our deluxe hand saw is perfect for precision work. This saw features an ergonomic handle and carbide tipped teeth. Available in 2', 2.5', and 3' lengths. os28072_b.gif os28072.gif 17.99 14 Hand Tools Hand Saws 1 1
+os28073 Mini-Sledge Mini-Sledge Our mini-sledge hammer is superior for smaller jobs that require a little more power. Give this one a try on landscaping stakes and concrete frames. os28073_b.gif os28073.gif 24.99 18 Hand Tools Hammers 1 3
+os28074 Rubber Mallet Rubber Mallet Perfectly weighted and encased in rubber this mallet is designed for ease of use in all applications. os28074_b.gif os28074.gif 24.99 18 Hand Tools Hammers 1 2
+os28075 Modeling Hammer Modeling Hammer Ideal for the hobbiest this modeling hammer is made for the delicate work. Fits easily into small spaces and the smaller head size is perfect for intricate projects. os28075_b.gif os28075.gif 14.99 10 Hand Tools Hammers 1 2
+os28076 Digger Hand Trencher Digger Hand Trencher The "Digger" is a gardeners dream. Specially designed for moving dirt it boasts two different styles of blade. Use the one side for trenching, or use the other side with it's wider angle to get hard to handle roots out of the ground. Available in 3" size only. os28076_b.gif os28076.gif 18.99 15 Hand Tools Picks & Hatchets 1 1
+os28077 Carpenter's Tool Belt Carpenter's Tool Belt Specially designed this tool belt comes with all of the carpenter's necessities. Made of 100% leather this tool belt boasts a hammer hockey, tape measure hockey, and cordless drill holster. Multiple pockets will allow you to eliminate those extra trips back to the tool box. os28077_b.gif os28077.gif 39.99 30 Tool Storage Tool Belts 1 1
+os28080 The Blade Hand Planer The Blade Hand Planer The perfect precision hand planer. Our patented blade technology insures that you will never have to change or sharpen the blade. Available in 1", 1.5", and 2" widths. os28080_b.gif os28080.gif 19.99 16 Hand Tools Hand Planes 1 1
+os28081 Steel Wool Steel Wool Available in all different weights this steel wool is more durable than any other. Perfect for stain removal or smoothing hard to reach surfaces. os28081_b.gif os28081.gif 8.99 6 Painting Supplies Sandpaper 1 1
+os28082 24" Level 24" Level Certified accuracy, High strength, long life, Built-in rubber grips for usefulness. Easy to clean. os28082_b.gif os28082.gif 34.99 17.5 Measuring Tools Levels 1
+os28084 Tape Measure Tape Measure No matter what you need to measure you are sure to find the ideal tape measure here. All of our tape measures are spring loaded for fast retraction and all lock in place for extended measuring. Available in 10', 16', 24', and 36'. os28084_b.gif os28084.gif 19.99 15 Measuring Tools Tape Measures 1 1
+os28085 Big A A-Frame Ladder Big A A-Frame Ladder The "Big A" is the ideal A-Frame ladder. Available in both 6' and 12' heights you are sure to find the one that meets your needs. The treads of both sides are reinforced for climbing making placement a breeze. os28085_b.gif os28085.gif 36.99 30 Ladders Ladders 1 3
+os28086 Folding Ruler Folding Ruler This 6' folding ruler is a perfect fit in almost any toolbox. Only 12" folded this measuring tool is handy and portable. os28086_b.gif os28086.gif 12.99 9 Measuring Tools Rulers 1 1
+os28087 Sanders Multi-Pac Sanders Multi-Pac This multi-pack of sand paper includes all levels of sand paper from a very fine grit to a very course grit. Ideal for all applications! os28087_b.gif os28087.gif 11.99 8 Painting Supplies Sandpaper 1 1
+os28108 Hand Brush Hand Brush This carpenters hand brush is ideal for the small clean ups needed for precision work. Made of refined horse hair it is perfect for even the most sensitive of materials. os28108_b.gif os28108.gif 5.99 3 Hand Tools Brushes 1 1
+os28109 Mini-Spade Mini-Spade This mini-spade is perfect hole digging, tree planting, or trenching. The easy grip handle allows more control over thrust and direction. Available in 4' only os28109_b.gif os28109.gif 24.99 19 Hand Tools Shovels 1 2
+os28110 Mighty Mouse Tin Snips Mighty Mouse Tin Snips Small and ready to go these tin snips are ideal for cutting patches and vent holes. With the patented blades they are also perfect for cutting aluminum flashing. Available in 3" length only. os28110_b.gif os28110.gif 14.99 12 Hand Tools Shears 1 1
+os28111 Hedge Shears Hedge Shears A perfect fit for all users these 10" hedge shears are designed to make the most out of every cut. The ergonomic handle design will allow hours of cutting time so you can tackle those really big projects. One size only os28111_b.gif os28111.gif 19.99 15 Hand Tools Shears 1 1
+os28112 Garden Shovel Garden Shovel The blade on this garden shovel is 7" inches long making it ideal for the potting enthusiast. Ergonomic design makes for ease of use with this tool. os28112_b.gif os28112.gif 13.99 10 Hand Tools Shovels 1 2
+os28113 The Claw Hand Rake The Claw Hand Rake Extend the reach of your potting with "The Claw". Perfect for agitating soil in the most difficult places this 3 tine tool is ideal for every gardener. Small and Large sizes available. os28113_b.gif os28113.gif 14.99 12 Hand Tools Picks & Hatchets 1 1
+os29000 3' Step Ladder 3' Step Ladder os29000_b.gif os29000.gif 44.99 22.5 Ladders Step Stools
2.1 interchange/dist/foundation/templates/sampledata/tools/products/variants.txt
rev 2.1, prev_rev 2.0
2.15 +8 -1 interchange/dist/lib/UI/pages/admin/item.html
rev 2.15, prev_rev 2.14
Index: item.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/item.html,v
retrieving revision 2.14
retrieving revision 2.15
diff -u -r2.14 -r2.15
--- item.html 14 Jan 2003 02:25:50 -0000 2.14
+++ item.html 12 Feb 2003 03:59:11 -0000 2.15
@@ -475,6 +475,13 @@
"][if-item-data options o_enable][L]Yes[/L][else][L]No[/L][/else][/if-item-data]</A>
</TD>
%%
+Option
+%%
+<TD ALIGN=CENTER>[page href=__UI_BASE__/item_option form="
+ item_id=[item-code]
+"][if-item-field option_type][item-field option_type][else][L]No[/L][/else][/if-item-field]</A>
+</TD>
+%%
Qty price
%%
<TD ALIGN=CENTER>[page href=__UI_BASE__/item_price form="
@@ -574,4 +581,4 @@
<!-- ----- END REAL STUFF ----- -->
@_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ Revision: $Id: item.html,v 2.14 2003/01/14 02:25:50 mheins Exp $ -->
+<!-- page: @@MV_PAGE@@ Revision: $Id: item.html,v 2.15 2003/02/12 03:59:11 mheins Exp $ -->
2.3 +108 -204 interchange/dist/lib/UI/pages/admin/item_option.html
rev 2.3, prev_rev 2.2
Index: item_option.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/item_option.html,v
retrieving revision 2.2
retrieving revision 2.3
diff -u -r2.2 -r2.3
--- item_option.html 5 Jun 2002 09:55:13 -0000 2.2
+++ item_option.html 12 Feb 2003 03:59:11 -0000 2.3
@@ -1,207 +1,137 @@
-[strip interpolate=1]
-
-[comment]See below, this seems to be the only way this will work[/comment]
-[tag flag write]options[/tag]
-
-[if cgi mv_more_ip]<!--
-[calc]
- for( grep defined $Values->{$_}, qw/
- help_name
- icon_name
- mv_data_table
- page_title
- ui_break_before
- ui_show_fields
- ui_sort_field
- ui_return_to
- mv_return_table
- ui_sort_option
- ui_description_fields
- ui_flex_description
- ui_flex_key
- page_banner
- /)
- {
- $CGI->{$_} = $Values->{$_};
- push @out, "$_ = $CGI->{$_}";
- }
- return join "\n", @out;
-[/calc]
--->[/if]
-
+[set page_title]Select option type[/set]
+[set ui_class]Items[/set]
[calc]
- $CGI->{item_id} = $CGI->{sku} if $CGI->{sku} and ! $CGI->{ignore_sku};
- $CGI->{ui_meta_view} = 'optmaster';
- $CGI->{mv_data_table} = '@_MV_OPTION_TABLE_@' || 'options';
- $CGI->{ui_display_only} = '__ProductFiles_0__:__DescriptionField__';
- return;
-[/calc]
-
-[if cgi item_id]
- [flag type=write table="[cgi mv_data_table]"]
-[/if]
+ $Tag->tmp('tables_to_open');
+ $Tag->tmp('enable_atom');
+ $Tag->tmp('enable_field');
+ $Tag->tmp('bounce_url');
+ $CGI->{item_id} ||= $CGI->{sku};
+#Debug("item_id=$CGI->{item_id}");
+
+ if(! $CGI->{item_id}) {
+ $Scratch->{bounce_url} = $Tag->area('admin/item');
+ return;
+ }
-[if cgi setting]
- [tmp hide_results]
- [if cgi setting eq 'none']
- [record
- table="[cgi mv_data_table]"
- col.o_enable=0
- col.o_master=0
- col.o_modular=0
- col.o_matrix=0
- key="[cgi item_id]"
- ]
- [elsif cgi setting eq 'simple']
- [record
- table="[cgi mv_data_table]"
- col.o_enable=1
- col.o_master=1
- col.o_modular=0
- col.o_matrix=0
- key="[cgi item_id]"
- ]
- [/elsif]
- [elsif cgi setting eq 'matrix-separate']
- [record
- table="[cgi mv_data_table]"
- col.o_enable=1
- col.o_master=1
- col.o_modular=0
- col.o_matrix=2
- key="[cgi item_id]"
- ]
- [/elsif]
- [elsif cgi setting eq 'matrix']
- [record
- table="[cgi mv_data_table]"
- col.o_enable=1
- col.o_master=1
- col.o_modular=0
- col.o_matrix=1
- key="[cgi item_id]"
- ]
- [/elsif]
- [elsif cgi setting eq 'modular']
- [record
- table="[cgi mv_data_table]"
- col.o_enable=1
- col.o_master=1
- col.o_modular=1
- col.o_matrix=0
- key="[cgi item_id]"
- ]
- [/elsif]
- [/if]
- [/tmp]
-[/if]
+ my $oenable = $Config->{OptionsEnable};
-[tmp page_title]
- [either]
- [cgi page_title]
- [or]
- Item option editor: [data table="products" col="description" key="[cgi item_id]"] ([cgi item_id])
- [/either]
-[/tmp]
-[tmp page_banner]
- [either]
- [cgi page_banner]
- [or]
- [cgi page_title]
- [or]
- Item option editor: <B>[data table="products" col="description" key="[cgi item_id]"]</B> ([cgi item_id])
- [/either]
-[/tmp]
-[tmp help_name][either][cgi help_name][or]item.option[/either][/tmp]
-[tmp icon_name][either][cgi icon_name][or]icon_item.gif[/either][/tmp]
-[set ui_class]Items[/set]
+ if(! $oenable) {
+ $Scratch->{bounce_url} = $Tag->area( {
+ href => 'admin/item_option_old',
+ form => "
+ item_id=$CGI->{item_id}
+ ",
+ });
+ return;
+ }
+ if($oenable =~ /(\w+):+(\w+)/) {
+ $Scratch->{tables_to_open} = $CGI->{mv_data_table} = $1;
+ $Scratch->{enable_field} = $2;
+ $Scratch->{enable_atom} = $oenable;
+ }
+ else {
+ $CGI->{mv_data_table} = $Config->{ProductFiles}[0];
+ $Scratch->{tables_to_open} = join " ", @{$Config->{ProductFiles}};
+ $Scratch->{enable_atom} = "$CGI->{mv_data_table}:$oenable";
+ $Scratch->{enable_field} = $oenable;
+ }
+ $Scratch->{enable_atom} =~ s/:+/::/;
+ $Scratch->{enable_atom} .= "::$CGI->{item_id}";
+#Debug("enable_atom=$Scratch->{enable_atom}");
+ return;
+[/calc]
-[if-mm function="!tables" table="[cgi mv_data_table]"]
-[bounce page="__UI_BASE__/error"]
-[/if-mm]
-
-[perl tables="[cgi mv_data_table]"]
- $id = $CGI->{item_id};
-
- my $db = $Db{$CGI->{mv_data_table}}
- or die "No options db?";
-
- $CGI->{ui_data_fields} = 'code __ProductFiles_0__:__DescriptionField__ o_enable o_matrix o_modular';
- if($db->record_exists($id) and $db->field($id, 'o_modular')) {
- $CGI->{ui_data_fields} .= ' sku o_master';
- $CGI->{ui_options_modular} = 1;
- }
- return;
-[/perl]
+[bounce href="[scratch bounce_url]" if="[scratch bounce_url]"]
-[if scratch ui_location]
-[bounce href=`delete $Scratch->{ui_location}`]
-[elsif !cgi mv_data_table]
-[bounce page="__UI_BASE__/gentable"]
-[/elsif]
+[if cgi set_options]
+ [if-mm type=tables table="[cgi mv_data_table]"]
+ [flag type=write table="[cgi mv_data_table]"]
+ <!-- Setting option enable for [cgi item_id]: [data
+ table="[cgi mv_data_table]"
+ column="[scratch enable_field]"
+ key="[cgi item_id]"
+ value="[cgi setting]"
+ ] -->
+ [seti setting][cgi setting][/seti]
+ [else]
+ [error set="No permission to write table [cgi mv_data_table]" name=set_options]
+ [/else]
+ [/if-mm]
[/if]
-[/strip]@_UI_STD_HEAD_@
+@_UI_STD_HEAD_@
-<!---- MAJOR -----><table>
-<!---- MAJOR -----><tr>
-<td valign=top>
-<!---- MAJOR ----->
+[tmpn ui_change_options][/tmpn]
+[tmpn ui_never_options][/tmpn]
[if cgi ui_change_options]
[tmp ui_change_options]1[/tmp]
[/if]
-[if type="!data" term="[cgi mv_data_table]::o_enable::[cgi item_id]"]
+[if type="!data" term="[scratch enable_atom]"]
[tmp ui_change_options]1[/tmp]
[tmp ui_never_options]1[/tmp]
[/if]
-[if scratch ui_change_options]
-[then]
-<H2>
-[if scratch ui_never_options]
-[L]Select option type and/or enable options[/L]
-[else]
-[L]Select option type and/or disable options[/L]
-[/else][/if]
-</H2>
-
-[perl tables="[cgi mv_data_table]"]
+[perl tables="[scratch tables_to_open]"]
my $id = $CGI->{item_id};
- my $tab = $CGI->{mv_data_table};
- my $db = $Db{$tab}
- or return;
+ my @tabs = split /\s+/, $Scratch->{tables_to_open};
+ $Tag->tmp('options_loop');
# Set this up front, returns set 'none' type
$Scratch->{setting} = 'none';
+ foreach my $tab (@tabs) {
+ my $db = $Db{$tab}
+ or return;
+ next unless $db->record_exists($id);
- return unless $db->record_exists($id);
-
- my $record = $db->row_hash($id)
- or return;
+ my $record = $db->row_hash($id)
+ or next;
- return unless $record->{o_enable};
-
- if ($record->{o_modular}) {
- $Scratch->{setting} = 'modular';
- }
- elsif($record->{o_matrix}) {
- $Scratch->{setting} = $record->{o_matrix} == 2 ? 'matrix-separate' : 'matrix';
+ if(not $Scratch->{setting} = $record->{$Scratch->{enable_field}}) {
+ $Scratch->{setting} = 'none';
+ }
+ last;
}
- else {
- $Scratch->{setting} = 'simple';
+ my @types = sort keys %{$Config->{Options_repository}};
+ my %def_desc = (
+ Simple => 'Simple Options',
+ Matrix => 'Matrix Options',
+ Old48 => 'Old Interchange 4.8 Options',
+ );
+ my @lines = "code\tdescription";
+ for(@types) {
+ my $loc = $Config->{Options_repository}{$_};
+ next if $loc->{disable};
+ my $desc = $loc->{description} || $def_desc{$_} || $_;
+ push @lines, "$_\t$desc";
}
+
+ $Scratch->{options_loop} = join "\n", @lines;
+
return;
[/perl]
+
+[if scratch ui_change_options]
+[then]
+<H2>
+[if scratch ui_never_options]
+[L]Select option type and/or enable options[/L]
+[else]
+[L]Select option type and/or disable options[/L]
+[/else][/if]
+</H2>
+
<FORM METHOD=POST ACTION="[area @@MV_PAGE@@]">
<INPUT TYPE=HIDDEN NAME="item_id" VALUE="[cgi item_id]">
-<INPUT TYPE=RADIO NAME="setting" VALUE="none" [if scratch setting eq 'none']CHECKED[/if]> [L]No Options[/L]<BR>
-<INPUT TYPE=RADIO NAME="setting" VALUE="simple" [if scratch setting eq 'simple']CHECKED[/if]> [L]Simple Options[/L]<BR>
-<INPUT TYPE=RADIO NAME="setting" VALUE="matrix" [if scratch setting eq 'matrix']CHECKED[/if]> [L]Matrix Options, one widget[/L]<BR>
-<INPUT TYPE=RADIO NAME="setting" VALUE="matrix-separate" [if scratch setting eq 'matrix-separate']CHECKED[/if]> [L]Matrix Options, separate widgets[/L]<BR>
-<INPUT TYPE=RADIO NAME="setting" VALUE="modular" [if scratch setting eq 'modular']CHECKED[/if] > [L]Modular Options[/L]<BR>
+<INPUT TYPE=HIDDEN NAME="mv_data_table" VALUE="[cgi mv_data_table]">
+<INPUT TYPE=HIDDEN NAME="set_field" VALUE="[scratch enable_field]">
+<INPUT TYPE=HIDDEN NAME="set_options" VALUE="1">
+<INPUT TYPE=RADIO NAME="setting" VALUE="" [if scratch setting eq 'none']CHECKED[/if]> [L]No Options[/L]<BR>
+[loop list="[scratch options_loop]" lr=1 head-skip=1]
+<INPUT TYPE=RADIO NAME="setting" VALUE="[loop-code]" [if scratch setting eq '[loop-code]']CHECKED[/if]> [msg][loop-param description][/msg]<BR>
+[/loop]
[button text="[L]Update[/L]" mv_check="[L]Update[/L]"]
mv_todo=return
mv_nextpage="@@MV_PAGE@@"
@@ -214,26 +144,10 @@
[loop list="[cgi item_id]"]
<table width="__UI_OVERALL_WIDTH__" __UI_T_PROPERTIES__>
-<tr class=rtitle>
- <td colspan=2><IMG SRC="bg.gif" height=2 width=1></td>
-</tr>
<tr class=rnorm>
- <td class=clabel colspan=2>Option type:
- [if-loop-data @_MV_OPTION_TABLE_@ o_matrix]
- Matrix [tmp matrix_or_modular]1[/tmp]
- [if-loop-data @_MV_OPTION_TABLE_@ o_matrix == 2]
- (separate widgets)
- [/if-loop-data]
- [/if-loop-data]
- [if-loop-data @_MV_OPTION_TABLE_@ o_modular]
- [if-loop-data !@_MV_OPTION_TABLE_@ o_matrix]
- Modular [tmp matrix_or_modular]1[/tmp]
- [/if-loop-data]
- [/if-loop-data]
- [if !scratch matrix_or_modular]
- Simple
- [/if]
+ <td class=titlebox colspan=2>Option type:
+ [scratch setting]
[page href="@@MV_PAGE@@" form="
ui_change_options=1
@@ -241,23 +155,13 @@
"]Change</A><br>
</td>
</tr>
-<tr class=rtitle>
- <td colspan=2><IMG SRC="bg.gif" height=2 width=1></td>
-</tr>
</table>
<P>
[/loop]
-[if type=data term="[cgi mv_data_table]::o_matrix::[cgi item_id]"]
- [include include/item_option_matrix]
-[elsif type=data term="[cgi mv_data_table]::o_modular::[cgi item_id]"]
- [include include/item_option_modular]
-[/elsif]
-[else]
- [include include/item_option_simple]
-[/else]
-[/if]
+[tmp page_title]Configure [scratch setting] options for [description code="[cgi item_id]"][/tmp]
+[options code="[cgi item_id]" admin_page=1]
[/else]
[/if]
2.13 +3 -3 interchange/dist/lib/UI/pages/admin/order.html
rev 2.13, prev_rev 2.12
Index: order.html
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/admin/order.html,v
retrieving revision 2.12
retrieving revision 2.13
diff -u -r2.12 -r2.13
--- order.html 14 Jan 2003 02:25:50 -0000 2.12
+++ order.html 12 Feb 2003 03:59:11 -0000 2.13
@@ -462,7 +462,7 @@
}
}
var image_dir = '[image dir-only=1 ui=1 secure="__UI_SECURE__"]';
- var types = ['all', 'none', 'shipped', 'pending', 'canceled', 'partial'];
+ var types = ['all', 'none', 'shipped', 'pending', 'waiting', 'partial'];
for(var i = 0; i < types.length; i++) {
var img = document.getElementById('img_check_' + types[i]);
if(img != undefined)
@@ -480,7 +480,7 @@
<A HREF="javascript:checkType('all')"><img id="img_check_all" src="__UI_IMG__box_empty.gif" border=0>Check all</A>
<A HREF="javascript:checkType('none')"><img id="img_check_none" src="__UI_IMG__box_empty.gif" border=0>Uncheck all</A>
-[loop list="shipped pending canceled partial"]
+[loop list="shipped pending waiting partial"]
<A HREF="javascript:checkType('[loop-code]')">
<img id="img_check_[loop-code]" src="__UI_IMG__box_empty.gif" border=0>Check all [loop-code]
@@ -496,4 +496,4 @@
@_UI_STD_FOOTER_@
-<!-- page: @@MV_PAGE@@ version: $Id: order.html,v 2.12 2003/01/14 02:25:50 mheins Exp $ -->
+<!-- page: @@MV_PAGE@@ version: $Id: order.html,v 2.13 2003/02/12 03:59:11 mheins Exp $ -->
2.1 interchange/dist/lib/UI/pages/admin/item_option_old.html
rev 2.1, prev_rev 2.0
1.5 +22 -10 interchange/dist/lib/UI/pages/include/meta/mv_metadata.asc
rev 1.5, prev_rev 1.4
Index: mv_metadata.asc
===================================================================
RCS file: /var/cvs/interchange/dist/lib/UI/pages/include/meta/mv_metadata.asc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mv_metadata.asc 8 Feb 2003 05:00:57 -0000 1.4
+++ mv_metadata.asc 12 Feb 2003 03:59:12 -0000 1.5
@@ -48,11 +48,8 @@
dbconfig::mv_metadata::lookup text 20
dbconfig::mv_metadata::name text 70 4 Description
dbconfig::mv_metadata::options move_combo 20 8 columns:: Fields to edit Recommended fields to display on editor screen, in order of
display. If a blank line is between them, a break line will
be put in.
-dbconfig::mv_metadata::outboard multiple 8 NONE,
Qty price;pricing:q5:rn=Qty price,
Options;options:o_enable:r=Options,
Up-sell;merchandising:upsell_to:r=Up-sell,
Cross-sell;merchandising:cross_sell:r=Cross-sell,
Promo;merchandising:featured:r=Promo,
Inventory;inventory:quantity:rn=Inventory Special display These are extra links for the item editor -- various merchandising, inventory, and pricing links. null_to_comma
dbconfig::mv_metadata::type select =No,
1=Yes Display with meta (spreadsheet) filesafe
dbconfig::mv_metadata::width text 4 Default spreadsheet column width digits
-gish::products table 50 Product information Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn gish products {'bottom_buttons' => "",'include_form_expand' => "1",'spread_textarea' => "",'tab_vert_offset' => "",'widget_cell_class' => "cwidget",'restrict_allow' => "area",'ui_sort_field' => "",'link_table' => "",'ui_show_fields' => "sku
description(30.)
prod_group
category
price(%.2f align=right)",'link_extra' => "",'break_row_class' => "rmarq",'label_cell_class' => "clabel",'tab_horiz_offset' => "",'link_before' => "",'ui_special_add' => "Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",'top_buttons' => "",'left_width' => "20%",'spread_fields' => "sku
description
price
comment
nontaxable",'combo_row_class' => "rnorm",'include_before' => "price",'tab_height' => "",'ui_meta_specific' => "",'link_view' => "",'link_fields' => "",'spread_meta' => "comment nontaxable",'tab_width' => "120",'data_row_class' => "rnorm",'ui_sort_option' => "",'panel_height' => "700",'include_form' => "<td class=clabel> Product images </td>
<td class=cdata>
<script>
function get_images (sku) {
var path = '[var IMAGE_DIR]';
var el;
var divit = document.getElementById('images_table');
divit.style.display= 'none';
el = document.getElementById('thumb_img');
el.src = path + '/thumb/' + sku + '_b.gif';
el = document.getElementById('item_img');
el.src = path + '/items/' + sku + '.gif';
divit.style.display= 'block';
}
</script>
<table id=images_table>
<tr class=rmarq>
<td>Image</td>
<td>Thumb</td>
</tr>
<tr>
<td><img id=item_img src=\"[var IMAGE_DIR]/items/[cgi item_id].gif\"></td>
<td><img id=thumb_img src=\"[var IMAGE_DIR]/thumb/[cgi item_id]_b.gif\"></td>
</tr
ll_class' => "chelp",'spacer_row_class' => "rspacer",'ui_data_fields' => "=General
sku
description
prod_group
category
comment
=Pricing
price
wholesale
=Images
image
thumb
image_large
=Shipping/Tax/Other
weight
gift_cert
nontaxable",'ui_sort_combined' => "",'spread_width' => "8",'file_upload' => "1",'spread_height' => "25",'tabbed' => "1",'include_form_interpolate' => "",'spread_textarea_rows' => "4",'table_width' => "800",'link_sort' => "",'panel_width' => "800",'link_key' => "",'data_cell_class' => "cdata",'link_label' => "",'view_from' => "",}
-gish::products::image imagehelper Image <img src="_UI_VALUE_"><br>
ichelp table 100 ichelp {'panel_shade' => "f",'ui_show_fields' => "code
title",'include_form' => "<td class=clabel>
Send result to ICDEVGROUP
</td>
<td class=cdata>
<input type=checkbox name=mv_cleanup value=send_to_icdevgroup>
<span class=chelp style=\"font-size: smaller\">If you believe this help edit is generally applicable, you can check this button to send to ICDEVGROUP for possible inclusion in the distribution. (Emailed, your email must be working.)</span>
</td>",'ui_sort_field' => "code",}
ichelp::helptext textarea 72 15 Help Text
icmenu table 12 50 code
mgroup
msort
next_line
page
name(30)
inactive
Interchange menus icmenu
@@ -77,10 +74,13 @@
inventory::quantity text 8 On hand
inventory::sku text 16 SKU
inventory::stock_message select In stock,Ships in 3-5 days,Ships in 4-6 weeks,Special order Out of stock message Some absurd amount of help on the same line to make sure the colspan is good for use. stock_message
-item_select::products table 50 Item Editor item_select products {'ui_show_fields' => "sku
description
prod_group
category
price(%.2f align=right)",'ui_sort_field' => "description",'ui_special_add' => "Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",}
+item_select::products table 50 Item Editor item_select products {'ui_show_fields' => "sku
description
prod_group
category
price(%.2f align=right)",'ui_sort_field' => "description",'ui_special_add' => "Qty price;pricing:q5:rn,Option;products:option_type:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",}
locale table 10 {'panel_shade' => "f",'ui_sort_field' => "code",'ui_more_alpha' => "1",'ui_more_decade' => "100",}
matrix::options::price text 12 Price digits_dot
-matrix_options::options table 100 code
sku
=Option information
o_group
o_label
o_value
matrix_options options {'panel_shade' => "f",'ui_show_fields' => "code
sku
o_group
o_value
o_label",'ui_sort_field' => "sku",'ui_sort_combined' => "sku,o_group",}
+matrix_options::options table 100 code
sku
=Option information
o_group
o_label
o_value
matrix_options options {'panel_shade' => "f",'ui_show_fields' => "code
sku
o_group
o_value
o_label",'ui_sort_field' => "sku",'ui_sort_combined' => "sku,o_group",'ui_data_fields' => "code
sku
=Option information
o_group
o_label
o_value
=Widget information
o_widget
o_width
o_height
=Price differential
price
",}
+matrix_options::options::o_value textarea 30 8 Options One option per line, value to left of = sign, label to right. Example:<blockquote>VALUE=The label for the value</blockquote> line2options options2line
+matrix_options::options::price textarea 20 8 Price differential Only used in "create all possible combinations" line2options options2line
+merchandising table {'link_row_qual' => "o_group",'link_auto_number' => "1",'panel_shade' => "f",'link_row_blank' => "6",'link_fields' => "code sku o_group",'link_key' => "sku",'link_rows_blank' => "5",'link_table' => "options",'ui_more_decade' => "10",}
merchandising::banner_image text Banner image if appropriate
merchandising::banner_text text Banner text for use where appropriate.
merchandising::blurb_begin text Teaser catch line for feature display
@@ -171,10 +171,10 @@
optmaster::options::o_modular select =Not modular,1=Modular options Modular options?
optmaster::options::o_simple select =No,1=Yes Enable options Whether any options processing is done
order_returns::username text Username
-order_view::orderline::status display pending=Pending, shipped=Shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
-order_view::transactions::status display pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
+order_view::orderline::status display pending=Pending, shipped=Shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
+order_view::transactions::status display pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
orderline table code,sku,description,price, quantity,subtotal orderline 1 {'bottom_buttons' => "",'spread_textarea' => "",'tab_vert_offset' => "",'widget_cell_class' => "",'ui_sort_field' => "",'link_table' => "",'ui_show_fields' => "",'link_extra' => "",'break_row_class' => "",'label_cell_class' => "",'tab_horiz_offset' => "",'link_before' => "",'ui_special_add' => "",'top_buttons' => "",'left_width' => "",'spread_fields' => "code
status
sku
quantity
price",'combo_row_class' => "",'include_before' => "",'ui_meta_specific' => "",'tab_height' => "",'link_view' => "",'link_fields' => "",'spread_meta' => "status",'tab_width' => "",'data_row_class' => "",'ui_sort_option' => "",'panel_height' => "",'include_form' => "",'help_cell_class' => "",'spacer_row_class' => "",'ui_data_fields' => "",'ui_sort_combined' => "",'spread_width' => "",'file_upload' => "",'spread_height' => "",'tabbed' => "",'table_width' => "",'spread_textarea_rows' => "",'link_sort' => "",'panel_width' => "",'link_key' => "",'data_cell_class' => "",'link_label' => "",}
-orderline::status select pending=Pending, shipped=Shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
+orderline::status select pending=Pending, shipped=Shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
page_metaconfig::mv_metadata::code hidden_text Page
page_metaconfig::mv_metadata::extended.bottom_template combo UI_STD_FOOTER=Standard UI,NOLEFT_BOTTOM=Catalog page, no left/right,LEFTONLY_BOTTOM=Catalog page, left only,LEFTRIGHT_BOTTOM=Catalog page, left and right Variable for Bottom Template nullselect
page_metaconfig::mv_metadata::extended.display_class text Display Class Type of admin page template to use
@@ -240,6 +240,7 @@
pages/admin/survey/index {'third_menu' => "Surveys",}
pages/admin/survey/overall {'mv_logical_page' => "admin/survey/index",'ui_style_edit' => "1",'icon_name' => "icon_pages.gif",'help_name' => "survey.overall",'ui_class' => "Content",}
pages/admin/tax {'third_menu' => "Commerce",}
+pages/admin/tax_simple {'third_menu' => "Commerce",'top_template' => "UI_STD_HEAD",'bottom_template' => "UI_STD_FOOTER",}
pages/admin/testpage {'page_content' => "This is some content!!!",'icon_name' => "icon_regen.gif",'page_title' => "This is a test virtual page",'top_template' => "UI_STD_HEAD",'bottom_template' => "UI_STD_FOOTER",'ui_class' => "Admin",}
pricing table Pricing Settings 2 pricing {'panel_shade' => "f",'panel_height' => "400",'ui_show_fields' => "sku
price_group
w2(align=right)
w5(align=right)
w10(align=right)
w25(align=right)
w100(align=right)",'ui_data_fields' => "=General
sku
price_group
products:price
products:wholesale
=Retail quantity pricing (if used)
q2 q5 q10
q25 q100
=Wholesale quantity pricing (if used)
w2 w5 w10
w25 w100
",}
pricing::price_group combo pricing Discount group price_group nullselect
@@ -254,7 +255,7 @@
pricing::w2 text 6 Qty 2
pricing::w25 text 6 Qty 25
pricing::w5 text 6 Qty 5
-products table 50 Product information Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn products {'include_form_expand' => "1",'restrict_allow' => "area var page",'include_form' => "<td class=clabel> Product images </td>
<td class=cdata>
<script>
function get_images (sku) {
var path = '[var IMAGE_DIR]';
var el;
var divit = document.getElementById('images_table');
divit.style.display= 'none';
el = document.getElementById('thumb_img');
el.src = path + '/thumb/' + sku + '_b.gif';
el = document.getElementById('item_img');
el.src = path + '/items/' + sku + '.gif';
divit.style.display= 'block';
}
</script>
<table id=images_table>
<tr class=rmarq>
<td>Image</td>
<td>Thumb</td>
</tr>
<tr>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=item_img src=\"[var IMAGE_DIR]/items/[cgi item_id].gif\"></a></td>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=thumb_img src=\"[var IMAGE_DIR]/thumb/[cgi item_id]_b.gif\"></A></td>
</tr>
</table>
</td>
",'ui_show_fields' => "sku
description(30.)
prod_group
category
price(%.2f align=right)",'ui_data_fields' => "=General
sku
description
prod_group category
comment
inactive
=Pricing
price
wholesale
=Images
image
thumb
image_large
=Shipping/Tax/Other
weight
nontaxable gift_cert",'panel_shade' => "f",'file_upload' => "1",'spread_width' => "8",'tabbed' => "1",'spread_height' => "25",'ui_special_add' => "Qty price;pricing:q5:rn,Options;options:o_enable:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",'left_width' => "20%",'include_before' => "price",'spread_fields' => "sku
description
price
comment
nontaxable",'spread_textarea_rows' => "4",'spread_meta' => "comment nontaxable",'view_from' => "prod_group",}
+products table 50 Product information Qty price;pricing:q5:rn,Option;products:option_type:r,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn products {'include_form_expand' => "1",'restrict_allow' => "area var page",'include_form' => "<td class=clabel> Product images </td>
<td class=cdata>
<script>
function get_images (sku) {
var path = '[var IMAGE_DIR]';
var el;
var divit = document.getElementById('images_table');
divit.style.display= 'none';
el = document.getElementById('thumb_img');
el.src = path + '/thumb/' + sku + '_b.gif';
el = document.getElementById('item_img');
el.src = path + '/items/' + sku + '.gif';
divit.style.display= 'block';
}
</script>
<table id=images_table>
<tr class=rmarq>
<td>Image</td>
<td>Thumb</td>
</tr>
<tr>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=item_img src=\"[var IMAGE_DIR]/items/[cgi item_id].gif\"></a></td>
<td><a href=\"javascript:mvpan_tripTab(2)\"><img border=0 id=thumb_img src=\"[var IMAGE_DIR]/thumb/[cgi item_id]_b.gif\"></A></td>
</tr>
</table>
</td>
",'ui_show_fields' => "sku
description(30.)
prod_group
category
price(%.2f align=right)",'ui_data_fields' => "=General
sku
description
prod_group category
comment
inactive
=Pricing
price
wholesale
=Images
image
thumb
image_large
=Shipping/Tax/Other
weight
nontaxable gift_cert",'panel_shade' => "f",'file_upload' => "1",'spread_width' => "8",'tabbed' => "1",'spread_height' => "25",'ui_special_add' => "Qty price;pricing:q5:rn,NewOptions;products:option_type,Promo;merchandising:featured:r,Inventory;inventory:quantity:rn",'left_width' => "20%",'include_before' => "price",'spread_fields' => "sku
description
price
comment
nontaxable",'spread_textarea_rows' => "4",'spread_meta' => "comment nontaxable",'view_from' => "prod_group",}
products::artist text 30 Artist
products::category combo 20 1 products =--none-- Category Enter in box for new category. category nullselect nullselect
products::color textarea 70 2
@@ -312,7 +313,7 @@
transactions::auth_code text 16 Authorization
transactions::deleted yesno Deleted
transactions::order_id text 32 Order ID
-transactions::status select pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, credit=Waiting for credit check, canceled=Canceled nullselect
+transactions::status select pending=Pending, shipped=Shipped, partial=Partially shipped, backorder=Back ordered, waiting=Waiting for payment, credit=Waiting for credit check, canceled=Canceled nullselect
ui_component::mv_metadata table ui_component mv_metadata {'ui_data_fields' => "=Main
code
label
default
type
width
height
options
filter
=Database lookup
lookup
field
db
=Help and misc
help
help_url
prepend
append
pre_filter",'table_width' => "80%",'left_width' => "30%",}
ui_component::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
with absolute links.</SMALL>
ui_component::mv_metadata::attribute text 20 Column name Do not set this.
@@ -417,4 +418,15 @@
variant::options::price text 12 Price Price of this variant.
variant::options::weight text 8 Weight Weight for this variant.
variant::options::wholesale text 12 Dealer price
+variant::variants table {'panel_shade' => "f",'ui_data_fields' => "code
sku
description
comment
price
wholesale
sale_price
inventory:quantity
weight",}
+variants table {'panel_shade' => "f",'ui_data_fields' => "code
sku
description
comment
price
wholesale
sale_price
weight",}
+variants::code text Variant ID
+variants::comment textarea 70 8 Details
+variants::description text 64 Short Description
+variants::inactive yesno Inactive?
+variants::price text 12 Price digits_dot
+variants::sale_price text 12 Sale Price digits_dot
+variants::sku text BaseSKU
+variants::weight text 8 Weight digits digits_dot
+variants::wholesale text 12 Dealer Price digits_dot
wiki::wikitext textarea 80 24 Body
2.100 +67 -2 interchange/lib/Vend/Config.pm
rev 2.100, prev_rev 2.99
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.99
retrieving revision 2.100
diff -u -r2.99 -r2.100
--- Config.pm 8 Feb 2003 01:12:56 -0000 2.99
+++ Config.pm 12 Feb 2003 03:59:12 -0000 2.100
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.99 2003/02/08 01:12:56 racke Exp $
+# $Id: Config.pm,v 2.100 2003/02/12 03:59:12 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
# Copyright (C) 2003 ICDEVGROUP <interchange@icdevgroup.org>
@@ -46,7 +46,7 @@
use Vend::Util;
use Vend::Data;
-$VERSION = substr(q$Revision: 2.99 $, 10);
+$VERSION = substr(q$Revision: 2.100 $, 10);
my %CDname;
@@ -434,6 +434,9 @@
['PriceDivide', undef, 1],
['PriceCommas', 'yesno', 'Yes'],
['MixMatch', 'yesno', 'No'],
+ ['OptionsEnable', undef, ''],
+ ['OptionsAttribute', undef, ''],
+ ['Options', 'locale', ''],
['DifferentSecure', 'boolean', ''],
['AlwaysSecure', 'boolean', ''],
['Password', undef, ''],
@@ -2246,6 +2249,51 @@
}
my %Default = (
+ ## This rather extensive default setting is not typical for IC,
+ ## but performance in pricing routines demands it
+ Options => sub {
+ my $o = $C->{Options_repository} ||= {};
+ my $var = $C->{Variable};
+
+ my @base = qw/Simple Matrix Old48/;
+ my %base;
+ @base{@base} = @base;
+
+ my %seen;
+ my @types = grep !$seen{$_}, keys %$o, @base;
+
+ for(@types) {
+ my $loc = $o->{$_} ||= {};
+ eval "require Vend::Options::$_;";
+ if($@) {
+ my $msg = $@;
+ config_warn(
+ "Unable to use options type %s, no module. Error: %s",
+ $_,
+ $msg,
+ );
+ undef $o->{$_};
+ next;
+ }
+ eval {
+ my $name = "Vend::Options::${_}::Default";
+ no strict;
+ while(my ($k,$v) = each %{"$name"}) {
+ next unless $k;
+ next if exists $loc->{$k};
+ $loc->{$k} = $v;
+ }
+ };
+ $loc->{map} = {};
+ if($loc->{remap} ||= $C->{Variable}{MV_OPTION_TABLE_MAP}) {
+ $loc->{remap} =~ s/^\s+//;
+ $loc->{remap} =~ s/\s+$//;
+ my @points = split /[\0,\s]+/, $loc->{remap};
+ map { m{(.*?)=(.*)} and $loc->{map}{$1} = $2} @points;
+ }
+ }
+ $C->{Options} = $o->{default} || $o->{Simple};
+ },
UserDB => sub {
shift;
my $set = $C->{UserDB_repository};
@@ -2254,6 +2302,23 @@
$C->{AdminUserDB} = {} unless $C->{AdminUserDB};
$C->{AdminUserDB}{$_} = $set->{$_}{admin};
}
+ return 1;
+ },
+ AutoModifier => sub {
+ my $auto = shift;
+ if($C->{OptionsEnable}) {
+ $auto = $C->{AutoModifier} = []
+ if ! $auto;
+ push @$auto, $C->{OptionsEnable};
+ }
+ return 1;
+ },
+ OptionsEnable => sub {
+ my $enable = shift
+ or return 1;
+ return 1 if $C->{OptionsAttribute};
+ $enable =~ s,.*:,,;
+ $C->{OptionsAttribute} = $enable;
return 1;
},
Glimpse => sub {
2.24 +20 -117 interchange/lib/Vend/Data.pm
rev 2.24, prev_rev 2.23
Index: Data.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Data.pm,v
retrieving revision 2.23
retrieving revision 2.24
diff -u -r2.23 -r2.24
--- Data.pm 6 Feb 2003 20:27:16 -0000 2.23
+++ Data.pm 12 Feb 2003 03:59:12 -0000 2.24
@@ -1,6 +1,6 @@
# Vend::Data - Interchange databases
#
-# $Id: Data.pm,v 2.23 2003/02/06 20:27:16 jon Exp $
+# $Id: Data.pm,v 2.24 2003/02/12 03:59:12 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -1433,115 +1433,6 @@
return;
}
-sub modular_cost {
- my ($item, $table, $final) = @_;
-#::logDebug("called modular_cost");
- return unless $item->{mv_si};
- my $ptr = $item->{mv_mp}
- or return;
-#::logDebug("modular_cost ptr=$ptr");
-
- my $db = database_exists_ref($table);
- if(! $db) {
- logError('Non-existent price option table %s', $table);
- return;
- }
-#::logDebug("database $table exists");
-
- remap_options();
-
- return unless $db->record_exists($ptr);
-#::logDebug("record $ptr exists");
-
- my $fld = $opt_map{differential} || 'differential';
- return unless $db->column_exists($fld);
-#::logDebug("field $fld exists");
-
- my $p = $db->field($ptr,$fld);
-#::logDebug("p=$p for $fld") if $p;
-
- return $p if $p != 0;
- return;
-}
-
-sub option_cost {
- my ($item, $table, $final) = @_;
-#::logDebug("called option_cost");
- my $db = database_exists_ref($table);
- if(! $db) {
- logError('Non-existent price option table %s', $table);
- return;
- }
-
- my $sku = $item->{code};
-
- $db->record_exists($sku)
- or return;
- my $record = $db->row_hash($sku)
- or return;
-
- remap_options($record);
-
-# if(! $opt_remap and $::Variable->{MV_OPTION_TABLE_MAP}) {
-# $opt_remap = $::Variable->{MV_OPTION_TABLE_MAP};
-# $opt_remap =~ s/^\s+//;
-# $opt_remap =~ s/\s+$//;
-# %opt_map = split /[,\s]+/, $opt_remap;
-# my %rec;
-# my @del;
-# my ($k, $v);
-# while (($k, $v) = each %opt_map) {
-# next unless defined $record->{$v};
-# $rec{$k} = $record->{$v};
-# push @del, $v;
-# }
-# delete @{$record}{@del};
-# @{$record}{keys %rec} = (values %rec);
-# }
-
- return if ! $record->{o_enable};
-
-#::logDebug("option_cost found enabled record");
- my $fsel = $opt_map{sku} || 'sku';
- my $rsel = $db->quote($sku, $fsel);
- my @rf;
- for(qw/o_group price o_master/) {
- push @rf, ($opt_map{$_} || $_);
- }
-
- my $q = "SELECT " . join (",", @rf) . " FROM $table where $fsel = $rsel";
- my $ary = $db->query($q);
- return if ! $ary->[0];
- my $ref;
- my $price = 0;
- my $f;
-
- foreach $ref (@$ary) {
-#::logDebug("checking option " . uneval_it($ref));
- next unless defined $item->{$ref->[0]};
- $ref->[1] =~ s/^\s+//;
- $ref->[1] =~ s/\s+$//;
- $ref->[1] =~ s/==/=:/g;
- my %info = split /\s*[=,]\s*/, $ref->[1];
- if(defined $info{ $item->{$ref->[0]} } ) {
- my $atom = $info{ $item->{$ref->[0]} };
- if($atom =~ s/^://) {
- $f = $atom;
- next;
- }
- elsif ($atom =~ s/\%$//) {
- $f = $final if ! defined $f;
- $f += ($atom * $final / 100);
- }
- else {
- $price += $atom;
- }
- }
- }
-#::logDebug("option_cost returning price=$price f=$f");
- return ($price, $f);
-}
-
sub chain_cost {
my ($item, $raw) = @_;
@@ -1728,12 +1619,7 @@
elsif ($table) {
#::logDebug("before option_cost price=$price final=$final");
my ($p, $f);
- if($item->{mv_mp}) {
- ($p, $f) = modular_cost($item, $table, $final);
- }
- else {
- ($p, $f) = option_cost($item, $table, $final);
- }
+ ($p, $f) = Vend::Options::option_cost($item, $table, $final);
$final = $f if defined $f;
$price = $p || '';
#::logDebug("option_cost returned p=$p f=$f, price=$price final=$final");
@@ -1786,7 +1672,24 @@
return $item->{mv_cache_price}
if ! $quantity and defined $item->{mv_cache_price};
- $item = { 'code' => $item, 'quantity' => ($quantity || 1) } unless ref $item;
+ $item = { 'code' => $item } unless ref $item;
+ $item->{quantity} = 1 if ! defined $item->{quantity};
+
+ if( ! $item->{mv_ib}
+ and $Vend::Cfg->{AutoModifier}
+ and $item->{mv_ib} = product_code_exists_tag($item->{code})
+ )
+ {
+ foreach my $i (@{$Vend::Cfg->{AutoModifier}}) {
+ my ($table,$key) = split /:/, $i;
+ unless ($key) {
+ $key = $table;
+ $table = $item->{mv_ib};
+ }
+ $item->{$key} = ::tag_data($table, $key, $item->{code});
+ }
+#::logDebug("item=" . ::uneval($item));
+ }
my $master;
2.147 +13 -300 interchange/lib/Vend/Interpolate.pm
rev 2.147, prev_rev 2.146
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.146
retrieving revision 2.147
diff -u -r2.146 -r2.147
--- Interpolate.pm 6 Feb 2003 20:27:16 -0000 2.146
+++ Interpolate.pm 12 Feb 2003 03:59:12 -0000 2.147
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.146 2003/02/06 20:27:16 jon Exp $
+# $Id: Interpolate.pm,v 2.147 2003/02/12 03:59:12 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.146 $, 10);
+$VERSION = substr(q$Revision: 2.147 $, 10);
@EXPORT = qw (
@@ -1679,293 +1679,7 @@
return $opt->{success};
}
-sub tag_options {
- my ($sku, $opt) = @_;
- my $item;
- if(ref $sku) {
- $item = $sku;
- $sku = $item->{mv_sku} || $item->{code};
- }
-#::logDebug("entering tag_options for $sku");
-
- $opt = get_option_hash($opt);
-
- my $table = $opt->{table} || $::Variable->{MV_OPTION_TABLE} || 'options';
-
- if($opt->{report}) {
- $opt->{joiner} = ', ' if ! $opt->{joiner};
- $opt->{separator} = ': ' if ! $opt->{separator};
- $opt->{type} = 'display' if ! $opt->{type};
- }
- else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
- }
-
- my $db = $Db{$table} || database_exists_ref($table);
- $db->record_exists($sku)
- or return;
- my $record = $db->row_hash($sku)
- or return;
-#::logDebug("found record for $sku in tag_options");
-
- my $remap;
- my %map;
-
- my $inv_func;
- if($opt->{inventory}) {
- my ($t, $c) = split /[.:]+/, $opt->{inventory};
- my $idb;
- if($idb = database_exists_ref($t)) {
- $inv_func = $idb->field_accessor($c);
- }
- }
-
- if($::Variable->{MV_OPTION_TABLE_MAP}) {
- $remap = $::Variable->{MV_OPTION_TABLE_MAP};
- $remap =~ s/^\s+//;
- $remap =~ s/\s+$//;
- %map = split /[,\s]+/, $remap;
- my %rec;
- my @del;
- my ($k, $v);
- while (($k, $v) = each %map) {
- next unless defined $record->{$v};
- $rec{$k} = $record->{$v};
- push @del, $v;
- }
- delete @{$record}{@del};
- @{$record}{keys %rec} = (values %rec);
- }
-
- my $rsort = '';
- $map{o_sort} ||= 'o_sort';
- if($opt->{sort}) {
- $map{o_sort} = $opt->{sort_field} if $opt->{sort_field};
-
- if(! defined $db->test_column($map{o_sort}) ) {
- logError(
- "item-options sort column '%s' non-existent, unsorted",
- $map{o_sort},
- );
- }
- else {
- $rsort = " ORDER BY $map{o_sort}";
- my $sopt = $opt->{sort_option} || '';
- $rsort .= " DESC" if $sopt =~ /^(r(?:ev(?:erse)?)?|desc(?:ending)?)/i;
- }
- }
-
- return if ! $record->{o_enable};
-#::logDebug("record for $sku says options enabled");
-
- my $out = '';
- my @out;
-
- my @rf;
-
- if($opt->{display_type}) {
- $opt->{display_type} = lc $opt->{display_type};
- }
- elsif (! $record->{o_matrix}) {
- # Do nothing
- }
- elsif ($record->{o_matrix} == 2) {
- $opt->{display_type} = 'separate';
- }
- elsif ($record->{o_matrix}) {
- $opt->{display_type} = 'single';
- }
-
- if($record->{o_matrix} and $opt->{display_type} eq 'separate') {
- for(qw/code o_enable o_group o_value o_label o_widget price/) {
- push @rf, ($map{$_} || $_);
- }
- my @def;
- if($item and $item->{code}) {
- @def = split /-/, $item->{code};
- }
- my $fsel = $map{sku} || 'sku';
- my $rsel = $db->quote($sku, $fsel);
- $rsort ||= " ORDER BY $map{o_sort}";
-
- my $q = "SELECT " .
- join (",", @rf) .
- " FROM $table where $fsel = $rsel $rsort";
-#::logDebug("tag_options separate query: $q");
- my $ary = $db->query($q);
- my $ref;
- my $i = 0;
- my $phony = { %{$item || { }} };
- foreach $ref (@$ary) {
-
- next unless $ref->[3];
-
- # skip based on inventory if enabled
- if($inv_func) {
- my $oh = $inv_func->($ref->[0]);
- next if $oh <= 0;
- }
-
- $i++;
-
- # skip unless o_value
- $phony->{mv_sku} = $def[$i];
-
- if ($opt->{label}) {
- $ref->[4] = "<B>$ref->[4]</b>" if $opt->{bold};
- push @out, $ref->[4];
- }
- push @out, tag_accessories(
- $sku,
- '',
- {
- passed => $ref->[3],
- type => $opt->{type} || $ref->[5] || 'select',
- attribute => 'mv_sku',
- price_data => $ref->[6],
- price => $opt->{price},
- extra => $opt->{extra},
- js => $opt->{js},
- item => $phony,
- },
- $phony || undef,
- );
- }
-
- $phony->{mv_sku} = $sku;
- my $begin = tag_accessories(
- $sku,
- '',
- {
- type => 'hidden',
- attribute => 'mv_sku',
- item => $phony,
- default => $sku,
- },
- $phony,
- );
- if($opt->{td}) {
- for(@out) {
- $out .= "<td>$begin$_</td>";
- $begin = '';
- }
- }
- else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
- $out .= $begin;
- $out .= join $opt->{joiner}, @out;
- }
- }
- elsif($record->{o_matrix}) {
- for(qw/code o_enable o_group description price weight volume differential o_widget/) {
- push @rf, ($map{$_} || $_);
- }
- my $lcol = $map{sku} || 'sku';
- my $lval = $db->quote($sku, $lcol);
-
- $rsort ||= " ORDER BY $map{o_sort}";
-
- my $q = "SELECT " . join(",", @rf);
- $q .= " FROM $table where $lcol = $lval $rsort";
-#::logDebug("tag_options matrix query: $q");
- my $ary = $db->query($q);
- my $ref;
- my $price = {};
- foreach $ref (@$ary) {
-
- # skip unless description
- next unless $ref->[3];
-
- # skip based on inventory if enabled
- if($inv_func) {
- my $oh = $inv_func->($ref->[0]);
- next if $oh <= 0;
- }
-
- $ref->[3] =~ s/,/,/g;
- $ref->[3] =~ s/=/=/g;
- $price->{$ref->[0]} = $ref->[4];
- push @out, "$ref->[0]=$ref->[3]";
- }
- $out .= "<td>" if $opt->{td};
- $out .= tag_accessories(
- $sku,
- '',
- {
- attribute => 'code',
- default => undef,
- extra => $opt->{extra},
- item => $item,
- js => $opt->{js},
- name => 'mv_sku',
- passed => join(",", @out),
- price => $opt->{price},
- price_data => $price,
- type => $opt->{type} || $ref->[8] || 'select',
- },
- $item || undef,
- );
- $out .= "</td>" if $opt->{td};
-#::logDebug("matrix option returning $out");
- }
- elsif($record->{o_modular}) {
-#::logDebug("modular options");
- }
- else {
-#::logDebug("simple options");
- for(qw/code o_enable o_group o_value o_label o_widget price o_height o_width/) {
- push @rf, ($map{$_} || $_);
- }
- my $fsel = $map{sku} || 'sku';
- my $rsel = $db->quote($sku, $fsel);
-
- my $q = "SELECT " . join (",", @rf) . " FROM $table where $fsel = $rsel";
- $q .= $rsort;
-#::logDebug("tag_options simple query: $q");
- my $ary = $db->query($q);
- my $ref;
- foreach $ref (@$ary) {
- # skip unless o_value
- next unless $ref->[3];
- if ($opt->{label}) {
- $ref->[4] = "<B>$ref->[4]</b>" if $opt->{bold};
- push @out, $ref->[4];
- }
- my $precursor = $opt->{report}
- ? "$ref->[2]$opt->{separator}"
- : qq{<input type=hidden name="mv_item_option" value="$ref->[2]">};
- push @out, $precursor . tag_accessories(
- $sku,
- '',
- {
- attribute => $ref->[2],
- default => undef,
- extra => $opt->{extra},
- item => $item,
- js => $opt->{js},
- passed => $ref->[3],
- price => $opt->{price},
- price_data => $ref->[6],
- height => $opt->{height} || $ref->[7],
- width => $opt->{width} || $ref->[8],
- type => $opt->{type} || $ref->[5] || 'select',
- },
- $item || undef,
- );
- }
- if($opt->{td}) {
- for(@out) {
- $out .= "<td>$_</td>";
- }
- }
- else {
- $opt->{joiner} = '<BR>' if ! $opt->{joiner};
- $out .= join $opt->{joiner}, @out;
- }
- }
-#::logDebug("tag_options returns:\n\n$out\n");
- return $out;
-}
+*tag_options = \&Vend::Options::tag_options;
sub produce_range {
my ($ary, $max) = @_;
@@ -4399,7 +4113,7 @@
field => \&Vend::Data::product_field,
last => \&interpolate_html,
next => \&interpolate_html,
- options => \&tag_options,
+ options => \&Vend::Options::tag_options,
);
use vars qw/%Hash_code/;
@@ -6354,7 +6068,7 @@
foreach $i (0 .. $#$Vend::Items) {
$item = $Vend::Items->[$i];
next if is_yes( $item->{mv_nontaxable} );
- next if is_yes( item_common($item, $Vend::Cfg->{NonTaxableField}, 1) );
+ next if is_yes( item_field($item, $Vend::Cfg->{NonTaxableField}) );
$tmp = item_subtotal($item);
unless (defined $Vend::Session->{discount}) {
$taxable += $tmp;
@@ -6784,15 +6498,14 @@
$total += levies();
}
else {
- my $shipping = 0;
- $shipping += tag_shipping()
- if $::Values->{mv_shipmode};
- $shipping += tag_handling()
- if $::Values->{mv_handling};
- $total += subtotal();
- $total += $shipping;
- $total += salestax();
-
+ my $shipping = 0;
+ $shipping += tag_shipping()
+ if $::Values->{mv_shipmode};
+ $shipping += tag_handling()
+ if $::Values->{mv_handling};
+ $total += subtotal();
+ $total += $shipping;
+ $total += salestax();
}
$Vend::Items = $save if defined $save;
$Vend::Session->{latest_total} = $total;
2.44 +26 -4 interchange/lib/Vend/Order.pm
rev 2.44, prev_rev 2.43
Index: Order.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Order.pm,v
retrieving revision 2.43
retrieving revision 2.44
diff -u -r2.43 -r2.44
--- Order.pm 12 Dec 2002 03:39:00 -0000 2.43
+++ Order.pm 12 Feb 2003 03:59:12 -0000 2.44
@@ -1,6 +1,6 @@
# Vend::Order - Interchange order routing routines
#
-# $Id: Order.pm,v 2.43 2002/12/12 03:39:00 mheins Exp $
+# $Id: Order.pm,v 2.44 2003/02/12 03:59:12 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.43 $, 10);
+$VERSION = substr(q$Revision: 2.44 $, 10);
@ISA = qw(Exporter);
@@ -2220,10 +2220,32 @@
my ($table,$key) = split /:/, $i;
unless ($key) {
$key = $table;
- $table = $base;
+ $item->{$key} = item_common($item, $key, $code)
+ }
+ else {
+ $item->{$key} = tag_data($table, $key, $code);
+ }
+ }
+ }
+ if(my $oe = $Vend::Cfg->{OptionsAttribute}) {
+ eval {
+ my $loc = $Vend::Cfg->{Options_repository}{$item->{$oe}};
+ if($loc and $loc->{item_add_routine}) {
+ no strict 'refs';
+ my $sub = \&{"$loc->{item_add_routine}"};
+ if(defined $sub) {
+ $sub->($item, $loc);
}
- $item->{$key} = tag_data($table, $key, $code);
}
+ };
+ if($@) {
+ ::logError(
+ "error during %s (option type %s) item_add_routine: %s",
+ $code,
+ $item->{$oe},
+ $@,
+ );
+ }
}
if($lines[$j] =~ /^\d+$/ and defined $cart->[$lines[$j]] ) {
$cart->[$lines[$j]] = $item;
2.1 interchange/lib/Vend/Options.pm
rev 2.1, prev_rev 2.0
1.1 interchange/lib/Vend/Options/Matrix.pm
rev 1.1, prev_rev 1.0
Index: Matrix.pm
===================================================================
# Vend::Options::Matrix - Interchange Matrix product options
#
# $Id: Matrix.pm,v 1.1 2003/02/12 03:59:13 mheins Exp $
#
# Copyright (C) 2002-2003 Mike Heins <mikeh@perusion.net>
# Copyright (C) 2002-2003 Interchange Development Group <interchange@icdevgroup.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA.
#
package Vend::Options::Matrix;
$VERSION = substr(q$Revision: 1.1 $, 10);
=head1 Interchange Matrix Options Support
Vend::Options::Matrix $Revision: 1.1 $
=head1 SYNOPSIS
[item-options]
or
[price code=SKU]
=head1 PREREQUISITES
Vend::Options
=head1 DESCRIPTION
The Vend::Options::Matrix module implements matrix product options for
Interchange. It is compatible with Interchange 4.8.x matrix options.
If the Interchange Variable MV_OPTION_TABLE is not set, it defaults
to "options", which combines options for Simple, Matrix, and
Modular into that one table. This goes along with foundation and
construct demos up until Interchange 4.9.8.
The "options" table remains the default for matrix options.
=head1 AUTHORS
Mike Heins <mikeh@perusion.net>
=head1 CREDITS
Jon Jensen <jon@swelter.net>
=cut
use Vend::Util;
use Vend::Data;
use Vend::Interpolate;
use Vend::Options;
use strict;
use vars qw/%Default/;
%Default = (
no_pricing => 1,
item_add_routine => 'Vend::Options::Matrix::testit',
table => 'options',
variant_table => 'variants',
sort => 'o_sort,o_group',
);
my $Admin_page;
sub price_options { }
sub testit {
::logDebug("triggered routine testit! args=" . ::uneval(\@_));
}
sub display_options {
my ($item, $opt, $loc) = @_;
#::logDebug("Matrix options by module");
my $sku = $item->{mv_sku} || $item->{code};
$loc ||= $Vend::Cfg->{Options_repository}{Matrix} || \%Default;
my $map = $loc->{map} || {};
my $tab = $opt->{table} ||= $loc->{table} || 'options';
my $db = database_exists_ref($tab)
or do {
logOnce(
"Matrix options: unable to find table %s for item %s",
$tab,
$sku,
);
return undef;
};
my $record;
if($db->record_exists($sku)) {
$record = $db->row_hash($sku)
}
else {
$record = {};
for(qw/display_type/) {
$record->{$_} = $loc->{$_};
}
}
my $tname = $db->name();
$opt->{display_type} ||= $record->{display_type};
$opt->{display_type} = lc $opt->{display_type};
my @rf;
my @out;
my $out;
my $rsort = find_sort($opt, $db, $loc);
my $inv_func;
use constant {
SEP_CODE => 0,
SEP_GROUP => 1,
SEP_VALUE => 2,
SEP_LABEL => 3,
SEP_WIDGET => 4,
SEP_PRICE => 5,
SEP_WHOLE => 6,
CODE => 0,
DESCRIPTION => 1,
PRICE => 2,
};
#::logDebug("ready to query options");
if($opt->{display_type} eq 'separate') {
for(qw/code o_group o_value o_label o_widget price wholesale/) {
push @rf, ($map->{$_} || $_);
}
my @def;
if($item and $item->{code}) {
@def = split /-/, $item->{code};
}
my $fsel = $map->{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my $q = "SELECT " .
join (",", @rf) .
" FROM $tname where $fsel = $rsel $rsort";
#::logDebug("tag_options matrix query: $q");
my $ary = $db->query($q);
#::logDebug("tag_options matrix ary: " . ::uneval($ary));
my $ref;
my $i = 0;
my $phony = { %{$item || { }} };
foreach $ref (@$ary) {
next unless $ref->[SEP_VALUE];
# skip based on inventory if enabled
if($inv_func) {
my $oh = $inv_func->($ref->[SEP_CODE]);
next if $oh <= 0;
}
$i++;
# skip unless o_value
$phony->{mv_sku} = $def[$i];
if ($opt->{label}) {
$ref->[SEP_LABEL] = "<B>$ref->[SEP_LABEL]</b>" if $opt->{bold};
push @out, $ref->[SEP_LABEL];
}
push @out, Vend::Interpolate::tag_accessories(
$sku,
'',
{
passed => $ref->[SEP_VALUE],
type => $opt->{type} || $ref->[SEP_WIDGET] || 'select',
attribute => 'mv_sku',
price_data => $ref->[SEP_PRICE],
price => $opt->{price},
extra => $opt->{extra},
js => $opt->{js},
item => $phony,
},
$phony || undef,
);
}
$phony->{mv_sku} = $sku;
my $begin = Vend::Interpolate::tag_accessories(
$sku,
'',
{
type => 'hidden',
attribute => 'mv_sku',
item => $phony,
default => $sku,
},
$phony,
);
if($opt->{td}) {
for(@out) {
$out .= "<td>$begin$_</td>";
$begin = '';
}
}
else {
$opt->{joiner} = '<BR>' if ! $opt->{joiner};
$out .= $begin;
$out .= join $opt->{joiner}, @out;
}
}
else {
my $vtab = $opt->{variant_table} || $loc->{variant_table};
my $vdb = database_exists_ref($vtab)
or do {
logOnce(
"Matrix options: unable to find variant table %s for item %s",
$vtab,
$sku,
);
return undef;
};
$opt->{type} ||= $record->{widget};
for(qw/code description price/) {
push @rf, ($map->{$_} || $_);
}
my $ccol = $map->{code} || 'code';
my $cval = $vdb->quote("$sku-%");
my $lcol = $map->{sku} || 'sku';
my $lval = $vdb->quote($sku, $lcol);
my $vname = $vdb->name();
my $q = "SELECT " . join(",", @rf);
$q .= " FROM $vname where $lcol = $lval AND $ccol like $cval $rsort";
#::logDebug("tag_options matrix query: $q");
my $ary = $vdb->query($q);
#::logDebug("tag_options matrix ary: " . ::uneval($ary));
my $ref;
my $price = {};
foreach $ref (@$ary) {
# skip unless description
next unless $ref->[DESCRIPTION];
# skip based on inventory if enabled
if($inv_func) {
my $oh = $inv_func->($ref->[CODE]);
next if $oh <= 0;
}
my $desc = $ref->[DESCRIPTION];
$desc =~ s/,/,/g;
$desc =~ s/=/=/g;
$price->{$ref->[CODE]} = $ref->[PRICE];
push @out, "$ref->[CODE]=$desc";
}
$out .= "<td>" if $opt->{td};
$out .= Vend::Interpolate::tag_accessories(
$sku,
'',
{
attribute => 'code',
default => undef,
extra => $opt->{extra},
item => $item,
js => $opt->{js},
name => 'mv_sku',
passed => join(",", @out),
price => $opt->{price},
price_data => $price,
type => $opt->{type} || 'select',
},
$item || undef,
);
$out .= "</td>" if $opt->{td};
#::logDebug("matrix option returning $out");
}
return $out;
}
sub admin_page {
my $item = shift;
my $opt = shift;
my $page = $Tag->file('include/Options/Matrix') || $Admin_page;
Vend::Util::parse_locale(\$page);
return interpolate_html($page);
}
$Admin_page = <<'EoAdminPage';
EoAdminPage
1;
1.1 interchange/lib/Vend/Options/Old48.pm
rev 1.1, prev_rev 1.0
Index: Old48.pm
===================================================================
# Vend::Options::Old48 - Interchange 4.8 compatible product options
#
# $Id: Old48.pm,v 1.1 2003/02/12 03:59:13 mheins Exp $
#
# Copyright (C) 2002-2003 Mike Heins <mikeh@perusion.net>
# Copyright (C) 2002-2003 Interchange Development Group <interchange@icdevgroup.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA.
#
package Vend::Options::Old48;
$VERSION = substr(q$Revision: 1.1 $, 10);
=head1 Interchange Compatibility Options Support
Vend::Options::Old48 $Revision: 1.1 $
=head1 SYNOPSIS
[item-options]
or
[price code=SKU]
=head1 PREREQUISITES
Vend::Options
=head1 DESCRIPTION
The Vend::Options::Old48 module implements simple and matrix product
options for Interchange. It is compatible with Interchange 4.8.x
matrix options. Newer versions use Simple and Matrix options instead.
If the Interchange Variable MV_OPTION_TABLE is not set, it defaults
to "options", which combines options for Simple, Matrix, and
Modular into that one table. This goes along with foundation and
construct demos up until Interchange 4.9.8.
The "options" table remains the default for matrix options.
=head1 AUTHORS
Mike Heins <mikeh@perusion.net>
=head1 CREDITS
Jon Jensen <jon@swelter.net>
=cut
use Vend::Util;
use Vend::Data;
use Vend::Interpolate;
use Vend::Options;
sub option_cost {
my ($item, $opt) = @_;
}
sub display_options_matrix {
my ($item, $opt, $loc) = @_;
$loc ||= $Vend::Cfg->{Options_repository}{Old48} || \%Default;
#::logDebug("Matrix options by module, old");
my $sku = $item->{mv_sku} || $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} || $::Variable->{MV_OPTION_TABLE} || 'options';
$db = database_exists_ref($tab)
or do {
logOnce(
"Matrix options: unable to find table %s for item %s",
$tab,
$sku,
);
return undef;
};
}
my $record;
if(not $record = $opt->{options_record}) {
$db->record_exists($sku)
or do {
logOnce(
"Matrix options: unable to find record in table %s for item %s",
$tab,
$sku,
);
return;
};
$record = $db->row_hash($sku) || {};
}
my $tname = $db->name();
if(not $opt->{display_type} ||= $record->{display_type}) {
$opt->{display_type} = $record->{o_matrix} == 2 ? 'separate' : 'single';
}
$opt->{display_type} = lc $opt->{display_type};
my $map;
if(not $map = $opt->{options_map}) {
$map = $opt->{options_map} = {};
if(my $remap = $opt->{remap} || $::Variable->{MV_OPTION_TABLE_MAP}) {
remap_option_record($record, $map, $remap);
}
}
my @rf;
my @out;
my $out;
my $rsort = find_sort($opt, $db, $loc);
if($opt->{display_type} eq 'separate') {
for(qw/code o_enable o_group o_value o_label o_widget price/) {
push @rf, ($map->{$_} || $_);
}
my @def;
if($item and $item->{code}) {
@def = split /-/, $item->{code};
}
my $fsel = $map->{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my $q = "SELECT " .
join (",", @rf) .
" FROM $tname where $fsel = $rsel $rsort";
#::logDebug("tag_options matrix query: $q");
my $ary = $db->query($q);
#::logDebug("tag_options matrix ary: " . ::uneval($ary));
my $ref;
my $i = 0;
my $phony = { %{$item || { }} };
foreach $ref (@$ary) {
next unless $ref->[3];
# skip based on inventory if enabled
if($inv_func) {
my $oh = $inv_func->($ref->[0]);
next if $oh <= 0;
}
$i++;
# skip unless o_value
$phony->{mv_sku} = $def[$i];
if ($opt->{label}) {
$ref->[4] = "<B>$ref->[4]</b>" if $opt->{bold};
push @out, $ref->[4];
}
push @out, Vend::Interpolate::tag_accessories(
$sku,
'',
{
passed => $ref->[3],
type => $opt->{type} || $ref->[5] || 'select',
attribute => 'mv_sku',
price_data => $ref->[6],
price => $opt->{price},
extra => $opt->{extra},
js => $opt->{js},
item => $phony,
},
$phony || undef,
);
}
$phony->{mv_sku} = $sku;
my $begin = Vend::Interpolate::tag_accessories(
$sku,
'',
{
type => 'hidden',
attribute => 'mv_sku',
item => $phony,
default => $sku,
},
$phony,
);
if($opt->{td}) {
for(@out) {
$out .= "<td>$begin$_</td>";
$begin = '';
}
}
else {
$opt->{joiner} = '<BR>' if ! $opt->{joiner};
$out .= $begin;
$out .= join $opt->{joiner}, @out;
}
}
else {
for(qw/code o_enable o_group description price weight volume differential o_widget/) {
push @rf, ($map->{$_} || $_);
}
my $ccol = $map->{code} || 'code';
my $cval = $db->quote("$sku-%");
my $lcol = $map->{sku} || 'sku';
my $lval = $db->quote($sku, $lcol);
my $q = "SELECT " . join(",", @rf);
$q .= " FROM $tname where $lcol = $lval AND $ccol like $cval $rsort";
#::logDebug("tag_options matrix query: $q");
my $ary = $db->query($q);
#::logDebug("tag_options matrix ary: " . ::uneval($ary));
my $ref;
my $price = {};
foreach $ref (@$ary) {
# skip unless description
next unless $ref->[3];
# skip based on inventory if enabled
if($inv_func) {
my $oh = $inv_func->($ref->[0]);
next if $oh <= 0;
}
$ref->[3] =~ s/,/,/g;
$ref->[3] =~ s/=/=/g;
$price->{$ref->[0]} = $ref->[4];
push @out, "$ref->[0]=$ref->[3]";
}
$out .= "<td>" if $opt->{td};
$out .= Vend::Interpolate::tag_accessories(
$sku,
'',
{
attribute => 'code',
default => undef,
extra => $opt->{extra},
item => $item,
js => $opt->{js},
name => 'mv_sku',
passed => join(",", @out),
price => $opt->{price},
price_data => $price,
type => $opt->{type} || $ref->[8] || 'select',
},
$item || undef,
);
$out .= "</td>" if $opt->{td};
#::logDebug("matrix option returning $out");
}
return $out;
}
sub price_options {
my ($item, $table, $final, $loc) = @_;
#::logDebug("option_cost table=$table");
$loc ||= $Vend::Cfg->{Options_repository}{Old48} || {};
my $sku = $item->{mv_sku} || $item->{code};
my $db = database_exists_ref($table)
or return undef;
#::logDebug("option_cost db=$db");
my $map = $loc->{map} || {};
my $fsel = $map->{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my @rf;
for(qw/o_group price/) {
push @rf, ($map->{$_} || $_);
}
my $q = "SELECT " . join (",", @rf) . " FROM $table where $fsel = $rsel and $rf[1] != ''";
#::logDebug("option_cost query=$q");
my $ary = $db->query($q);
return if ! $ary->[0];
my $ref;
my $price = 0;
my $f;
foreach $ref (@$ary) {
#::logDebug("checking option " . uneval_it($ref));
next unless defined $item->{$ref->[0]};
$ref->[1] =~ s/^\s+//;
$ref->[1] =~ s/\s+$//;
$ref->[1] =~ s/==/=:/g;
my %info = split /\s*[=,]\s*/, $ref->[1];
if(defined $info{ $item->{$ref->[0]} } ) {
my $atom = $info{ $item->{$ref->[0]} };
if($atom =~ s/^://) {
$f = $atom;
next;
}
elsif ($atom =~ s/\%$//) {
$f = $final if ! defined $f;
$f += ($atom * $final / 100);
}
else {
$price += $atom;
}
}
}
#::logDebug("option_cost returning price=$price f=$f");
return ($price, $f);
}
sub display_options_simple {
my ($item, $opt) = @_;
#::logDebug("Simple options, item=" . ::uneval($item) . "\nopt=" . ::uneval($opt));
my $map = $opt->{options_map} ||= {};
#::logDebug("Simple options by module, old");
my $sku = $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} ||= $::Variable->{MV_OPTION_TABLE_SIMPLE}
||= $::Variable->{MV_OPTION_TABLE}
||= 'options';
$db = database_exists_ref($tab)
or do {
logOnce(
"Simple options: unable to find table %s for item %s",
$tab,
$sku,
);
return undef;
};
}
my $tname = $db->name();
my @rf;
my @out;
my $out;
my $ishash = defined $item->{mv_ip} ? 1 : 0;
for(qw/code o_enable o_group o_value o_label o_widget price o_height o_width/) {
push @rf, ($map->{$_} || $_);
}
my $fsel = $map->{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my $q = "SELECT " . join (",", @rf) . " FROM $tname where $fsel = $rsel";
if(my $rsort = find_sort($opt)) {
$q .= $rsort;
}
#::logDebug("tag_options simple query: $q");
my $ary = $db->query($q)
or return;
my $ref;
foreach $ref (@$ary) {
# skip unless o_value
next unless $ref->[3];
if ($opt->{label}) {
$ref->[4] = "<B>$ref->[4]</b>" if $opt->{bold};
push @out, $ref->[4];
}
my $precursor = $opt->{report}
? "$ref->[2]$opt->{separator}"
: qq{<input type=hidden name="mv_item_option" value="$ref->[2]">};
push @out, $precursor . Vend::Interpolate::tag_accessories(
$sku,
'',
{
attribute => $ref->[2],
default => undef,
extra => $opt->{extra},
item => $item,
name => $ishash ? undef : "mv_order_$ref->[2]",
js => $opt->{js},
passed => $ref->[3],
price => $opt->{price},
price_data => $ref->[6],
height => $opt->{height} || $ref->[7],
width => $opt->{width} || $ref->[8],
type => $opt->{type} || $ref->[5] || 'select',
},
$item || undef,
);
}
if($opt->{td}) {
for(@out) {
$out .= "<td>$_</td>";
}
}
else {
$opt->{joiner} = '<BR>' if ! $opt->{joiner};
$out .= join $opt->{joiner}, @out;
}
return $out;
}
1;
1.1 interchange/lib/Vend/Options/Simple.pm
rev 1.1, prev_rev 1.0
Index: Simple.pm
===================================================================
# Vend::Options::Simple - Interchange Simple product options
#
# $Id: Simple.pm,v 1.1 2003/02/12 03:59:13 mheins Exp $
#
# Copyright (C) 2002-2003 Mike Heins <mikeh@perusion.net>
# Copyright (C) 2002-2003 Interchange Development Group <interchange@icdevgroup.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA.
#
package Vend::Options::Simple;
$VERSION = substr(q$Revision: 1.1 $, 10);
=head1 Interchange Simple Options Support
Vend::Options::Simple $Revision: 1.1 $
=head1 SYNOPSIS
[item-options]
or
[price code=SKU]
=head1 PREREQUISITES
Vend::Options
=head1 DESCRIPTION
The Vend::Options::Simple module implements simple product options for
Interchange. It is compatible with Interchange 4.8.x simple options.
If the Interchange Variable MV_OPTION_TABLE is not set, it defaults
to "options", which combines options for Simple, Matrix, and
Modular into that one table. This goes along with foundation and
construct demos up until Interchange 4.9.8.
The "options" table remains the default for simple options.
=head1 AUTHORS
Mike Heins <mikeh@perusion.net>
=head1 CREDITS
Jon Jensen <jon@swelter.net>
=cut
use Vend::Util;
use Vend::Data;
use Vend::Interpolate;
use Vend::Options;
use strict;
use vars qw/%Default/;
%Default = (
option_template => '{LABEL} {PRICE?}({NEGATIVE?}subtract{/NEGATIVE?}{NEGATIVE:}add{/NEGATIVE:} {ABSOLUTE}) {/PRICE?}'
);
my $Admin_page;
sub price_options {
my ($item, $table, $final, $loc) = @_;
$loc ||= $Vend::Cfg->{Options_repository}{Simple} || {};
my $map = $loc->{map} || {};
my $db = database_exists_ref($table || $loc->{table} || 'options');
if(! $db) {
logOnce('Non-existent price option table %s', $table);
return;
}
my $tname = $db->name();
my $sku = $item->{code};
#::logDebug("Simple module price_options found enabled record");
my $fsel = $map->{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my @rf;
for(qw/o_group price/) {
push @rf, ($map->{$_} || $_);
}
my $q = "SELECT " . join (",", @rf) . " FROM $tname where $fsel = $rsel and $rf[1] != ''";
#::logDebug("Simple module price_options query=$q");
my $ary = $db->query($q);
return if ! $ary->[0];
my $ref;
my $price = 0;
my $f;
foreach $ref (@$ary) {
#::logDebug("checking option " . uneval_it($ref));
next unless defined $item->{$ref->[0]};
next unless length($ref->[1]);
$ref->[1] =~ s/^\s+//;
$ref->[1] =~ s/\s+$//;
$ref->[1] =~ s/==/=:/g;
my %info = split /\s*[=,]\s*/, $ref->[1];
if(defined $info{ $item->{$ref->[0]} } ) {
my $atom = $info{ $item->{$ref->[0]} };
if($atom =~ s/^://) {
$f = $atom;
next;
}
elsif ($atom =~ s/\%$//) {
$f = $final if ! defined $f;
$f += ($atom * $final / 100);
}
else {
$price += $atom;
}
}
}
#::logDebug("price_options returning price=$price f=$f");
return ($price, $f);
}
sub display_options {
my ($item, $opt, $loc) = @_;
#::logDebug("Simple options, item=" . ::uneval($item) . "\nopt=" . ::uneval($opt));
#::logDebug("Simple options by module, old");
$loc ||= $Vend::Cfg->{Options_repository}{Simple} || {};
my $map = $loc->{map} || {};
my $sku = $item->{code};
my $db;
my $tab;
if(not $db = $opt->{options_db}) {
$tab = $opt->{table} ||= $loc->{table}
||= $::Variable->{MV_OPTION_TABLE}
||= 'options';
$db = database_exists_ref($tab)
or do {
logOnce(
"Simple options: unable to find table %s for item %s",
$tab,
$sku,
);
return undef;
};
}
my $tname = $db->name();
my @rf;
my @out;
my $out;
use constant CODE => 0;
use constant GROUP => 1;
use constant VALUE => 2;
use constant LABEL => 3;
use constant WIDGET => 4;
use constant PRICE => 5;
use constant HEIGHT => 6;
use constant WIDTH => 7;
for(qw/code o_group o_value o_label o_widget price o_height o_width/) {
push @rf, ($map->{$_} || $_);
}
my $fsel = $map->{sku} || 'sku';
my $rsel = $db->quote($sku, $fsel);
my $q = "SELECT " . join (",", @rf) . " FROM $tname where $fsel = $rsel";
if(my $rsort = find_sort($opt, $db, $loc)) {
$q .= $rsort;
}
#::logDebug("tag_options simple query: $q");
my $ary = $db->query($q)
or return;
#::logDebug("tag_options simple ary: " . ::uneval($ary));
#::logDebug("tag_options item=" . ::uneval($item));
my $ishash = defined $item->{mv_ip} ? 1 : 0;
my $ref;
$opt->{option_template} ||= $loc->{option_template};
foreach $ref (@$ary) {
# skip unless o_value
next unless $ref->[VALUE];
#::logDebug("tag_options attribute=" . GROUP);
if ($opt->{label}) {
$ref->[LABEL] = "<B>$ref->[LABEL]</b>" if $opt->{bold};
push @out, $ref->[LABEL];
}
my $precursor = $opt->{report}
? "$ref->[GROUP]$opt->{separator}"
: qq{<input type=hidden name="mv_item_option" value="$ref->[GROUP]">};
push @out, $precursor . Vend::Interpolate::tag_accessories(
$sku,
'',
{
attribute => $ref->[GROUP],
default => undef,
extra => $opt->{extra},
item => $item,
js => $opt->{js},
name => $ishash ? undef : "mv_order_$ref->[GROUP]",
option_template => $opt->{option_template},
passed => $ref->[VALUE],
price => $opt->{price},
price_data => $ref->[PRICE],
height => $opt->{height} || $ref->[HEIGHT],
width => $opt->{width} || $ref->[WIDTH],
type => $opt->{type} || $ref->[WIDGET] || 'select',
},
$item || undef,
);
}
if($opt->{td}) {
for(@out) {
$out .= "<td>$_</td>";
}
}
else {
$opt->{joiner} = '<BR>' if ! $opt->{joiner};
$out .= join $opt->{joiner}, @out;
}
#::logDebug("display_options out size=" . length($out));
return $out;
}
sub admin_page {
my $item = shift;
my $opt = shift;
my $page = $Tag->file('include/Options/Simple') || $Admin_page;
Vend::Util::parse_locale(\$page);
return interpolate_html($page);
}
$Admin_page = <<'EoAdminPage';
[update values]
[if cgi ui_clone_options]
[and cgi ui_clone_id]
[perl interpolate=1 tables="[cgi mv_data_table]"]
my $db = $Db{[cgi mv_data_table]}
or return;
my ($k,$v);
$db->clone_row($CGI->{ui_clone_id}, $CGI->{sku});
$db->clone_set('sku', $CGI->{ui_clone_id}, $CGI->{sku});
return;
[/perl]
[/if]
[if cgi sku]
[tag flag write]options[/tag]
[perl tables="options __UI_ITEM_TABLES__"]
my $otab = 'options';
my $odb = $Db{$otab};
foreach(sort keys %{$CGI}) {
next unless /^opt_group_(.*)/;
my $key = $1;
my $name = $CGI->{"opt_group_$key"};
my $value = $CGI->{"opt_value_$key"};
my $label = $CGI->{"opt_label_$key"};
next unless $name && $value;
unless($key) { $key = $CGI->{sku}."-$name"; }
my @value = split("\r\n",$value);
my %seen = ();
my $hasdefault = 0;
my($left,$right);
map {
my $default = 0;
s/[,\r\n]//g;
if(s/\*//g) { $default = 1; $hasdefault = 1; }
if($v) {
if(/=/) {
($left,$right) = split('=',$_);
} else {
$right = $_;
$left = substr($right,0,3);
}
while($seen{$left}++) { $left++; }
$_ = join('=',$left,$right);
if($default) { $_ .= "*"; }
}
} @value;
my $value = join(",\n",@value);
$key =~ s/_/-/g; # javascript won't handle form names with '-'
$odb->set_field($key,'sku',$CGI->{sku});
$odb->set_field($key,'o_group',$name);
$odb->set_field($key,'o_value',$value);
$odb->set_field($key,'o_widget','select');
$odb->set_field($key,'o_label',$label);
}
return '';
[/perl]
[/if]
<FORM ACTION="[area @@MV_PAGE@@]" METHOD="post">
[if scratch ui_failure]
<P>
<BLOCKQUOTE>
<FONT COLOR="__CONTRAST__">[scratch ui_failure][set ui_failure][/set]</FONT>
</BLOCKQUOTE>
<P>
[/if]
[if scratch ui_message]
<P>
<BLOCKQUOTE>
<FONT COLOR="__CONTRAST__">[scratch ui_message][set ui_message][/set]</FONT>
</BLOCKQUOTE>
<P>
[/if]
<INPUT TYPE=hidden NAME=sku VALUE="[cgi item_id]">
<INPUT TYPE=hidden NAME=ui_page_title VALUE="[cgi ui_page_title]">
<INPUT TYPE=hidden NAME=ui_page_title VALUE="[cgi ui_page_banner]">
<INPUT TYPE=hidden NAME=ui_return_to VALUE="@@MV_PAGE@@">
<INPUT TYPE=hidden NAME=mv_action VALUE=back>
<TABLE BORDER=0><TR><TD VALIGN=TOP>
[query list=1 sql="select * from options where sku='[filter op=sql interpolate=1][cgi item_id][/filter]' and o_group is not null"]
[list]
[if-sql-data options o_group]
[calc] $Scratch->{mod_code} = q{[sql-code]}; $Scratch->{mod_code} =~ s/-/_/g; return;[/calc]
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 BGCOLOR="[sql-alternate 2]__UI_T_ROW_EVEN__[else]__UI_T_ROW_ODD__[/else][/sql-alternate]">
<TR><TD VALIGN=CENTER>Name: <INPUT TYPE=text SIZE=20 NAME="opt_group_[scratch mod_code]" VALUE="[filter entities][sql-param o_group][/filter]">
<A HREF="[area href='@@MV_PAGE@@'
form='deleterecords=1
ui_delete_id=[sql-code]
item_id=[cgi item_id]
mv_data_table=options
mv_click=db_maintenance
mv_action=back
mv_nextpage=@@MV_PAGE@@
'
]"><IMG SRC="delete.gif" ALT="[L]Delete[/L]" ALIGN=CENTER BORDER=0></A>
<br>[L]Label[/L]: <INPUT TYPE=text SIZE=20 NAME="opt_label_[scratch mod_code]" VALUE="[filter entities][sql-param o_label][/filter]">
<INPUT TYPE=hidden NAME="reset_[scratch mod_code]" VALUE="[filter entities][sql-param o_label][/filter]">
<script><!--
document.write('<br><INPUT TYPE=checkbox [sql-calc]q{[sql-param o_label]} eq q{[sql-param o_group]} ? 'CHECKED' : undef;[/sql-calc]\n' +
' onClick="if (this.checked) { this.form.opt_label_[scratch mod_code].value = this.form.opt_group_[scratch mod_code].value; } else { this.form.opt_label_[scratch mod_code].value = this.form.reset_[scratch mod_code].value; }">\n' +
'<font size=2>[L]Set label to name[/L]</font>');
// -->
</script>
</TD></TR>
[tmp o_value][perl]
my @vals = split(',',q{[sql-param o_value]});
map { s/[\r\n]//g; } @vals;
return join("\n",@vals);
[/perl][/tmp]
<TR><TD>
<TEXTAREA ROWS=5 COLS=30 NAME="opt_value_[scratch mod_code]">[scratch o_value]</TEXTAREA><br>
[page href="admin/flex_editor"
form="
mv_data_table=options
item_id=[sql-code]
ui_return_to=admin/item_option
ui_return_to=item_id=[cgi item_id]
ui_data_fields=code o_widget o_width o_height
"]Widget type edit</A>
</TD></TR>
</TABLE>
[/if-sql-data]
[/list]
[/query]
<BR><BR><BR>
[button text="[L]Commit Changes[/L]"]
</TD><TD><PRE> </PRE></TD><TD VALIGN=TOP>
<B>[L]Create a new option[/L]:</B><BR>
[L]Name[/L]: <INPUT TYPE=text SIZE=20 NAME="opt_group_" VALUE="">
<br>[L]Label[/L]: <INPUT TYPE=text SIZE=20 NAME="opt_label_">
<script><!--
document.write('<br><INPUT TYPE=checkbox\n' +
' onClick="if (this.checked) { this.form.opt_label_.value = this.form.opt_group_.value; } else { this.form.opt_label_.value = \'\'; }">\n' +
'<font size=2>[L]Set label to name[/L]</font>');
// -->
</script>
<BR>
<TEXTAREA ROWS=5 COLS=30 NAME="opt_value_"></TEXTAREA>
<BR>
[button text="[L]Create option[/L]"]
<BR><BR>
<HR>
<BR><BR><B>[L]Clone an existing option set[/L]:</B><BR>
[query
list=1
prefix=clone
sql="select DISTINCT sku from [cgi mv_data_table]"
more=1]
<SELECT NAME=ui_clone_id>
<OPTION VALUE=""> --
[list]
[if-clone-data options o_enable]
<OPTION VALUE="[clone-code]">[clone-filter 20][clone-description][/clone-filter]
[/if-clone-data]
[/list]
</SELECT>[more-list]<BR>[more]<BR>[/more-list][/query] [button text="[L]Clone options[/L]"]<BR>
</FORM>
</TD></TR></TABLE>
EoAdminPage
1;
1.26 +3 -2 interchange/lib/Vend/Table/Editor.pm
rev 1.26, prev_rev 1.25
Index: Editor.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Editor.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- Editor.pm 9 Feb 2003 21:43:29 -0000 1.25
+++ Editor.pm 12 Feb 2003 03:59:13 -0000 1.26
@@ -1,6 +1,6 @@
# Vend::Table::Editor - Swiss-army-knife table editor for Interchange
#
-# $Id: Editor.pm,v 1.25 2003/02/09 21:43:29 mheins Exp $
+# $Id: Editor.pm,v 1.26 2003/02/12 03:59:13 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.25 $, 10);
+$VERSION = substr(q$Revision: 1.26 $, 10);
use Vend::Util;
use Vend::Interpolate;
@@ -772,6 +772,7 @@
dir_only => 1,
secure => $Vend::admin && $::Variable->{UI_SECURE},
});
+ $opt->{clear_image} ||= 'bg.gif';
my $clear = "$ibase/$opt->{clear_image}";
my @dntabs;
my @uptabs;