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

Last Updates (please read!)

All the old updates have been archived here, to keep the log file small.

2 January 2008

The shop script has been made available free of charge.

23 April 2005

That's right, no updates in a long while. That's why we are working now to compile the small patches that were applied over time, and will release a 1.3a version shortly.

14 November 2003 - version 1.3

Although we consider this an update, it is quite an extensive one... please consider installing it, testing it, and you will see that it is worth the extra work of installing from scratch :)

About the modules changed:

It would be easier to list what did _not_ change... we applied a lot of bugfixes to the people's request, and made lots of changes in the manager. I will attempt to build a list of the modules that changed, in the next few days.

If you don't have a lot of experience with Perl, you might want to take your old templates and the database, and use them in the new version. It is way, way less work that way. The templates did not change.

27 April 2003 - version 1.2a

We consider this an update, please consider the extra work :)

Update these modules, whatever you do:

store.cgi
manager.cgi

Library/AuthLib.pm 
Library/CryptLib.pm 
Library/DBLib.pm 
Library/EPI.pm 
Library/FormLib.pm 
Library/MainLib.pm 
Library/PaymentLib.pm 
Library/SessionLib.pm 
Library/ShippingFedEx.pm 
Library/TimeLib.pm 

 

The following shop specific modules were also updated:

ManagerAdminExportLib.pm
Added a line of code at line 82 to avoid an error when no data was found:

 $Data = [] if ! $Data;

ManagerDBLibManageruser.pm
Was rewritten to avoid some errors while trying to delete manager users.

ManagerDBLibOptions.pm
Was rewritten to support the new fields ApplyPercentsToPrice and PriorityLevel

ManagerDBLibOrder.pm
Was rewritten to allow the user email to be sent when changing the order status to "shipped" (it was not working before)

ManagerDBLibProduct.pm
The line 179 was corrected to:

 $PId = $FX->{$PMap->{$PKey}} = $PData->[0]->[$PIx->{$PKey}] if ref $PData;

ManagerSearchLib.pm
The line 128 was replaced with:

 $SKey =~ s/^\s+//;
 $SKey =~ s/\s+$//;
 @Keywords = (split /\s+/, $SKey) if $SKey ne '*';

ManagerSetup.pm
The hash value for options in the %DBFormFieldsUsed was changed to support the 2 new fields ApplyPercentsToPrice and PriorityLevel

ShopBillingLib.pm
Was rewritten to correct multiple errors when using -MERCHANT_DATA_MAP for credit card gateways

ShopCartLib.pm
Was rewritten to correct some inconsistencies with the global discounts and to support the new option fields

ShopDBLib.pm
The line 138 was changed to point to the private MainLib function:

 $Name = MainLib::_escapeHTML($Name);

The correspondent exported MainLib function was renamed to EscapeHTML, to avoid warnings from CGI.pm

ShopDBSetup.pm
The amount fields were changed to the 12.3 format to reduce the chance of rounding errors.
The entry for the options data table was extended to support the two new fields.

ShopDiscountLib.pm
Was rewritten to correct some inconsistencies with the global discounts.

ShopDisplayProductList.pm
Was extended to support the display of options in the product listing.

ShopDisplaySearchResults.pm
Was extended to support the display of options in the product listing.

ShopOrderLib.pm
We added at line 639 the following line to support saving the promotion ID in the order:

 $OX->{-PROMOTION_ID} = _ReadPromotionIDFromSession($S);

Of course, the _ReadPromotionIDFromSession() was added down the file.

ShopProductBuilder.pm
We inserted a key in the config hash at line 609:

 -DISPLAY_PRODUCT_OPTIONS => $Cfg->{-DISPLAY_PRODUCT_OPTIONS} || '',

This was necessary to support the display of options in the product listing.

ShopSetup.pm
The 2 new fields ApplyPercentsToPrice and PriorityLevel were added in the hash corresponding to the option table.
The hash %DatabaseMapToForm was also updated to map a field for the order table:

 'PromotionID' => '-PROMOTION_ID',

ShopUserDataLib.pm
We inserted at line 38 the function call:

 return _ChangePassword($S, $UserID) if $Mode eq 'EditUserPassword';

The function _ChangePassword() was inserted towards the file end.

ShopValidateUserData.pm
The database access hash that updates the user record was modified to save the time stamp of the account activation.

Views/AuthVIEW.pm
Was updated to add the password change feature. At the line 158 we added the code:

  elsif ($Mode eq 'Pass') {
    $Display = _MgrPassDisplay($S, $TS, $AX, $AuthError, $UserID);
  }

The function _MgrPassDisplay() was added in the file.

Views/CartVIEW.pm
Some messages were rearranged, only cosmetics.

Views/FormattingVIEW.pm
The function _FormatEmailValidationLink() was rewritten to clean up the code a bit.

Views/ManagerDBoptionsVIEW.pm
Was rewritten to support the 2 new fields in the option table.

Views/ManagerDBproductVIEW.pm
We added at line 149 the following:

 $FX->{'ProductDeliveryMethod'} = 'N' if ! $FX->{'ProductDeliveryMethod'};

This will allow the ProductDeliveryMethod to have a start value.

Views/OrderFormVIEW.pm
The code at line 631 was modified to supress the display of a reset button on the "Bill Me" payment option.

SearchVIEW.pm
The form tags were added to the extended search display (line 119 and below);

Views/xxx/ShopFormatting.pm
Views/xxx/ManagerFormatting.pm

Some new messages have been added

 

 

 

20 December 2002 - version 1.2

We name this the X-mas release :) A lot has changed, it would be easier to say what modules did not change... we will go through them anyway, the list of changes will be posted shortly.

Update ALL the modules in the Library folder.

Update store.cgi, manager.cgi

Update these modules, whatever you do:

ManagerDBLib.pm 
ManagerDBLibAccountdata.pm
ManagerAdminBackupLib.pm
ManagerAdminEditFilesLib.pm
ManagerAdminExportLib.pm
ManagerAdminImportLib.pm
ManagerAdminProcessLib.pm
ManagerMenuBuilder.pm
ManagerReportOrderLib.pm
ManagerReportPaymentLib.pm 
ManagerReportProductLib.pm 
ManagerReportUserLib.pm 
ManagerSearchLib.pm 
ShopBillingLib.pm
ShopBuildTagData.pm
ShopCartLib.pm 
ShopDBLib.pm 
ShopDiscountLib.pm 
ShopEmailLib.pm
ShopOrderLib.pm 
ShopUserDataLib.pm

We replaced all the occurences of MainLib::_SafeSystemPath() with SafeSystemPath() which is now exported by default by MainLib. The changes are optional, they are meant to simplify the code. Here are the files affected:

The ManagerAdminImportLib.pm was modified to support post-import processing. For that matter, the ManagerAdminImportProcessLib.pm was created. To say it in a few words, it is meant to pick up data files from the -SHOP_UPLOAD_PATH_DATA and move them in the downloadable content folder for that item. The file names will be readjusted to remove spaces and special characters. We see this library as experimental at this time.

All these being said, here is what else you should update:

The following modules were modified to avoid a crash when a sql database does not return the inserted field. It is recommended to updated them.

ManagerDBLibAccountdata.pm
ManagerDBLibAuthors.pm
ManagerDBLibCategories.pm
ManagerDBLibCountries.pm
ManagerDBLibDiscount.pm
ManagerDBLibManageruser.pm
ManagerDBLibManufacturers.pm
ManagerDBLibMusicstyles.pm 
ManagerDBLibOptions.pm
ManagerDBLibOrder.pm
ManagerDBLibProduct.pm
ManagerDBLibPromotions.pm
ManagerDBLibStates.pm
ManagerDBLibUpsell.pm 
ManagerDBLibUser.pm
ManagerDBLibUserdata.pm

Some bugs were removed in ManagerDBLibProduct.pm.

ManagerDBLibUser.pm was extended to support user notification of changes.
ManagerDBLibUserdata.pm was extended to do a credit card number check before inserting in the user credit card table.

ManagerSetup.pm
This library was updated to support some new definitions:
the new key -MANAGER_REPORT_ACCESS_RIGHTS defines the user group access to reports.
the new key -MANAGER_PAYMENT_MODE_CHARGES defines rates for the payment mode transactions (mainly credit cards) which will allow for more accurate order reports. We recommend looking in the code to understand the structure.
-MANAGER_AUTH_SETUP was updated to deal with changes in AuthLib.pm.

ShopBillingLib.pm
This library was updated to assign fields for ECheck and ACH transactions. Also the complementary code was embedded. Starting with this version, -MERCHANT_DATA_MAP in the ShopSetup needs to have a merchant hash entry for every payment mode supported by the merchant gateway (i.e. CreditCard, PurchaseCard, ECheck, ACH). The -MERCHANT_DATA key is therefore obsolete.

ShopBuildTagData.pm
We removed the entries for AddTimerEvent() which is now handled differently.

ShopDBSetup.pm
We added some new fields to tables, and optimized a bit the table structure. Since you might have changed things in the table structure, we recommend comparing the code and making the changes where needed.

ShopDisplayCart.pm
We patched the code to avoid crashes when product options were deleted from the options table, but not from the product.db. Basically, instead of:
if ($POptions) {
we use now:
if ($POptions && $OptionData && $OptionIndex) {

ShopDisplayProductFullScreen.pm
As mentioned above, some code was changed in this library too, to avoid the troubles with the missing options.

ShopDisplayProductList.pm
ShopDisplaySearchResults.pm

A few cosmetic code changes were made, update is optional.

ShopEmailLib.pm
ShopEmailUserData.pm
ShopProcessOrderItems.pm

We pass now the $S to the ShopEmailLib.pm library, so we can allow message keys in mail tags.

ShopOrderLib.pm
This library was extensively upgraded to support detailed tax display, proper handling calculation, etc.

ShopShippingLib.pm
The "uspst" mode was added, which is USPS using shipping tables. This is a temporary thing, until we find a better solution to support shipping tables. A module for that is in the works.

ShopUserDataLib.pm
A credit card number check was added.


A list of view changes is being prepared, and will be displayed shortly.

 

 

 

25 July 2002 - version 1.1 - correction

We are sorry, but we found an error in the processing of the WorldPay payments, and we had to fix it. You will need to update the following modules from the last available download:

store.cgi
Library/PaymentLib.pm
Library/SubmitNetSSLeay.pm
Library/EPI/worldpay.pm 

 

22 July 2002 - version 1.1

The version 1.1 brings a lot of good things, please read the following carefully.

We implemented a lot of new things, like manager reports, template editor interface, packing slips, etc...

PayPal seems to work again fine, along with other problem gateways. We took the extra time, and tested every one of them. You will have to update the EPI.pm and all the files under Library/EPI.

Here is the list of the core modules that you will have to update:

store.cgi
manager.cgi
Library/EPI.pm Library/EPI/*.pm - all the modules Library/FormLib.pm Library/MainLib.pm Library/ManagerLib.pm Library/PaymentLib.pm Library/SubmitLWPUserAgent.pm Library/SubmitNetSSLeay.pm

The Library/Time has done its time, we trimmed down the code, and eliminated the need for it. If you update the shop modules correctly, you can delete it.

 

We added support for printing packing slips. For that, a new directory has been added: Logs/packingslips. You will need to flag this directory 777. There is also a new template to go with it, please update that in all the language folders that you use:

Templates/eng/OrderPackingSlip.txt
Templates/eng/ManagerDataView.html

Note that the ManagerDataView.html is a new manager template that is used for viewing the packing slip in the manager order overview.

 

New language-specific messages have been added. If you did not modify the files under the Views/eng and the other languages, you can update all the ShopFormatting.pm and the ManagerFormatting.pm files.

 

New manager modules

With the added functionality, a lot of new modules have been added, and existing modules have been adapted to work properly. Here is a list of the new modules:

 

Templates/eng/ManagerDataView.html

As specified above for the packing slips, this manager template is used to display the printouts.

 

ManagerAdminEditFilesLib.pm
Views/ManagerADMeditfilesVIEW.pm

We added support for editing the templates in the manager interface. You will still need to read the documentation on the Nightmedia site, but we made it easier for you. Remember, web interfaces are not a replacement for FTP upload, you should ALWAYS keep a copy of the latest shop version offline. Please get used to make regular site backups!

 

ManagerAdminProcessLib.pm 
Views/ManagerADMprocessVIEW.pm 

This is a tool to process billed orders in a batch. This function will search the order data table for all the order marked "billed", will mark them "processed", and exports all the shipping related information in a file that will be used to print the shipping labels. If the order was using the billing address as shipping address, then the billing address will be exported, and a flag will be set to mark this difference, in the field named "UseBillingForShipping". If you want to mark the orders "shipped" instead, you have to change the code in the ManagerAdminProcessLib.pm.

 

ManagerReportOrderLib.pm
ManagerReportProductLib.pm
ManagerReportUserLib.pm
Views/ManagerREPproductVIEW.pm
Views/ManagerREPuserVIEW.pm

Reports, reports, reports. We covered the needs of the many with this release, please email us if you want a custom order view that is not covered by these reports, and we will work out an estimate for you.

 

Modified modules

Here are the modules that you should update "as-is":

ShopBuildTagData.pm
ShopCartLib.pm
ShopEmailLib.pm
ShopProductBuilder.pm
ShopSearchLib.pm
ShopUserDataLib.pm
ManagerDBLib.pm
ManagerReportLib.pm
Views/ManagerADminVIEW.pm
Views/ManagerADMbackupVIEW.pm
Views/PaymentPayPalVIEW.pm
Views/PaymentQentaVIEW.pm
Views/PaymentWorldPayVIEW.pm

 

The following modules have extensive changes to accomodate the new features, or plain too many changes to list them all here. If you did not modify the database structure or the manager menu, you can update them as-is, otherwise you have to compare and apply your changes to the new modules.

ManagerMenuBuilder.pm
ManagerSetup.pm
ManagerDBLibProduct.pm
Views/CartVIEW.pm
Views/ManagerDatabaseVIEW.pm
Views/ManagerDBaccountdataVIEW.pm
Views/ManagerDBartistsVIEW.pm
Views/ManagerDBauthorsVIEW.pm
Views/ManagerDBcategoriesVIEW.pm
Views/ManagerDBcountriesVIEW.pm
Views/ManagerDBdiscountVIEW.pm
Views/ManagerDBmanageruserVIEW.pm
Views/ManagerDBmanufacturersVIEW.pm
Views/ManagerDBmusicstylesVIEW.pm
Views/ManagerDBoptionsVIEW.pm
Views/ManagerDBorderVIEW.pm
Views/ManagerDBproductVIEW.pm
Views/ManagerDBpromotionsVIEW.pm
Views/ManagerDBstatesVIEW.pm
Views/ManagerDBuserVIEW.pm

 

Here is a list of modules with documented changes:

ShopDisplayCart.pm
ShopDisplayProductFullScreen.pm 
ShopDisplayProductList.pm 
ShopDisplaySearchResults.pm 
ShopDisplayUpsell.pm 

We added support for multiple pricing using a ShopDBLib routine, _SelectPriceFieldName(). Although not necessary, it will be needed by those that plan to use more than one price per product (not available in the standard shop). Also added and optional, is the support for the packing slip display.

Notable improvements in the above modules is the fixed display of product options (where they apply), now the default value in an option is preselected correctly. If you made changes to these modules, we recommend to compare them with the base version that you used for your mods, and apply the changes to your file, or better yet, apply your changes directly to the new file.

 

ShopOrderLib.pm

A new shipping method was implemented, which allows for split-shipping over multiple carriers (not available in the standard store. We included the old file in the release, for those that don't need this.

Notable improvements and required changes are the bits of code needed by the packing slip routine, and some code clean-up in the _CheckPaymentData() routine.

 

This.pm - PLEASE READ THIS

A new key was added to support remote payment methods, like PayPal. It is ABSOLUTELY REQUIRED, and you need to read the EPI documentation about how to configure the SSL backlink using one of the methods listed there. The key in the This.pm is:

-COMMON_REMOTE_ACCESS_METHOD => 'SubmitNetSSLeay',

Valid values are "SubmitLWPUserAgent" and "SubmitNetSSLeay", you will HAVE TO READ the module specific documentation for more information about why and how to install the extra software.

 

ShopSetup.pm - PLEASE READ THIS

The most important things are the following:

The session record structure was modified for the auth_session and transaction_data records. You will need to update these if you use PayPal or similar payment methods.

In order for the authentication routines to work properly with the above mentioned payment gateways, you will need to update the contents of the $DatabaseMapToSession hash, please look in the file and compare. The line that needs to change(a record was removed) will have to look like the following:

 'user' => {-MAP_EXCLUDE => [qw(auth_password TimeStamp)]},

 

A new key was added to support the shop name as printed on the order confirmation:

 -SHOP_NAME => $S->{-SHOP_NAME} || 'The CITY Shop',

You can set this value in This.pm, or just hard code it in the ShopSetup.pm.

 

Two new keys were added in the locale settings, mainly to support the reports in the manager:

-TIME_WEEKDAY_NAME_LONG  => [qw(Sunday Monday Tuesday Wednesday Thursday Friday Saturday)],
-TIME_WEEKDAY_NAME_SHORT => [qw(Sun Mon Tue Wed Thu Fri Sat)],

 

For the packing slips, there are two new keys that define the path to the appropriate directory, and the template used by the packing slip:

-SHOP_PACKING_SLIPS_PATH => $LogPath.$SL.'packingslips',
-SHOP_ORDER_PACKING_SLIP_TEMPLATE => 'OrderPackingSlip.txt',

 

And for the good last, here is the method to configure PayPal and similar gateways in the shop. The payment method is as before, "PayPal", "WorldPay", etc. What changed here, is that we use EPI to process these things, as PayPal was completely integrated in EPI.

Since you can have a normal credit card gateway and PayPal in the same time, here is how it should look in the ShopSetup:

-SHOP_PAYMENT_MODE => [qw(CreditCard PayPal)],
-MERCHANT_DATA => $MerchantData,
-MERCHANT_DATA_MAP => {
  'CreditCard' => $MerchantData,
  'PayPal' => {
    -GATEWAY_NAME => 'PayPal', 
    -MERCHANT_ID => 'me@mydomain.com',
    -EXTERNAL_METHOD => 1,
  },
},

For more information about the PayPal EPI interface, please consult the EPI documentation.