Products | Scripts | Services | Tutorials | Books | Links | Contact | Bulletin Board

The CITY Shop

Overview | Concept | Licensing | Demo/Download | Installation | Gallery | Last Updates | FAQ

Templates | Views | Engines | Libraries | Main Setup | Shop Setup | Database | Session | Shipping

This is the Archive of shop updates

24 June 2002 - not much changed, but here it is the SP2b

Update the following modules, since some stuff has been changed to support the WorldPay patch
MainLib.pm
EPI.pm

The following modules had small bugs and need to be updated:

ShopOrderLib.pm
In the routine _CheckFormData, a few regexes were corrected, especially for the Worldpay addition.

ShopBillingLib.pm
Only the Unix version had an error, otherwise no changes

Views/AuthVIEW.pm
We added an extra check for the validity of the "auth_user_name" in the login form, which brought an error on some systems

Views/CartVIEW.pm
A word was corrected, which had not language content equivalent: $CartMsg->{'Price'}

Views/PaymentWorldPayVIEW.pm
Update the whole file. Please note that the WorldPay is not a 100% ok implementation, as it requires some tweaking in the store.cgi, to activate GET and POST reading simultaneously:
$T->{-FX} = MainLib::_ReadFormData(1,1) if ! $UseCGI;


17 June 2002

The SP2a had a mistake in the ShopBillingLib.pm, please download again the distribution and upload only this file!

Also, there is a prerelease published, with a temporary fix for WorldPay. Please read the comments before using it.

16 June 2002

The SP2a is out

There are some corrections in the following modules:

Library/EPI.pm and ALL the modules under Library/EPI
shops/city/ShopBillingLib.pm
shops/city/ShopOrderLib.pm
shops/city/Views/OrderFormVIEW.pm
PaymentPayPalVIEW.pm
PaymentQentaVIEW.pm
PaymentWorldPayVIEW.pm (new file, not 100% tested)

These modules were modified to solve a LOT of inconsistencies in the EPI interface, in terms of correct error reporting. Please update these modules as they are right now.

 

11 June 2002

The SP2 is out

Files update since the 1.0 SP1, that you should update as-is

store.cgi
Library/EPI.pm and all files under Library/EPI
Library/MainLib.pm
Library/SessionLib.pm
Library/SubmitLWPUserAgent.pm

shops/city/ManagerDBLib.pm
shops/city/ManagerDBLibAccountdata.pm
shops/city/ShopBillingLib.pm
shops/city/ShopFormLib.pm
shops/city/ShopCartLib.pm
shops/city/ShopDiscountLib.pm
shops/city/PaymentPayPalVIEW.pm
shops/city/PaymentQentaVIEW.pm

Files with documented changes:

shops/city/ShopProductBuilder.pm
shops/city/ShopDisplayProductList.pm
shops/city/ShopDisplaySearchResults.pm

We added support for checkboxes, select boxes and text fields in the product list display. Look as well in the ShopSetup for the correspondent added fields, i.e. here is the one for the productlistsimple:

productlistsimple => {
  -MAX_PER_PAGE => 10,
  -SORT_BY => 'name',
  -UPSELL_ITEMS => 2,
  -FORM_FIELDS => 'checkbox',
},

shops/city/ShopOrderLib.pm
We fixed a few bugs related to correct response for the BillMe option, PayPal, as well as another small stuff. We recommmend updating it as-is, and apply the changes if you made any.

shops/city/ShopSetup.pm
Some extension fields were added to the hashes that describe the product lists (see above). Then, the session file record for the "transaction_data was corrected to read:

'transaction_data' => [qw(TransactionID Total PaymentMode)],

ShopFormatting.pm
We also added a message in all the ShopFormatting.pm, to support a PayPal warning message, that the user should complete the payment on the PayPal site, in order to process the Shop order.

 

 

21. Mai 2002

Version 1.0 sp 1 is out.

The following languages were added

spanish
lituanian

Files update since the 1.0 release, that you should update as-is

store.cgi
Library/AuthLib.pm
Library/CryptLib.pm
Library/DBLib.pm
Library/EPI.pm and all files under Library/EPI
Library/FormLib.pm
Library/MainLib.pm
Library/SendMail.pm
Library/SessionLib.pm
shops/city/Manager* (most files)
shops/city/ShopDBLib.pm
shops/city/ShopDBSetup.pm
shops/city/ShopProcessOrderItems.pm
shops/city/Views/Manager* (most files)


Files added:

Library/TextConvertLib.pm
Library/Mail/Sender.pm
shops/city/ShopEmailLib.pm

Files with documented changes:

shops/city/ShopCartLib.pm
Numerous changes to fix some bugs related to the improper calculation of tax/option, the correct re-routing to the secure site, the correct price field, formatting, and added a new routine, _FormatStockField(). We recommend to update this module as-is.

shops/city/ShopDiscountLib.pm
Fixed two bugs: one related to an error when no promotions are defined (line 125, 139), another at line 184 when the lexical variable $TotalPrice was redefined and caused a minor warning.

shops/city/ShopDisplayCart.pm
Modified the code at line 138, 248 and 344, to skip invalid options, and avoid an error when the product has options that are no longer existing.

shops/city/ShopEmailUserData.pm
Removed the use SendMail from the header.
Added the code to support ShopEmailLib. The routines that parsed the mail template are moved there.

shops/city/ShopFormLib.pm
Corrected a bug at lines 55 and 56 where some values were unnecessarily eval'ed.
Modified the index building in the _ReadParseMenuData(), to avoid an error when the select of values was made with a wildcard. Previously this returned an error.

shops/city/ShopOrderLib.pm
Added a variable $OrderMin, to support a minimum order amount.
Added an extra check for using shipping at lines 78 and 84
Added a reset of the $HandlingFee at line 123, if there is no shipping happening
Fixed a bug at line 115, where the $ToState was used, instead of $ToVal
Changed the lexical scope of the @TaxByID and $TaxMap
Added some code at line 244 to support tax maps correctly
Added code at line 264 to support the minimum order amount limitation
Added at line 566 and 684 in the _CheckFormData() support for the "PayAtDelivery" payment method
Fixed a bug in the _CheckPaymentData(), line 618, 658, the index to the credit card record
Fixed the _ReadFormDataFromSession() to avoid overwriting valid form fields
The _LogOrderAndSendEmails() was rewritten to take advantage of the new ShopEmailLib

shops/city/ShopSearchLib
The code was modified to save the language-specific searches individually in the session. That way, if a user changes the language, the previous search will not be cached

shops/city/ShopShippingLib
Some code was added to support new methods. If you customized your own routine, you might not need to update it.

shops/city/ShopValidateUserData
Fixed a bug at line 35, where the user database information was taken from the wrong system key; it is using now -AUTH_SETUP

shops/city/Views/AuthVIEW
It was modified to display the payment information only when the payment database is being used.

shops/city/Views/CartVIEW
$CartTotal and $CartDiscount are now formatted within this routine, instead of the ShopOrderLib
The code at line 117, 183, 243, 302, 349, 418 ($ItemTotal) was changed to properly display the formatted totals

shops/city/Views/FormattingVIEW
The formatting mode "commified" was added to the _FormatPrice(), to support simple price formatting for the cart.
_ReadShippingFieldData() was completely rewritten

shops/city/Views/OrderDataVIEW
The code was rewritten to display the UPS tracking number when valid, and the order is not "processed" yet.

shops/city/Views/OrderFormVIEW
It was rewritten to correctly display the shipping options, i.e. to create a hidden field as default when only one shipping method applies. If you customized this module, you will need to do it again, it's all for a good cause :)

shops/city/Views/PaymentPayPalVIEW
Is still worked on... will be updated again shortly, so we prefer not to comment much about it.

shops/city/Views/SearchVIEW
A bug was corrected, where the "OR" was not displayed as a language-specific message

shops/city/Views/*/ShopFormatting
shops/city/Views/*/ManagerFormatting
Some messages were added.


 

25. April 2002

Finally, version 1.0 is out. Happy birthday, Ehsan!

 

 

 

29. March 2002

Another set of updates:

files you should update anyway:

store.cgi
AuthLib.pm
CryptLib.pm
EPI.pm
FormLib.pm
SendMail.pm
ManagerAdminBackupLib.pm
ManagerAdminImportLib.pm
ManagerDBLib.pm
ManagerDBLibArtists.pm
ManagerDBLibAuthors.pm
ManagerDBLibCategories.pm
ManagerDBLibManufacturers.pm
ManagerDBLibUser.pm
ShopCartLib.pm
ShopDBLib.pm
ShopDiscountLib.pm
ShopDisplayCart.pm
ShopEmailLib.pm
ShopEmailUserData.pm
ShopOrderLib.pm
ShopSearchLib.pm
ShopShippingLib.pm

Files that were bugfixed:

CartVIEW.pm
FormattingVIEW.pm
ManagerADMimportVIEW.pm
ManagerDatabaseVIEW.pm
ManagerDBcategoriesVIEW.pm
ManagerDBmanageruserVIEW.pm
ManagerDBuserVIEW.pm
OrderDataVIEW.pm
OrderFormVIEW.pm

I am working at documenting the changes, but I have to leave for my vacation... I will update the site from the road :)

 

 

14. March 2002

Another set of updates:

We added a module used for the data import: TextConvertLib.pm

We fixed a bug in the Library/EPI/cybercash.pm, update the module.

Update all the ManagerDBLib modules

Update the following:

ManagerAdminBackupLib.pm
ManagerAdminImportLib.pm

We fixed the import, now works fine with Excel-exported files

ShopDBSetup.pm

We rearranged it a bit. Mmake sure you update the fields you customized.

ShopOrderLib.pm

The error at line 115 was fixed, where the shipping/tax was not calculated properly depending on the state/country.
At line 618, the assignment was corrected to take the right indexed entry:

if ($CCOnFile eq $x->[$IxKey]) { 

Same thing at line 658:

if ($BankOnFile eq $x->[$IxKey]) {

At line 782, we fixed another bug, note the updated loop:

foreach (keys %$Ix) {
  my $SessionData = $Data->[$Ix->{$_}];
# We avoid overwriting the eventually set defaults (i.e. SPreferredMethod)
  $FX->{$_} = $SessionData if $SessionData ne '' || 
    ! exists $FX->{$_} || $FX->{$_} eq '';
}


ShopEmailUserData.pm

We fixed the emailing to user, it was commented out by mistake

ShopShippingLib.pm

We added a custom shipping mode, update if you want

ManagerSetup.pm

We added a hash to support the buffered writing to the database, when importing stuff:

%UpdateDBParams = (
  product => {-WRITE_BUFFER => 500},
);
...
$S->{-MANAGER_UPDATE_DB_PARAMS} = \%UpdateDBParams;

Later on, more features will be added to this hash. We removed also one entry in the required fields hash:

%DBFormFieldsRequired = (
...
  'manufacturers' => [qw(ManufacturerName)],


AuthVIEW.pm

We fixed a display problem, the new login screen was not marking the invalid email field. The simplest thing will be to update the module.

CartVIEW.pm

We added some code to preformat the $CartTotal and $CartDiscount so it can be displayed properly. Update the module.

FormattingVIEW.pm

The display mode 'commified' was added to the _FormatPrice().

OrderFormVIEW.pm

We overwrite the preselected shipping method value, since we might have had something saved in the session:

$SPM = $OX->{'SPreferredMethod'};

 

 


5. March 2002

OK, after all this new stuff, a few bugs were found, and had to be fixed!

First of all here is a list of modules that you should update:

store.cgi
manager.cgi
MainLib.pm
ShopCartLib.pm
ShopDBLib.pm
ShopEmailUserData.pm
ShopMenuBuilder.pm
ShopOrderLib.pm
ShopSetup.pm
AuthVIEW.pm
OrderDataVIEW.pm
OrderFormVIEW.pm
und alle manager files und views

For most of them, these were byte-bugs, if somebody needs a description, please email me, and I will put them here, otherwise just update the stuff :)

Now to the release in fact:

We asked a lot of people whether listing the changes to the old release makes sense after all, and we came to the conclusion that the changes were quite extensive, so we will proceed on a FAQ basis. You ask us when something does not work, and we will list the differences. After a short estimate, listing them here would fill a few long pages worth of text...

 

2. March 2002

This is the release, finally!

If you use this to update older releases, here is a piece of code that YOU HAVE TO update:

If you see the following error:

When you assign some data to a query 
that is the result of a database search, please assign
both of the following keys to the form config hash:
  -DB_DATA
  -DB_INDEX

Then, change the code in the ShopMenuBuilder.pm, at the end of the routine _SelectData() to read:

  ...
  my $DataOut         = @NewData ? \@NewData : '';
  $Query->{-DB_DATA}  = $DataOut;
  $Query->{-DB_INDEX} = $Ix;
  return ($DataOut, $Layout, $ParentTitle);
}

Here is a short idea of what you need to change:

First of all, update all the base modules (main script, stuff in the Library folder), the changes brought to them should not affect older installations.

Then:

ShopDBLib.pm
ShopCartLib.pm
ShopOrderLib.pm
ShopBillingLib.pm
OrderFormVIEW.pm
stuff in the Views/eng, as well as other languages

These modules are necessary to be updated either way, since they bring a lot of bugfixes.

ShopDBLibCustom
ProductExtendedDataVIEW.pm

These modules were added to support extended tables, linked to the product.db Currently, only the manufacturers.db is implemented, but adding new tables should be a straightforward process.

If you like the layout of the demo with the language selector, you will have to update the templates with the appropriate custom tag: <cityshop:view:LanguageSelectJumpbox/>. Also, you will need to update some other modules, like:

ShopMenuBuilder.pm
MenuVIEW.pm

 

04.January.2002

This release corrects a couple of bugs. For the general area, please update the following modules:

store.cgi
manager.cgi
setupdb.cgi
DBLib.pm
MainLib.pm

The main scripts were invalid in the Unix version. Then, the shops modules affected are:

ManagerDBLibCategories.pm
ManagerDBLibDiscount.pm
ManagerDBLibOptions.pm
ManagerDBLibProduct.pm
ManagerDBLibPromotions.pm
ManagerDBcategoriesVIEW.pm
ManagerDBdiscountVIEW.pm
ManagerDBoptionsVIEW.pm
ManagerDBproductVIEW.pm
ManagerDBpromotionsVIEW.pm
ManagerSetup.pm

We removed the following keys from the ManagerSetup.pm:

-MANAGER_DISPLAY_OPTION_INPUT_FIELDS
-MANAGER_DISPLAY_DISCOUNT_INPUT_FIELDS

We replaced them with the more flexible:

-MANAGER_DISPLAY_INPUT_FIELDS

The _SetConfig() routines in the above listed ManagerDBLib* modules were corrected, to receive the package name, if necessary. Also, in the view packages, the following line was corrected, to read (example from the ManagerDBcategoriesVIEW.pm):

my $Config = ManagerDBLibCategories::_SetConfig($S);

Aside of these routine fixes, ManagerDBLibProduct.pm was updated to fix the bog of not being able to delete a product.

Please update these files, and sorry for the inconvenience. We are working at an update for the tags library, but we rushed to fix these issues first, so expect an update for the ShopBuildTagData.pm, in the week to come.

 

 

31.December.2001

The manager was completely reworked, and it goes beta!
We recommend updating all the manager modules (main modules, shop modules, and views).

Main modules you should update anyway:

store.cgi
manager.cgi
setupdb.cgi
DBLib.pm
EPI.pm (and all the other EPI modules)
FormLib.pm
MainLib.pm
ManagerLib.pm

Shop Modules affected:

ShopBuildTagData.pm

A few new tags were added. Mainly is the support for the FormTag and options.

ShopDBLib.pm

The _GenerateOutput() was rewritten to get the parameters in a hash, same thing like in the manager modules.

ShopDBSetup.pm

Updated to support the changes to the database. The orders.db was updated, to inclde the following fields:

BEmail
SInCityLimits
OrderComments

The promotions.db was modified to remove the PromotionsCode field.

ShopDisplayCart.pm

Added the display of the ProductID in the emailed cart. Update if you need that feature.

ShopOrderLib.pm
OrderFormVIEW.pm

The $S->{-ORDER_COMMENTS} now points to the form field OrderComments, and will be saved in the order database.

ShopShippingLib.pm

We added a "custom" shipping method, which calculates shipping based on the number of items, as an example of how to do it. You can customize further your shipping method in there, currently it has some demo values.

ShopUserDataLib.pm

A bug at line 118 was fixed, regarding the UserID parameter passing.

ManagerFormatting.pm
ShopFormatting.pm

Some messages were added.

ShopSetup.pm

$DBSession was updated to save the correct order data, with the new fields.
$DBOrders was updated to include the three new fields mentioned abobe.
$DatabaseMapToForm was changed to include the new fields in the mapper.
The form tags are now mapped as follows:

-FORM_TAG_ONECLICK        => $S->{-FORM_TAG_ONECLICK},
-FORM_TAG_SECURE          => $S->{-FORM_TAG_SECURE},
-FORM_TAG_ONECLICK_SECURE => $S->{-FORM_TAG_ONECLICK_SECURE},
-FORM_TAG_MULTIPART       => $S->{-FORM_TAG_MULTIPART},
-MGR_FORM_TAG             => $S->{-MGR_FORM_TAG},
-MGR_FORM_TAG_MULTIPART   => $S->{-MGR_FORM_TAG_MULTIPART},

-SHOP_ORDER_FORM_FIELDS was modified to incluide the OrderComments

The following new flags were added:

-SHOP_AUTO_REDIRECT_TO_SECURE_CHECKOUT => 0,
-SHOP_AUTHENTICATE_BEFORE_CHECKOUT     => 0,

When you set the first one, the checkout will automaticall reload in secure mode.
The second tag forces the user to authenticate before reaching the checkout.

-DB_LANGUAGES          => \@DBLanguages,
-DB_LANGUAGES_REQUIRED => \@DBLanguagesRequired,
-DB_DEFAULT_LANGUAGE   => $DBDefaultLanguage,

The keys above are currently needed only in the manager, and affect the way the language input fields for the tables are displayed.

We also added support for the Iongate and LinkPoint payment gateways. Please read more...>>>

General discussion

If you have order in the order database, you need to rearrange the data in the orders.db, to support the fields that were added. You can customize the example of code in the previous release, to rearrange the order table.

The manager was entirely reworked, now there is a module and a view for every table.

 

 

 

11.December.2001

Most of the manager modules were updated.
If you customized your manager modules, please let me know, and I will post a list of the changes.

Added support for a new product database field: "ProductDisabled".
This was necessary, to support the temporary or permanent disabling of singular items. We updated the ShopDBSetup.pm to support the SQL database creation with this new field, those of you hat have flat file structures will have to update your database to match.
Here is a small script that you can use to extend the existing database, assuming you use the one from the distribution. If not, update the indexes accordingly:

open (FILE, "<product.db")       || die;
open (NEWFILE, ">newproduct.db") || die;
while (<FILE>) {
chomp;
my @Line = split /\|/;
my @NewLine = (@Line[0..19], 0, $Line[20]);
print NEWFILE (join '|', @NewLine)."\n";
}
close NEWFILE;
close FILE;

You can execute this script by hand in a telnet window, while being in the database directory, or put it in the database directory, give it a perl header and some basic output, but don't execute it more than once :)

The following module needed to be modified to support this feature:

ShopSearchLib.pm

 

The shop now supports different time zones, depending on the location of the merchant.
We added in the ShopSetup.pm the following code to support it:

-SHOP_TIME_ZONE_SHIFT     => 9, 
# The above is in hours, the difference between the server and the shop time
-SHOP_USE_TIME_FORMAT => '-DATE_TIME_MIL',
-LOCALE => { ... },

The -LOCALE hash was added to support different setting for every shop. Of course, this is not all, the following modules were directly affected by this change:

store.cgi
manager.cgi
setupdb.cgi
AuthLib.pm
DBLib.pm
EPI.pm
MainLib.pm
CryptLib.pm
TimeLib.pm
ShopOderLib.pm
ShopDBLib.pm
ShopDiscountLib.pm

All manager modules were updated.
Numerous other shop modules were fixed:

ShopBuildTagData.pm

We added tags to support product options display, individually or in group. More info about that will be displayed in the library description, on our page.

ShopDBLib.pm
ShopOrderLib.pm

Aside of the time fixes, a lot of other bug fixes were applied, too many to list them here. You can safely overwrite the old module with this one. I would not expect you to customize these modules anyway, and if you do, you would keep track of your changes, right? ;)

ShopProcessOrderItems.pm

An error reporting bug was found and fixed.

OrderFormVIEW.pm

We finally fixed the javascript for the multiple click checking, so it now works with older browsers. Also, the link to the secure site will bring you back to the order form.

ShopFormatting.pm

The $OneClickJavascript was removed from the module, and some locales support was added.

ManagerFormatting.pm

Two keywords were added to support the ProductDisabled field.

 

Other changes:

We removed the setupstore.cgi from the distribution, because it was too confusing for a lot of people. There is still a downloadable version of the module available, but you should use it at your own risk. After all, installing the store manually does not take too long, and all you have to do is set up some files/directories rights, and the right paths in the main scripts and in the This.pm.

The module This.pm was considerably restructured, to avoid confusion. The main scripts support the old version too, so you will not have big troubles in the transition.

 

17.October.2001

A few bugfixes. A couple new things.
Also, please update your manager libraries and views, a few were updated.

AuthLib.pm
MainLib.pm
CryptLib.pm
DBLib.pm
ManagerFormatting.pm

We replaced the AuthEncryptWrap() method in the MainLib.pm with a wrapper, ComparePassword(), which implements the CryptLib.pm package. A couple bugs were found and removed in the DBLib.pm, mainly in the SQL implementation. Then, since we added some features in the manager, please update your ManagerFormatting.pm, to get the latest messages.

ShopBillingLib.pm
ShopBuildTagData.pm
ShopDBLib.pm
ShopOrderLib.pm

A key -ORDER_DESCRIPTION was added to the ShopBillingLib.pm, since some payment gateways might request it. The ShopBuildTagData.pm is a work in progress, we are about to add some new tags. Come up with your ideas. We moved the methods _InsertDBRecord() and _UpdateDBRecord() from the DBLib.pm to the ShopOrderLib.pm. Currently the only library affected by it is the ShopOrderLib.pm, where you will have to change the function calls (compare the code).

OrderFormVIEW.pm

We needed to make a small change at line 72, to support lowercase response of some https implementations:

$HTTPSMessage = $ENV{'HTTPS'} && uc $ENV{'HTTPS'} eq 'ON' ?

 


07.October.2001

Quite a few changes in this release.
The most notable addition is the support for SQL, using DBI. Please be aware that the DBI/SQL is experimental at this time, and some things might not work right. We would like to hear from you the problems that you have with that, so we can work them all out.

First of all, we had to modify the upsell.db and remove the index column. Right now, the category is the index of that table.

AuthLib.pm

Fixed two bugs:
- at line 222 we had an exclusive check of the name, but names with more than two words were not accepted
- at line 237 we switched the order of the password assignmed, since the user could not choose their own password.

CryptLib.pm

This is a new library, used for data encryption. We implemented the following interfaces:

  • Unix crypt
  • MD5
  • SHA
  • PGP
  • GPG

As this is the first time this routine is being used in the shop, please connect with us and share your needs in terms of encryption, so we can build the user interface in a friendly manner. The only place where this interface is implemented in the shop, is in the process of sending the order data to the merchant, where the payment data can be encrypted using PGP or GPG. You will have a hard time installing either of the two, but we make a recommendation to use GPG instead of the PGP, out of a lot of reasons, but mainly cause GPG is free, works fine on NT as well as on Unix, and it is way easier to install.

DBLib.pm

Totally reworked, added support for DBI, without changing the interface for the old library. The DBI support is still in test phase, so please report us any problems you may encounter. We added an object constructor, as it was needed to open the database connections, please take a look at the store.cgi for the way it is implemented.
The key "-TYPE" defines what kind of database interface we address, and it is either "file" or in the format "DBI.city.product", where the first is the interface, then the database name, then the table name. We will explain more about the DBI support in the Libraries/DBLib.pm.

MainLib.pm

There are two minor bugs fixed in the lines 473 and 478, with messages regarding the file upload being displayed wrong.

SendMail.pm

This file will always change as we make small adjustments or add support for other mail daemons. This time we fixed the _BlatSendMail(), since some variables showed undefined values.

ShopBillingLib.pm

We added the -SHOP_BILLING_PHONE at line 59.

ShopCartLib.pm

The line 445 was modified to avoid some undefined variables down the road.

ShopDBLib.pm

The lines 331-332 were modified, adding some check of available products before querying the stock database.

ShopDBSetup.pm

This file was added to provide a place where you can define your tables before migrating the data to SQL. More information about how you can do that, will be displayed in the "Install" section.

ShopDiscountLib.pm
ShopValidateUserData.pm

We made a lot of changes to these modules, just update it in your distribution.

ShopOrderLib.pm

At line 957 we added some code to support encryption of certain data in the email that goes to the admin.

AuthVIEW.pm

We changed the state/country fields to select boxes.

CartVIEW.pm

The message "No Data In The Cart" was not in the ShopFormatting.pm.

MainVIEW.pm

The line 95 needed an extra "</tr>" which was added

OrderFormVIEW.pm

The billing information was moved in front of the shipping information, line 514. We also added a "Logout" button at line 574.

ShopFormatting.pm

A few messages were added/modified to conform with the changes. We modified also the routine that returns the shipping array, so you can display in the order form only the fields that are enabled in the ShopSetup.pm.

A few words to the SQL implementation. We provide a transition module, that helps you move your data from the flat-file format, to the SQL database(s) of your choice. The ShopSetup.pm was adapted to help you with your translation. The move itself is rather complex, and we are happy to help the people making a correct migration, on a case by case basis, at our common hourly rates. It takes about an hour to get all set up with SQL, provided you have your database set up and you know your databse user id and password.

 

12.September.2001

We fixed another bugs, thanks to user reports

ManagerSetup.pm
ManagerDBLib.pm
MainLib.pm

Fixed a bug in the ManagerSetup.pm that caused an error in the account data management. The form field list present in the %DBFormFieldsUsed which referred to "accountdata", was including erroneously the floating fields referring to the user input data. We like to emphasize here that the manager is still under development, and such bugs might be present.
We value your input in helping us to fix these bugs.

In the same time, an invalid reference to the account database was made in the ManagerDBLib.pm, which was also fixed.

The MainLib.pm was updated for minor issues, just update the file.

 

11.September.2001

We found a couple bugs that we had to fix.

DBLib.pm

In the DBLib.pm we forgot a duplicate of a subroutine, that was bringing some errors on certains systems. We removed that duplicate, please replace the file.

manager.cgi
ShopSetup.pm
MainLib.pm
ManagerFormatting.pm

We added data export feature.
This means for you, that you can export the shop data in tab-delimited, or CSV files. We use for this purpose the directory "Export", which has to be chmodded 777 on Unix systems. Some other manager modules and views were updated as well.
The ShopSetup.pm was updated with a key to point to the export directory, needed in the manager:

-SHOP_DATA_EXPORT_PATH => $Path.'Export',

Of course, you can set that path to point where you want on your system, just make sure it is writable by the script.

This.pm

We added support for auto-setting the shop, depending on the domain that is used to call the shop from:

-DOMAIN_MAPS_TO_SHOP => {
  'mydomain.com' => 'city',
},

If the browser uses a different domain to access the script, and it does not pass the correct shop parameter, the default shop will be loaded.

 

10.September.2001

This release brings a couple bugfixes and cookie support.

DBLib.pm
MainLib.pm
AuthLib.pm

Update these three files. The DBLib.pm was modified to offer support to additional modules, like DBI support. One of the later versions will maybe implement the rest. The MainLib.pm was fixed in a couple places, mainly variable scoping issues. The AuthLib.pm was modified to fix the bug with missing recipient when you send mail from the module.

ShopBillingLib.pm

This module had a minor glitch at line 33, redefining the %MethodOK hash, that line was deleted.

ShopSetup.pm

The settings for cookies were updated, as the shop now correctly implements cookie support. The keys concerned are:

-SHOP_USE_COOKIES => 1,
-SHOP_COOKIES => {....},

Also the key -SHOP_FX_OVERRIDES_COOKIE was removed as being obsolete.

store.cgi
manager.cgi

These were updated to implement correct support of cookies. You can enable cookies in the manager too (we do not recommend that), by setting the key:

$S->{-MANAGER_USE_COOKIES} = 1;

Also we moved the _Run() at the end ond the file. This, and other subroutines must be rearranged in the correspondent modules, if you get the following kind of error in yor server log:

store.cgi: Subroutine ProcessAction() redefined at store.cgi line xxx.

This is not an error, but rather a warning, and could be supressed, but we chose to do things by the book.

 

06.September.2001

Again big changes.

This time it's the templates. We implemented support for static pages in the previous version, but it was still a bit confusing, We made some changes in the tag design, all the templates will have to be modified. Also, the store.cgi and manager.cgi were modified to support the code.

What it this all about? Read in the templates doc page.

Some bugs were fixed:

  • we changed SendMail.pm to support "Reply-To:" for Sendmail
  • we added in the ShopFormatting.pm an array to support the chosen language display: @LanguageFieldData. We have plans to implement a "change language" feature in the next release. If you want to do that on your own, the code you look to modify is in the MainVIEW.pm.
  • we corrected a shipping problem with the products that have "ship individually" as an option.
  • the previously added account database feature was reviewed, and a couple bugfixes were made to the ShopExtendedOrderLib.pm.
  • The DBLib.pm was modified a bit to improve performance.
  • A bug was fixed in the AuthLib.pm that was responsible for not emailing the new user data. The ShopEmailUserData.pm, AuthVIEW.pm, and ShopOrderLib.pm were also modified to support the changes.

Please update your ShopFormatting.pm and ManagerFormatting.pm since new messages were added, to support the new features that are listed below.

Added features:

A new payment gateway for NovaInfo.

Due to the beta status of their gateway, we culd not get appropriate information regarding the error messages returned by the gateway. It is functional, nevertheless.

The new user gets an email with an account activation link.

That allows the shop owner to identify users that have a valid email address.

Added support for blocking users by IP address from accessing the shop.

Right now the feature is rudimentary, and there ns no interface in the manager for it. We added a key in the ShopSetup.pm, which enabled the feature:

-SHOP_RESTRICT_ACCESS => 1,

The database table addedto support this feature is named "ipdata.db", and has the following structure:

start IP address | end IP address
...

You can enter the ranges manually, and if the user is not allowed to acces the shop, the template "AccessDenied.html" is used to produce output. The ShopValidateUserData.pm was extended to support the feature.

Please also note that most of the manager modules were updated. The manager is not in beta yet, so please keep track of your customizations.

 

28.August.2001

If you downloaded this update before 28 August, we found a couple bugs in the:

  • ShopOrderLib.pm - bug preventing the credit card processing, in the _CheckPaymentData()
  • ShopBillingLib.pm - $OX->{-ORDER_WARNING} was set on 1002 instead of 1001
  • Views/AuthVIEW.pm - wrong variable referencing
  • Views/OrderFormVIEW.pm - a couple keywords defined wrong
  • ShopFormatting.pm - missing descriptions for a couple keywords

We are sorry for the inconvenience, please re-download the zip and just update those files.

Also, we found the bug in the ShopCartLib.pm, which affects the correct calculation of options.
In the line 719 you have the code:

else {
  $x->[$CIxCITP] = $IProdPrice * $IProdQuantity;
  $x->[$CIxCDPP] = $IProdPrice;
  $x->[$CIxCID] = 0;
}

please change that to read:

else {
  $x->[$CIxCDPP] = $IProdPrice + $x->[$CIxCOP];
  $x->[$CIxCITP] = $x->[$CIxCDPP] * $IProdQuantity;
  $x->[$CIxCID] = 0;
}

Changes brought to (almost) all the shop modules:

The main change brought by this update is to add support for easier translation of the language content. There is now a "$ShopIsInTemplateMode" variable in the ShopSetup.pm and in the ManagerSetup.pm. This variable defines/helps define where the views for the shop/manager are located. We hardwired the manager to be in template mode by default.

Before we go into any details, you will have to search and replace in your code for the lines that request the ShopFormatting.pm and the ManagerFormatting.pm and make sure they have the follwing format:

RequireFile($S->{-SHOP_VIEW_LANGUAGE_PATH}, 'ShopFormatting.pm');

Then, please go in the ShopSetup.pm and make sure you have the code:

-SHOP_VIEW_PATH         => $ShopIsInTemplateMode ?
 $Path.'Views' : $Path.'Views'.$SL.$LanguagePath,
-SHOP_VIEW_LANGUAGE_PATH => $Path.'Views'.$SL.$LanguagePath,

A similar setup is needed in the ManagerSetup.pm:

$S->{-SHOP_VIEW_PATH} = $S->{-SHOP_PATH}.'Views' if $ShopIsInTemplateMode;

Now to the gory details:

When the shop/manager is in "Template Mode", the views are located one folder down from the original location, and the messages are taken from the language hash in the ShopFormatting.pm / ManagerFormatting.pm.

We chose not to provide the manager other than the template form, since that part of the shop is in continuous development, and it's difficult to maintain two distributions at one time. The shop views however, are present both in the template format and the "hardwired" version.

The reason for this big change was that a lot of people wanted to help us translate the shop, but they did not feel comfortable doing it by weeding through Perl code. In this version, all you have to do is translate the two files: ShopFormatting.pm and ManagerFormatting.pm. Of course, the templates have to be translated as well, but that is static content.

Added support for static content / active tags

In the ShopSetup.pm we added a set of keys:

-SHOP_HTML_PATH => {
  P => $Path.'Html'.$SL.'P',
  Category => $Path.'Html'.$SL.'Category',
  Author => $Path.'Html'.$SL.'Author',
  spage => $WebRootPath,
},
-SHOP_USES_STATIC_PAGES => 1,

Of course, this is backed up by the addition of a key/hash in the This.pm:

-SHOP_WEB_ROOT_PATH => {
  'city' => 'w:/http/city/www',
},

once this feature enabled, the static page concept works as follows:
If the script call includes the parameter "P" which usually calls for the shop auto-generated product page, the script will look in the path defined by $S->{-SHOP_HTML_PATH}{'P'}, and check if a file or a directory exists, named the same as the product ID. If a plain file is found, it will be used as a template; if a directory is found, the default document will be loaded (index.html), and used as a template.

Same way ot works for categories or author pages (I know, you did not see the "Author" anywhere, it is put there to make it easier for you to create customized views).

Just to give you absolute freedom in managing static content, we included an extra parameter named "spage", which stands for "Static Page". As you notice, the parameter points in the ShopSetup.pm to the root of your web folder.

A word of caution here: in order for the static tags to work, the shop.cgi needs to handle that page. By loading the page itself in the browser, no script tags can be processed!.

Otherwise, the basic rules from the templates apply. Here are a couple examples of tags, read more about it in the description of the associated library (ShopBuildTagData.pm):

A static product page, with a product price insert:

<cityshop:display:ProductPriceHTML/>

An order quantity box, with fancy display:

<cityshop:display:ProductOrderQuantityField:100005:1:select:1;2:one;two:Select Amount/>

The ShopBuildTagData.pm is not in beta yet, and it is being worked on; so is the concept of the tags. We are working on refining the concept and making sure people have an easy way to implement them. If you feel like building your own code in there, go on, read through the library, get the hang of it, and by all means, customize it :)

Just to make an example, we implemented one product page in static mode, for the "Programming Perl" book. Take a look at the static file, located at: Html/10005.html.

We do want to caution you that using static pages slows down the shop by at least 25%.

Added support for benchmarking

You can display now timing information if the shop is in debugging mode. We use for that the CPAN module Time::HiRes. You will have to install this module before you can use the timer routine.

To start the timer, use the syntax:

StartTimer($S);

And then for setting up a time flag, anywhere where you have the MainLib.pm in the module header, use one of the following formats:

AddTimerEvent($S, 'Step Name');


my $Lap = AddTimerEvent($S, 'Start of the PROCESS X');
...
AddTimerEvent($S, 'End of the PROCESS X', $Lap); 

The first example simply sets the timestamp, while the second sets a marker for the process start, and measures then the time take by that process only. If this procedure is to be used across modules, you can use the $S hash to hold the flags, using the format: $S->{-TIMER_DATA}->{'PROCESS X'}.

Note that the timer might not work when you use mod_perl, I saw that happening on one system before, I assume that has to do with the system path...

Added a database for Account payment

There is a new payment method, named "Account". There is no manager interface for that database, but it functions on the following principle:

You have a number of companies that are defined as having an open account with the shop. An user has to know the account number, enter it in the order form, and if the order is successful, the user is added to the list of users for that company.

This process can be extended with actually billing that company for the order, but we chose to make it a passive order submittal.

The company can be defined such as not allowing new users to be added unless entered in the shop manager, or to having limit the number of users that can be added.

 

08.August.2001

We fixed some bugs in the libraries. The modules generally affected by changes in shop engines, or that got minor bugfixes, are listed below:

store.cgi
manager.cgi
DBLib.pm
MainLib.pm
FormLib.pm
ManagerLib.pm
EPI.pm (and all the related gateway modules)

The ShopSetup.pm was also updated to reflect changes.
The following shop modules were changed slightly, to reflect the patches.

ShopMenuBuilder.pm
ShopDisplayCart.pm
ShopDBLib.pm

There are a couple of fixes brought to these modules that were necessary for the correct price formatting.

ShopShippingLib.pm
ShopOrderLib.pm
ShopBillingLib.pm
OrderFormVIEW.pm

Implemented shipping in split mode, depending on the product shipping flag.
Fixed a bug that removed twice the number of items from stock.

ShopFormatting.pm

The ShopFormatting.pm contains now the buttons and any other fancy formatting of prices or options.

OrderDataVIEW.pm
AuthVIEW.pm

The ShopProductBuilder and its files was updated in a couple places, small bugfixes like undefined vars and such:

ShopProductBuilder
ShopDisplayProductList.pm
ShopDisplayProductFullScreen.pm
ShopDisplaySearchResults.pm
ShopDisplayUpsell.pm

 

24.July.2001

We made again some changes to libraries. The modules generally affected by changes in shop engines, or that got minor bugfixes, are listed below:

store.cgi
DBLib.pm
MainLib.pm
ShopDBLib.pm

The ShopSetup.pm was also updated to reflect changes.

Here is a list of all that was added:

ShopFormatting.pm
CartVIEW.pm
ShopCartLib.pm

We made a change in the CartVIEW.pm, adding a routine in the ShopFormatting.pm to handle the formatting of a "delete from cart" link. The ShopCartLib.pm was modified to reflect the changes. This was necessary, since the previously used "sprintf" caused problems with certain item or option ID's.

We implemented also support for promotion codes, which basically enable a disabled discount. The promotion data is saved in the session file, and the activation logic is in the ShopOrderLib.pm.

Also, a bug in the ShopCartLib.pm was fixed, that doubled the number of items in the cart, if items were merged.

ShopOrderLib.pm

The ShopOrderLib.pm was modified to support a few things. One is the states tax database, and the country tax database. You can now define a tax and/or handling fee for every state or country. In its current version, the states are only for US and Canada, anything else will be calculated using the country table. In order to assure a safe state/country display, we defined the country/state display in the order form as select boxes. If one of the databases is missing, a blank input box will be displayed. You will need at least the states.db for the US and CA tax.

We added a key in the ShopSetup.pm to support the display of a default image, should the item image specified in the database be missing. the key is:

 -SHOP_HIDE_MISSING_IMAGES => 1,

Unless you really, really need this feature, turn it off, since it uses system resources.

ShopProductBuilder.pm

Some of the file routines were spawned in 5 other files, to distribute processing, and speed things up. I am really sorry, but you will have to redo all the changes you might have implemented in the code of the old library. There are a lot of reasons for this split. To note the most important, you can build your custom product display routines, for example depending on product category, manufacturer, or whatever you choose.

For the previously described -SHOP_HIDE_MISSING_IMAGES, we put some code in the _FormatData(), which will make all this possible. First of all, the variable $ImgPath was renamed to $ImgBaseURL, to eliminate some confusions. The modified, and the newly added variables are:

my $ImgBaseURL  = $S->{-SHOP_IMAGE_URL}.'/products/';
my $ImgBasePath = $S->{-SHOP_IMAGE_PATH}.$SL.'products'.$SL; 

The following line was added:

 $Img = '' if $Img && $S->{-SHOP_HIDE_MISSING_IMAGES} 
                   && ! -e $ImgBasePath.$SL.$Img;

The next major change brought to this library is the support for hiding items out of stock, but it comes with the price of up to two more database queries:

my $HideOutOfStock = $S->{-SHOP_HIDE_ITEMS_OUT_OF_STOCK} || '';
... # then, in all the needed places... ;) $DBData = _FilterItemsOutOfStock($S, $DBData, $DataIndex) if $HideOutOfStock;

It is to be noted that once in the cart, the product can be seen, even if it is out of stock, and cannot be re-ordered. We will keep this like that from a variety of reasons (bookmark validity, cart display,...).

Unless you really, really need this feature, turn it off, since it uses system resources.

Fortunately, the cart provides a mechanism that disallows the user to place the order for such an item. Also, if we address the product page with a bookmarked link, that will also display the product. You will find out that is cheaper to ignore this feature for shops with a big database, due to the performance issues.

OrderFormVIEW.pm

A bug was fixed that prevented the credit card submission. The credit card fields were named wrong (CreditCardNumber, instead of CCNumber, same thing for the expiration date).

 

17.July.2001

WE RECOMMEND UPDATING THE LISTED MODULES FOR THIS RELEASE.
PLEASE ALSO NOTE THAT THE PRODUCT AND CART TABLE WERE MODIFIED IN STRUCTURE

We made extensive changes to the following libraries:

store.cgi
manager.cgi
DBLib.pm
MainLib.pm
SendMail.pm
ShopFormatting.pm
AuthVIEW.pm
OrderFormVIEW.pm
CartVIEW.pm
ProductVIEW.pm
MainVIEW.pm
SearchVIEW.pm

as well as almost all the shop engines. The ShopSetup.pm was also updated to reflect changes.

It might seem quite a jump, modifying so many modules. Here is a short list of what is available as of this update:

  • support for minimum and maximum order, product downloads, timed product delivery.
  • multiple currencies
  • database manager almost done in most areas
  • discounts are fully implemented
  • orders are saved in the database, emailed, filed, you name it, they do it
  • email finally working

Do yourself a favour and install Mail::Sender from CPAN, it is a treat :)

As of today, I will spend some days updating the site with all the changes...

28.June.2001

WE RECOMMEND UPDATING THE LISTED MODULES FOR THIS RELEASE.
PLEASE ALSO NOTE THAT THE PRODUCT AND DISCOUNT TABLES WERE MODIFIED IN STRUCTURE

A new directory (data) was added to support downloadable content. The support for the downloadable content is not entirely implemented, that will come with one of the next releases.

The database manager

We added the discounts in the table management. The input mask is self-explanatory.

The product table was extended with a few fields to support limited quantity ordering and downloadable content.

ManagerDBLib.pm

Some untainting check has been enforced in the _UpdateProductImage() routine, that caused failure while copying a file on Unix, because the target path was tainted. Strangely enough, the NT port of Perl (Activestate) did not report any error.

This.pm

A few obsolete keys were removed, and some were added, like the keys for secure order link. I guess that in the next version I might implement these links as specific to the shop.... we will see.

CreditCard.pm

Added a line to support the credit card test number "4111111111111111".

store.cgi
manager.cgi
DBLib.pm
MainLib.pm
ShippingUPS.pm

Some minor internal corrections, mainly undefined variable stuff. Just upload the files.

SendMail.pm

Added support for Blat on NT.

ShopUserDataLib.pm
AuthVIEW.pm

A few minor corrections were made to support the editing of user records (it did not work properly).

ShopOrderLib.pm
ShopProductBuilder.pm
ShopCartLib.pm
CartVIEW.pm
OrderFormVIEW.pm
ShopFormatting.pm

Added support for minimum/maximum ordering of items, as well as extended support for stock handling. The product record was also extended with a few extra fields:

ProductDeliveryMethod
ProductDownloadData

These fields relate to the delivery method, and offer a name of the file to download, if needed. The order will not yet display the download links, that will be done in a later release.

ProductShipsIndividually
ProductPackingFactor

The first field was added to support separate shipping, and the second indicates how many items fit in a package.

ProductMinimumOrder
ProductMaximumOrder

For the items that have a minimum or maximum ordering quantity, we added these fields, and reworked the routines above to support them.

We will describe the extra added features in the module descriptions, when available.