0.12_24 commit r0_12_25
authorTony Cook <tony@develop-help.com>
Fri, 4 Apr 2003 02:14:00 +0000 (02:14 +0000)
committertony <tony@45cb6cf1-00bc-42d2-bb5a-07f51df49f94>
Fri, 4 Apr 2003 02:14:00 +0000 (02:14 +0000)
23 files changed:
.cvsignore
MANIFEST
Makefile
schema/bse.sql
site/cgi-bin/admin/add.pl
site/cgi-bin/modules/Article.pm
site/cgi-bin/modules/BSE/CustomBase.pm
site/cgi-bin/modules/BSE/DB/Mysql.pm
site/cgi-bin/modules/BSE/Edit/Article.pm
site/cgi-bin/modules/BSE/Shop/Util.pm
site/cgi-bin/modules/Generate.pm
site/cgi-bin/modules/Util.pm
site/cgi-bin/shop.pl
site/docs/bse.pod
site/docs/config.pod
site/templates/admin/add_product.tmpl
site/templates/admin/article_custom.tmpl [new file with mode: 0644]
site/templates/admin/catalog_custom.tmpl [new file with mode: 0644]
site/templates/admin/edit_1.tmpl
site/templates/admin/edit_2.tmpl
site/templates/admin/edit_catalog.tmpl
site/templates/admin/edit_product.tmpl
site/templates/admin/product_custom.tmpl [new file with mode: 0644]

index 5051121464593f36b7dfd2014dcfe9b6d70a9170..1d69749e589827aa7a25890a9b0d3f1ec6127248 100644 (file)
@@ -1,3 +1,4 @@
 INSTALL.html
 INSTALL.txt
 test-gosv.cfg
+test-tryandbyte.cfg
index 2f227bbb4d10a5212b2ec57ba59a396a4cbeb20e..f25ce4fce145a9554a2f7d1c084eb9bab721caed 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -191,8 +191,10 @@ site/htdocs/js/validate.js
 site/templates/1/shop_multicat.tmpl
 site/templates/1/sitemap.tmpl
 # site/templates/admin/add_product.tmpl
+site/templates/admin/article_custom.tmpl
 site/templates/admin/article_img.tmpl
 site/templates/admin/catalog.tmpl  # embedded in the shopadmin catalog/product display
+site/templates/admin/catalog_custom.tmpl
 site/templates/admin/edit_0.tmpl
 site/templates/admin/edit_1.tmpl
 site/templates/admin/edit_2.tmpl
@@ -212,6 +214,7 @@ site/templates/admin/order_detail.tmpl
 site/templates/admin/order_list.tmpl
 site/templates/admin/order_list_filled.tmpl
 site/templates/admin/order_list_unfilled.tmpl
+site/templates/admin/product_custom.tmpl
 site/templates/admin/product_detail.tmpl
 site/templates/admin/product_list.tmpl
 site/templates/admin/regenerror.tmpl
index d87b511e00a225cc885e5d4c4d47c0c4b17955ef..6ce1c95020f6ad71994462e4bc0b2ff230098f9a 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION=0.12_24
+VERSION=0.12_25
 DISTNAME=bse-$(VERSION)
 DISTBUILD=$(DISTNAME)
 DISTTAR=../$(DISTNAME).tar
index 1a51ca4fc7b8265eca58d0c027ebb8aaa614661a..78a754ed12b544f29003bef7854161c5d5cb95ea 100644 (file)
@@ -61,6 +61,13 @@ CREATE TABLE article (
   -- used by code and templates
   flags varchar(80) not null default '',
 
+  -- custom fields for local usage
+  customDate1 datetime null,
+  customDate2 datetime null,
+
+  customStr1 varchar(255) null,
+  customStr2 varchar(255) null,
+
   PRIMARY KEY (id),
 
   -- if we keep id in the indexes MySQL will sometimes be able to
index c3679b7dfa5a95806f580f79cf62befeb71d6f0a..d34b98203154af2d789af6d951235bacdf8e6c1f 100755 (executable)
@@ -9,6 +9,7 @@ use Article;
 use BSE::DB;
 use BSE::Request;
 use BSE::Template;
+use Carp qw'verbose';
 use Carp 'confess';
 
 #  $SIG{__DIE__} = 
index 7d18a8d280c4e0f40f954ecd47ae4ea00d0c099e..54ef92812a1fe788eadfba8e0a6a6ebbbcc460bb 100644 (file)
@@ -9,7 +9,8 @@ sub columns {
   return qw/id parentid displayOrder title titleImage body
     thumbImage thumbWidth thumbHeight imagePos
     release expire keyword template link admin threshold
-    summaryLength generator level listed lastModified flags/;
+    summaryLength generator level listed lastModified flags
+    customDate1 customDate2 customStr1 customStr2/;
 }
 
 sub step_parents {
index 58809b996383b07c39b6857466a3326eca045b65..9269d4bf74bd147f49c1cea94f78ff5982a2494c 100644 (file)
@@ -1,6 +1,14 @@
 package BSE::CustomBase;
 use strict;
 
+sub new {
+  my ($class, %params) = @_;
+
+  exists $params{cfg} or die "No cfg parameter passed to custom class constructor";
+
+  return bless \%params, $class;
+}
+
 sub enter_cart {
   my ($class, $items, $products, $state, $cfg) = @_;
 
@@ -63,6 +71,38 @@ sub base_tags {
   return ();
 }
 
+# called to validate fields for a custom application
+#   $cfg - a BSE::Cfg object
+#   $new - the new data to be stored
+#   $old - the existing article if any
+#   $type - the type of article (Article, Product, Catalog)
+#   $errors - hashref of fields to messages
+# Return non-zero if all fields are valid.
+# Set an error message in $errors for any invalid fields
+sub article_validate {
+  my ($self, $new, $old, $type, $errors) = @_;
+
+  1;
+}
+
+sub article_fill_new {
+  my ($self, $data, $type) = @_;
+
+  $self->article_fill($data, $data, $type);
+}
+
+sub article_fill_old {
+  my ($self, $out, $in, $type) = @_;
+
+  $self->article_fill($out, $in, $type);
+}
+
+sub article_fill {
+  my ($self, $out, $in, $type) = @_;
+
+  1;
+}
+
 1;
 
 =head1 NAME
index e16b57c8ae96db0de10d28ecea70fab03d34ea53..932f0d022b2a64675d84c17989cd60b2410dedae 100644 (file)
@@ -18,9 +18,9 @@ my %statements =
   (
    Articles => 'select * from article',
    replaceArticle =>
-     'replace article values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+     'replace article values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
    addArticle =>  
-     'insert article values (null, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
+     'insert article values (null, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)',
    deleteArticle => 'delete from article where id = ?',
    getArticleByPkey => 'select * from article where id = ?',
    
index 5e1ccc54f2bbf2a255dd3682a43239405db32616..2b622836137d08c08fd43268d76800d1c7058c01 100644 (file)
@@ -5,6 +5,7 @@ use base qw(BSE::Edit::Base);
 use BSE::Util::Tags;
 use BSE::Util::SQL qw(now_sqldate);
 use BSE::Permissions;
+use Util qw(custom_class);
 
 sub article_dispatch {
   my ($self, $req, $article, $articles) = @_;
@@ -562,8 +563,6 @@ sub possible_stepkids {
   return @possible;
 }
 
-
-
 sub tag_possible_stepkids {
   my ($step_kids, $req, $article, $possstepkids, $articles, $cgi) = @_;
 
@@ -1192,6 +1191,14 @@ sub add_form {
 
 sub generator { 'Generate::Article' }
 
+sub typename {
+  my ($self) = @_;
+
+  my $gen = $self->generator;
+
+  ($gen =~ /(\w+)$/)[0] || 'Article';
+}
+
 sub _validate_common {
   my ($self, $data, $articles, $errors) = @_;
 
@@ -1218,6 +1225,8 @@ sub validate {
   my ($self, $data, $articles, $errors) = @_;
 
   $self->_validate_common($data, $articles, $errors);
+  custom_class($self->{cfg})
+    ->article_validate($data, undef, $self->typename, $errors);
 
   return !keys %$errors;
 }
@@ -1226,6 +1235,8 @@ sub validate_old {
   my ($self, $article, $data, $articles, $errors) = @_;
 
   $self->_validate_common($data, $articles, $errors);
+  custom_class($self->{cfg})
+    ->article_validate($data, $article, $self->typename, $errors);
 
   return !keys %$errors;
 }
@@ -1237,6 +1248,9 @@ sub validate_parent {
 sub fill_new_data {
   my ($self, $req, $data, $articles) = @_;
 
+  custom_class($self->{cfg})
+    ->article_fill_new($data, $self->typename);
+
   1;
 }
 
@@ -1367,9 +1381,12 @@ sub fill_old_data {
     $data->{body} =~ tr/\r/\n/;
   }
   for my $col (Article->columns) {
+    next if $col =~ /^custom/;
     $article->{$col} = $data->{$col}
       if exists $data->{$col} && $col ne 'id' && $col ne 'parentid';
   }
+  custom_class($self->{cfg})
+    ->article_fill_old($article, $data, $self->typename);
 
   return 1;
 }
index 45b9113b35a114fb53169e96029f5523a4199de2..1a869c26a77d99ae3e90451a6effa7b9cdc5405d 100644 (file)
@@ -6,8 +6,8 @@ use vars qw(@ISA @EXPORT_OK);
                 total shop_total load_order_fields basic_tags need_logon/;
 use Constants qw/:shop/;
 use BSE::Util::SQL qw(now_sqldate);
-use BSE::Custom;
 use BSE::Util::Tags;
+use Util;
 use Carp 'confess';
 
 # returns a list of tags which display the cart details
@@ -58,8 +58,8 @@ sub shop_cart_tags {
      option => sub { CGI::escapeHTML($options[$option_index]{$_[0]}) },
      ifOptions => sub { @options },
      options => sub { nice_options(@options) },
-     BSE::Custom->checkout_actions($acts, $cart, $cart_prods, 
-                                  $session->{custom}, $q),
+     Util::custom_class($cfg)
+     ->checkout_actions($acts, $cart, $cart_prods, $session->{custom}, $q),
     );  
 }
 
@@ -108,7 +108,8 @@ sub total {
   for my $item (@$cart) {
     $total += $item->{units} * $item->{price};
   }
-  $total += BSE::Custom->total_extras($cart, $products, $state, $cfg, $stage);
+  $total += Util::custom_class($cfg)
+    ->total_extras($cart, $products, $state, $cfg, $stage);
 
   return $total;
 }
@@ -139,7 +140,12 @@ my %nostore =
 sub load_order_fields {
   my ($wantcard, $q, $order, $session, $cart_prods, $error) = @_;
 
-  my @required = BSE::Custom->required_fields($CGI::Q, $session->{custom});
+  require 'BSE/Cfg.pm';
+  my $cfg = BSE::Cfg->new;
+
+  my $cust_class = Util::custom_class($cfg);
+
+  my @required = $cust_class->required_fields($CGI::Q, $session->{custom});
   push(@required, qw(cardHolder cardExpiry)) if $wantcard;
   for my $field (@required) {
     defined($q->param($field)) && length($q->param($field))
@@ -209,11 +215,9 @@ sub load_order_fields {
     $order->{gst} += $item->{gst} * $item->{units};
   }
   $order->{orderDate} = $today;
-  $order->{total} += BSE::Custom->total_extras(\@cart, \@products, 
+  $order->{total} += $cust_class->total_extras(\@cart, \@products, 
                                             $session->{custom});
 
-  require 'BSE/Cfg.pm';
-  my $cfg = BSE::Cfg->new;
   if (need_logon($cfg, \@cart, \@products, $session)) {
     $$error = "Your cart contains some file-based products.  Please register or logon";
     return 0;
@@ -233,7 +237,7 @@ sub load_order_fields {
 
   # check if a customizer has anything to do
   eval {
-    BSE::Custom->order_save($q, $order, \@cart, \@products, $session->{custom});
+    $cust_class->order_save($q, $order, \@cart, \@products, $session->{custom});
   };
   if ($@) {
     $$error = $@;
index db772685d72ea079b9c3c287581ef1c0c1317cb6..eefd576109cec4860b8a3c37338f7a4c31942c4c 100644 (file)
@@ -3,9 +3,9 @@ use strict;
 use Articles;
 use Constants qw($IMAGEDIR $LOCAL_FORMAT $BODY_EMBED 
                  $EMBED_MAX_DEPTH $HAVE_HTML_PARSER);
-use BSE::Custom;
 use DevHelp::Tags;
 use DevHelp::HTML;
+use Util;
 
 my $excerptSize = 300;
 
@@ -514,7 +514,7 @@ sub baseActs {
     (
      %extras,
 
-     BSE::Custom->base_tags($articles, $acts, $article, $embedded, $cfg),
+     Util::custom_class($cfg)->base_tags($articles, $acts, $article, $embedded, $cfg),
      BSE::Util::Tags->static($acts, $self->{cfg}),
      # for embedding the content from children and other sources
      ifEmbedded=> sub { $embedded },
index b38dc1e5f84934a80758ca9e7f4760ab04cf95a8..110819858d7d4b3613f21819df840ab66dda63a7 100644 (file)
@@ -4,7 +4,7 @@ use vars qw(@ISA @EXPORT_OK);
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT_OK = qw(generate_article generate_all generate_button 
-                refresh_to regen_and_refresh);
+                refresh_to regen_and_refresh custom_class);
 use Constants qw($CONTENTBASE $GENERATE_BUTTON $SHOPID $AUTO_GENERATE);
 use Carp qw(confess);
 
@@ -366,4 +366,20 @@ sub regen_and_refresh {
   return 1;
 }
 
+sub custom_class {
+  my ($cfg) = @_;
+
+  local @INC = @INC;
+
+  my $class = $cfg->entry('basic', 'custom_class', 'BSE::Custom');
+  (my $file = $class . ".pm") =~ s!::!/!g;
+
+  my $local_inc = $cfg->entry('paths', 'libraries');
+  unshift @INC, $local_inc if $local_inc;
+
+  require $file;
+
+  return $class->new(cfg=>$cfg);
+}
+
 1;
index b55b1584c5c4532f57bb9a9e4ae69add96624197..b0afef439cfdb49a7427698bd45caf01f4eb6b4e 100755 (executable)
@@ -10,7 +10,7 @@ use Product;
 use Constants qw(:shop $CGI_URI);
 use BSE::Template;
 use CGI::Cookie;
-use BSE::Custom;
+use Util;
 use BSE::Mail;
 use BSE::Shop::Util qw/shop_cart_tags cart_item_opts nice_options total 
                        basic_tags load_order_fields need_logon/;
@@ -18,7 +18,9 @@ use BSE::Session;
 use BSE::Cfg;
 use Util qw/refresh_to/;
 
-my $subject = $SHOP_MAIL_SUBJECT;
+my $cfg = BSE::Cfg->new();
+
+my $subject = $cfg->entry('shop', 'subject', $SHOP_MAIL_SUBJECT);
 
 # our PGP passphrase
 my $passphrase = $SHOP_PASSPHRASE;
@@ -36,10 +38,10 @@ my $pgpe = $SHOP_PGPE;
 my $pgp = $SHOP_PGP;
 my $gpg = $SHOP_GPG;
 
-my $from = $SHOP_FROM;
+my $from = $cfg->entry('shop', 'from', $SHOP_FROM);
 
-my $toName = $SHOP_TO_NAME;
-my $toEmail= $SHOP_TO_EMAIL;
+my $toName = $cfg->entry('shop', 'to_name', $SHOP_TO_NAME);
+my $toEmail= $cfg->entry('shop', 'to_email', $SHOP_TO_EMAIL);
 
 use constant PAYMENT_CC => 0;
 use constant PAYMENT_CHEQUE => 1;
@@ -52,7 +54,6 @@ my %valid_payment_types =
   );
 my %payment_names = qw(CC 0 Cheque 1 CallMe 2);
 
-my $cfg = BSE::Cfg->new();
 my $urlbase = $cfg->entryVar('site', 'url');
 my $securlbase = $cfg->entryVar('site', 'secureurl');
 my %session;
@@ -163,14 +164,15 @@ sub show_cart {
   $session{custom} ||= {};
   my %custom_state = %{$session{custom}};
 
-  BSE::Custom->enter_cart(\@cart, \@cart_prods, \%custom_state, $cfg); 
+  my $cust_class = Util::custom_class($cfg);
+  $cust_class->enter_cart(\@cart, \@cart_prods, \%custom_state, $cfg); 
   $msg = '' unless defined $msg;
   $msg = CGI::escapeHTML($msg);
 
   my %acts;
   %acts =
     (
-     BSE::Custom->cart_actions(\%acts, \@cart, \@cart_prods, \%custom_state, 
+     $cust_class->cart_actions(\%acts, \@cart, \@cart_prods, \%custom_state, 
                               $cfg),
      shop_cart_tags(\%acts, \@cart, \@cart_prods, \%session, $CGI::Q, $cfg,
                    'cart'),
@@ -199,7 +201,7 @@ sub update_quantities {
   $session{cart} = \@cart;
   $session{custom} ||= {};
   my %custom_state = %{$session{custom}};
-  BSE::Custom->recalc($CGI::Q, \@cart, [], \%custom_state, $cfg);
+  Util::custom_class($cfg)->recalc($CGI::Q, \@cart, [], \%custom_state, $cfg);
   $session{custom} = \%custom_state;
 }
 
@@ -224,8 +226,8 @@ sub checkupdate {
   my @cart = @{$session{cart}};
   my @cart_prods = map { Products->getByPkey($_->{productId}) } @cart;
   my %custom_state = %{$session{custom}};
-  BSE::Custom->checkout_update($CGI::Q, \@cart, \@cart_prods, \%custom_state, 
-                              $cfg);
+  Util::custom_class($cfg)
+      ->checkout_update($CGI::Q, \@cart, \@cart_prods, \%custom_state, $cfg);
   $session{custom} = \%custom_state;
   
   checkout("", 1);
@@ -260,7 +262,9 @@ sub checkout {
   $session{custom} ||= {};
   my %custom_state = %{$session{custom}};
 
-  BSE::Custom->enter_cart(\@cart, \@cart_prods, \%custom_state, $cfg); 
+  my $cust_class = Util::custom_class($cfg);
+  $cust_class->enter_cart(\@cart, \@cart_prods, \%custom_state, $cfg);
+
   my @payment_types = split /,/, $cfg->entry('shop', 'payment_types', '0');
   @payment_types = grep $valid_payment_types{$_}, @payment_types;
   @payment_types or @payment_types = ( 0 );
@@ -279,7 +283,7 @@ sub checkout {
      message => sub { $message },
      old => sub { CGI::escapeHTML($olddata ? param($_[0]) : 
                    $user && defined $user->{$_[0]} ? $user->{$_[0]} : '') },
-     BSE::Custom->checkout_actions(\%acts, \@cart, \@cart_prods, 
+     $cust_class->checkout_actions(\%acts, \@cart, \@cart_prods, 
                                   \%custom_state, $CGI::Q, $cfg),
      ifMultPaymentTypes => @payment_types > 1,
     );
@@ -333,7 +337,9 @@ sub checkout_confirm {
 # information
 # BUG!!: this duplicates the code in purchase() a great deal
 sub prePurchase {
-  my @required = BSE::Custom->required_fields($CGI::Q, $session{custom}, $cfg);
+
+  my $cust_class = Util::custom_class($cfg);
+  my @required = $cust_class->required_fields($CGI::Q, $session{custom}, $cfg);
   for my $field (@required) {
     defined(param($field)) && length(param($field))
       or return checkout("Field $field is required", 1);
@@ -427,7 +433,7 @@ sub prePurchase {
     return;
   }
 
-  $order{total} += BSE::Custom->total_extras(\@cart, \@products, 
+  $order{total} += $cust_class->total_extras(\@cart, \@products, 
                                             $session{custom}, $cfg, 'final');
   ++$session{changed};
   # blank anything else
@@ -443,7 +449,7 @@ sub prePurchase {
 
   # check if a customizer has anything to do
   eval {
-    BSE::Custom->order_save($CGI::Q, \%order, \@cart, \@products, 
+    $cust_class->order_save($CGI::Q, \%order, \@cart, \@products, 
                            $session{custom}, $cfg);
     ++$session{changed};
   };
@@ -522,8 +528,9 @@ sub prePurchase {
 # the real work
 sub purchase {
   # some basic validation, in case the user switched off javascript
+  my $cust_class = Util::custom_class($cfg);
   my @required = 
-    BSE::Custom->required_fields($CGI::Q, $session{custom}, $cfg);
+    $cust_class->required_fields($CGI::Q, $session{custom}, $cfg);
 
   my @payment_types = split /,/, $cfg->entry('shop', 'payment_types', '0');
   @payment_types = grep $valid_payment_types{$_}, @payment_types;
@@ -659,13 +666,13 @@ sub purchase {
 
   # check if a customizer has anything to do
   eval {
-    BSE::Custom->order_save($CGI::Q, \%order, \@cart, \@products, $cfg);
+    $cust_class->order_save($CGI::Q, \%order, \@cart, \@products, $cfg);
   };
   if ($@) {
     return checkout($@, 1);
   }
 
-  $order{total} += BSE::Custom->total_extras(\@cart, \@products, 
+  $order{total} += $cust_class->total_extras(\@cart, \@products, 
                                             $session{custom}, $cfg, 'final');
 
   # load up the database
@@ -688,7 +695,7 @@ sub purchase {
   my %acts;
   %acts =
     (
-     BSE::Custom->purchase_actions(\%acts, \@items, \@products, 
+     $cust_class->purchase_actions(\%acts, \@items, \@products, 
                                   $session{custom}, $cfg),
      iterate_items_reset => sub { $item_index = -1; },
      iterate_items => 
@@ -760,8 +767,9 @@ sub send_order {
   %acts =
     (
      %extras,
-     BSE::Custom->order_mail_actions(\%acts, $order, $items, $products, 
-                                    $session{custom}, $cfg),
+     Util::custom_class($cfg)
+     ->order_mail_actions(\%acts, $order, $items, $products, 
+                         $session{custom}, $cfg),
      BSE::Util::Tags->static(\%acts, $cfg),
      iterate_items_reset => sub { $item_index = -1; },
      iterate_items => 
index c27771c71cd5398116826e9b053a21bb2e0e3f59..024e7a3f668f0033a93cc5c071e8f6706fcf7786 100644 (file)
@@ -10,6 +10,50 @@ Maybe I'll add some other bits here.
 
 =head1 CHANGES
 
+=head2 0.12_25
+
+=over
+
+=item *
+
+admin/edit_product.tmpl had two <:error_img title:> tags
+
+=item *
+
+C<$SHOP_FROM>, C<$SHOP_TO_NAME> and C<$SHOP_TO_EMAIL> from
+Constants.pm can now be overridden in the config
+file. (C<[shop].from>, C<to_name> and C<to_email>)
+
+=item *
+
+the name of the custom class can now be specified in the config file
+(defaulting to C<BSE::Custom>) (C<[basic].custom_class>)
+
+=item *
+
+you can specify an alternate library path to search for your custom
+class (C<[paths].libraries>)
+
+=item *
+
+the custom class can now handle validate and store extra fields for
+articles (and relates types, like products)
+
+=item *
+
+two custom date fields (C<customDate1> and C<customDate2>) and two
+custom string fields (C<customStr1> and C<customStr2>) have been added
+to the article table to allow simplfied customization.
+
+=item *
+
+the default article, product and catalog editing template now include
+C<admin/custom_article.tmpl>, C<admin/custom_product.tmpl> and
+C<admin/custom_catalog.tmpl> includes to allow adding custom form
+fields without having to modify the main distributed editing templates
+
+=back
+
 =head2 0.12_24
 
 =over
index 476877b367817d680373e5737ae683a0659d3a47..c4a2add45cfb77953a071a1bb576d386be95d513 100644 (file)
@@ -46,6 +46,11 @@ templates directory.
 Where uploaded images are stored.  This is not yet completely
 implemented.  Default: $IMAGEDIR.
 
+=item libraries
+
+Local search path for BSE::Custom, or the class configured by
+C<custom_class> in [basic].
+
 =back
 
 =head2 [extensions]
@@ -176,6 +181,12 @@ and crypt() versions of their passwords.  If this is set then the
 security system will check for a user set by the browser before
 attempting a form based logon.  Default: None.
 
+=item custom_class
+
+The name of the custom class for your site.  This is currently only
+used for article editing customizations.  This class should derive
+from BSE::CustomBase.  Default: BSE::Custom.
+
 =back
 
 =head2 [mail]
@@ -434,6 +445,21 @@ The possible payment types are:
 These are used by various shop templates to present an address that a
 cheque payment should be sent to.
 
+=item from
+
+From email address for emails sent by the shop.  Overides $SHOP_FROM
+in Constants.pm
+
+=item to_name
+
+To name for emailed orders sent by the shop.  Overrides $SHOP_TO_NAME
+in Constants.pm
+
+=item to_email
+
+To email for emailed orders sent by the shop.  Overrides $SHOP_TO_EMAIL
+in Constants.pm
+
 =back
 
 =head2 [fields]
index 4c351435cb39798982605684d2a211635ca2b1f8..095c74ef89c568bc5d9734e56a662dd9afbcd2d5 100644 (file)
             <td bgcolor="#FFFFFF" width="100%"><:iterator begin flags:><:if FieldPerm flags:><input type=checkbox name=flags value="<:flag id:>" <:ifFlagSet [flag id]:>checked<:or:><:eif:>><:or FieldPerm:><:ifFlagSet [flag id]:>Yes<:or:>No<:eif:><:eif FieldPerm:><:flag desc:><:iterator end flags:></td>
             <td bgcolor="#FFFFFF"><:help edit listed:></td>
           </tr>
+<:include admin/product_custom.tmpl :>
           <tr> 
             <th nowrap align="left" bgcolor="#FFFFFF" valign="top">Thumbnail image:</th>
             <td nowrap bgcolor="#FFFFFF"> 
diff --git a/site/templates/admin/article_custom.tmpl b/site/templates/admin/article_custom.tmpl
new file mode 100644 (file)
index 0000000..d88647c
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- admin/article_custom.tmpl -->
+<!-- replace with form fields for custom fields -->
\ No newline at end of file
diff --git a/site/templates/admin/catalog_custom.tmpl b/site/templates/admin/catalog_custom.tmpl
new file mode 100644 (file)
index 0000000..6364b70
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- admin/catalog_custom.tmpl -->
+<!-- replace with form fields for custom fields -->
\ No newline at end of file
index f738f5abe863fcb710830a2cbd89e6585957ed43..875d676f07990b82d99d8b6bda15070bd89bed1c 100644 (file)
               (comma separated)<:or:><: article threshold :><:eif:></td>
             <td nowrap bgcolor="#FFFFFF"><:help edit keywords:> <:error_img keyword:></td>
           </tr>
+<:include admin/article_custom.tmpl:>
           <tr> 
             <th nowrap bgcolor="#FFFFFF" align="left" valign="top">Thumbnail image:</th>
             <td width="100%" valign="top" bgcolor="#FFFFFF"> 
index f738f5abe863fcb710830a2cbd89e6585957ed43..875d676f07990b82d99d8b6bda15070bd89bed1c 100644 (file)
               (comma separated)<:or:><: article threshold :><:eif:></td>
             <td nowrap bgcolor="#FFFFFF"><:help edit keywords:> <:error_img keyword:></td>
           </tr>
+<:include admin/article_custom.tmpl:>
           <tr> 
             <th nowrap bgcolor="#FFFFFF" align="left" valign="top">Thumbnail image:</th>
             <td width="100%" valign="top" bgcolor="#FFFFFF"> 
index b79581186c1cd2d1d2778485f8c71644a03d0823..5a925c70f65db49a73e10e22e6cbe7d62516b82a 100644 (file)
               (comma separated) </td>
             <td nowrap bgcolor="#FFFFFF"><:help catalog keywords:> <:error_img keyword:></td>
           </tr>
+<:include admin/catalog_custom.tmpl:>
           <tr> 
             <th bgcolor="#FFFFFF" nowrap align="left" valign="top">Thumbnail image:</th>
             <td width="100%" valign="top" bgcolor="#FFFFFF"> 
index 3d34e8597c27f958504fc03679272ac062cbe475..6c8817d7cda92833645f1ca6006e35fe0078a289 100644 (file)
@@ -66,8 +66,7 @@
                  <tr> 
             <th align="left" bgcolor="#FFFFFF">Title*:</th>
             <td bgcolor="#FFFFFF"><:ifFieldPerm title:><input type="text" name="title" value="<:old title:>" size="60"><:or:><:product title:><:eif:> </td>
-            <td nowrap bgcolor="#FFFFFF"><:help product title:> <:error_img title:> <:error_img
-            title:></td>
+            <td nowrap bgcolor="#FFFFFF"><:help product title:> <:error_img title:></td>
           </tr>
           <tr> 
             <th nowrap align="left" bgcolor="#FFFFFF">Summary*:</th>
               (<:alloptions:>)<:or:><:product options:><:eif:> </td>
             <td bgcolor="#FFFFFF"><:help product options:> <:error_img options:></td>
           </tr>
+<:include admin/product_custom.tmpl:>
           <tr> 
             <th nowrap align="left" bgcolor="#FFFFFF" valign="top">Thumbnail image:</th>
             <td nowrap bgcolor="#FFFFFF"> 
diff --git a/site/templates/admin/product_custom.tmpl b/site/templates/admin/product_custom.tmpl
new file mode 100644 (file)
index 0000000..4b442d7
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- admin/product_custom.tmpl -->
+<!-- replace with form fields for custom fields -->
\ No newline at end of file