[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] PATCH - MV4.04a: Changing "salestax.asc"
****** message to minivend-users from "Jeff Carnahan" <jcarnahan@networq.com> ******
Being the picky user that I am, I wanted to use .txt files in my products
directory for all text based databases. That includes my shipping, salestax
and accessories databases. However, it seems that MV 4.04a only allows users
to modify the names of the shipping and accessories databases via:
SpecialPage shipping.asc products/shipping.txt
SpecialPage accessories.asc products/accessories.txt
Looking at the documentation, the directive for renaming these files should
actually be "Special" not "SpecialPage" ... So, the included diff enables
the "Special" directive, and also allows it to work on the salestax.asc
file.. =)
WARNING!: If you use the working "SpecialPage" syntax above, this patch will
break your configuration. You *MUST* use the "Special" directive to rename
your shipping.asc, accessories.asc and salestax.asc databases.
Comments appreciated!
--
Warmest Regards...
__________________________________________________________________
Jeff Carnahan Networq, Inc.
http://www.networq.com/ jcarnahan@networq.com
__________________________________________________________________
*** Data-dist.pm Sun Jul 23 16:28:32 2000
--- Data.pm Sun Jul 23 16:46:37 2000
***************
*** 453,459 ****
my($code, $percent);
return unless $Vend::Cfg->{SalesTax};
! my $file = Vend::Util::catfile($Vend::Cfg->{ProductDir}, "salestax.asc");
$Vend::Cfg->{SalesTaxTable} = {};
open(Vend::SALESTAX, $file) or do {
logError( "Could not open salestax file %s: %s" ,
--- 453,460 ----
my($code, $percent);
return unless $Vend::Cfg->{SalesTax};
! my $file = $Vend::Cfg->{Special}{'salestax.asc'}
! || Vend::Util::catfile($Vend::Cfg->{ProductDir}, "salestax.asc");
$Vend::Cfg->{SalesTaxTable} = {};
open(Vend::SALESTAX, $file) or do {
logError( "Could not open salestax file %s: %s" ,
*** Config-dist.pm Sun Jul 23 16:40:11 2000
--- Config.pm Sun Jul 23 17:08:10 2000
***************
*** 315,320 ****
--- 315,321 ----
['DisplayErrors', 'yesno', 'No'],
['ParseVariables', 'yesno', 'No'],
['SpecialPage', 'special', ''],
+ ['Special', 'special', ''],
['Sub', 'subroutine', ''],
['VendURL', 'url', undef],
['SecureURL', 'url', undef],
***************
*** 867,873 ****
}
}
}
! $C->{Special} = $C->{SpecialPage} if defined $C->{SpecialPage};
return $C;
}
--- 868,878 ----
}
}
}
!
! # --> This won't break anything. The "Special" catalog directive
! # --> is already documented. =) - Jeff C. <jcarnahan@networq.com>
! # $C->{Special} = $C->{SpecialPage} if defined $C->{SpecialPage};
!
return $C;
}
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list