osCommerce Blog

Archive for the 'osCommerce' Category

Restoring From A Backup

Wednesday, February 28th, 2007 by Harald Ponce de Leon
Posted in osCommerce

Some updates were backported today to the osCommerce 2.2 development branch regarding the Backup Manager section on the Administration Tool.

The problem that was addressed was that the contents of the sessions database table was being restored from an earlier state when the backup was made. This behaviour could introduce a conflict in session data when a database restoration would merge the session data if an earlier session ID is currently in use again.

The chances of this occurring would be rare and has been fixed so that the backup logic does not store the contents of the sessions database table in the sql dump, and the restoration logic clears the sessions table when an import is performed.

The changes here will be included in the next 2.2 Milestone 2 update package, and can be manually performed by reviewing commit r1274.

I Want To Ride My Bicycle

Tuesday, February 13th, 2007 by Harald Ponce de Leon
Posted in osCommerce

Hi All! It’s been a while since my last blogging entry so here is a quick wrap-up of what has been happening.

We’re still working hard on the 3.0 Alpha 4 release and wanted to have gotten the final 3.0 release ready at the end of 2006. The features on the roadmap for the 3.0 release are not what is extending the 3.0 release schedule, but the core framework that is continually being improved on during the alpha release development cycle.

The current ticket (OSC-23) being worked on implements batch capabilities to the Administration Tool and is being programmed together with a major framework update. This brings in a more OOP approach to the Administration Tool that matches the Catalog side, and opens opportunities for the core and for add-ons to take advantage of, especially by means of administrative RPC calls.

This is the last major framework update that will be worked on for the 3.0 release, where cleaning-up and polishing will occur during Alpha 5 and Alpha 6.

We’re looking at releasing 3.0 Alpha 4 by the end of the month, and Alpha 5 and 6 quickly thereafter.

I will also post new movies showing some new features on the Administration Tool but this will wait until ticket OSC-23 is finalized.

Frank Heinen has joined the development group in the team and has been of great help with taking care of reported tickets/issues and being active in the community. Our priority is getting the Alpha 4 release finalized, and look forward to working closer with additional developers as soon as it is released to help with future releases.

Over to the community support forums, the forum software was upgraded today and also brings in a change to the representation of the team to the community. All team members usernames have been changed to their real names, and will also incorporate photos of themselves in their user profiles. To keep a reference, the username changes are:

hpdl -> Harald Ponce de Leon
241 -> Stephen Bissett
BlueNoteMKVI -> Chris Dunning
F.R.@.N.K -> Frank Heinen
wendyjames -> Wendy James
modom -> Melinda Odom
The_Bear -> Pierre Rollin
wheeloftime -> Howard van der Burgt
andyy15 -> Andrew Yuen

Please report any unusual problems introduced with the forum software upgrade in the Project Feedback channel on the forums (or directly to a team member if you can’t view the forums at all now :-) ). Please be sure to refresh your browsers cache as there may be some minor CSS or javascript issues.

On the personal side, my responsibilities have increased by being a proud owner of a dwarf-hamster. This was a christmas present given to me and was presented as “I-Ham: Internet Capable Hamster” :-) It’s nice seeing her run around in her environment when I’m still working late at night ;-)

PHP 5.2.0 Compatibility

Monday, November 6th, 2006 by Harald Ponce de Leon
Posted in osCommerce, PHP

PHP 5.2.0 was recently released which “includes a large number of new features, bug fixes and security enhancements” to the PHP 5.x series. The PHP Group also published an upgrade guide for existing PHP 5 users that documents the (incompatibility) changes the new release brings.

osCommerce 2.2 Milestone 2 Update 060817 works fine with PHP 5.2.0 (with register_globals and register_long_arrays enabled).

There is however one change that 5.2.0 brings in that causes osCommerce 3.0 Alpha 3 to produce a PHP FATAL error in the sessions implementation, specifically when the session data is stored in the database (by default for osCommerce 3.0).

This is due to a change in session_set_save_handler() where the “write” and “close” handlers are called after objects have been destructed.

As the sessions implementation in osCommerce 3.0 is done in a class/object, writing session data and closing the session are no longer possible as the registered object would be destructed and no longer exist to perform those duties.

The proper solution here is to use session_write_close() in the destructor of the osC_Session class:

class osC_Session {
  ...
 
  function __destruct() {
    session_write_close();
  }
}

As __destruct() is a PHP 5 feature only, an alternative solution is needed for PHP 4 compatibility (the minimum requirement for osCommerce 3.0 will be PHP 4.1), and that is to register session_write_close() as a shutdown function:

session_set_save_handler(array(&$this, '_open'),
                         array(&$this, '_close'),
                         array(&$this, '_read'),
                         array(&$this, '_write'),
                         array(&$this, '_destroy'),
                         array(&$this, '_gc'));
 
register_shutdown_function('session_write_close');

This has already been reported at our new Issue Tracker and has been fixed at r1107.

Referencing Tickets With Commit Logs

Friday, November 3rd, 2006 by Harald Ponce de Leon
Posted in osCommerce

The Commit Policy for developers has been updated to describe the process of referencing tickets on Jira when the changes involved solve that ticket.

http://svn.oscommerce.com/confluence/x/JQ

When viewing a ticket on Jira, the referenced commit changes will be automatically shown under the “Fisheye” tab where the comments are shown.

The Repository Browser (Fisheye) also automatically links to the tickets when referenced in the commit log.

Arriva! Arriva!

Thursday, November 2nd, 2006 by Harald Ponce de Leon
Posted in osCommerce

The Trac solution on the Development Site that was responsible for the wiki, tickets, and repository browser has been replaced due to the persistent problems it had on the server. The Development Site is now running on 3 new “enterprise-class” solutions that provide more features and flexibility in fostering the developer community.

The solutions now taking care of the wiki, tickets, and repository browser are:

  • Confluence (Wiki)
  • Jira (Tickets)
  • Fisheye (Repository Browser)

Each can be easily reached at:

http://svn.oscommerce.com

The contents of the previous Trac installation have been migrated over to the new wiki and ticket sites. Please note that the accounts created previously for Trac are no longer used, and that a new account has to be created on Jira if tickets are to be submitted or tracked. Please also be sure to replace your Trac RSS subscription feeds to the new feeds each solution provides.

A hardware upgrade of more memory is also pending due to the extra resources the solutions place on the server. These are Java based solutions running on 2 Tomcat application servers; one for Confluence and Jira, and one for Fisheye (which currently requires its own application server), and are being served by the Apache webserver.

The Apache webserver has been tuned due to it basically acting as a proxy server. It was infact about to be replaced by lighttpd but realized that Apache is still needed due to the subversion repository. I am personally still interested in seeing what benefits lighttpd can bring in this setup and will look into it again in the coming weeks.

With the new Wiki site now live and running we are also contemplating moving the content from the Knowledge Base site over to it. Due to the content on the Knowledge Base site being based on current development versions, moving it over to the Development Site will make it a perfect fit where all development related work can be found on the one site. This would then leave the oscommerce.info domain serving static documentation that is produced by the Wiki site for the stable releases.

A change to the Tickets site has also been performed where it will be possible to submit tickets regarding language definitions and developer branches. This has been started on the languages with the developers that have already created user accounts on Jira, and will include the other developers as soon as their accounts have been created. The benefit here is submitting a ticket in a specific category will automatically assign it to the developer working on the job.

The Repository Browser (Fisheye) is also a radical change compared to Trac and will take a few mouse clicks understanding how it works.

It’s fun looking at graphical representations of the amount of lines in the codebase with Fisheye. Additional statistical information regarding the development repository can be found at Ohloh:

http://next.ohloh.net/projects/3341

It’s currently only measuring /trunk/oscommerce and will look at updating it to /trunk/ to also include the languages being worked on.

Overall I’m very impressed with the new Development Site and therefore thank Atlassian (Jira, Confluence) and Cenqua (Fisheye) for making it possible by supplying free licenses to the solutions for Open Source projects 8)

Other changes in our network infrastructure have also occurred the past week where the database server for the Community Support Forums was upgraded. A new faster dedicated server is also being currently prepared to move the German Community Support Forums over to from its current dedicated server. The total number of servers running the osCommerce Network of Support Sites is 5 dedicated servers, in addition Sunsite.dk and SourceForge who mirror the downloads for project releases and contribution files.

Some interesting facts I hope :-)

Common Questions on the Forum

Friday, August 25th, 2006 by Andrew Yuen
Posted in osCommerce

Common questions on the general support/ installation and configuration forums answered:

I see threads pertaining to these common issues too frequently while surfing the forums.

1) SSL Questions

Before posting a SSL question, search the forums.
Then review this article:
Click Here

Also read the following article: SSL, A General Discription

2) Feature Questions

Example:
I need to set a minimum order quantity per product. How can this be done?
or
I want to give my customer’s a discount for orders over $30.00. How can this be done?

Before posting a question regarding the addition of extra features do a search on the contribution section of osCommerce.
Click Here

3) Password Protection of admin area

If you need to protect your admin panel consider using a .htaccess file.
Password Protect Directories

4) register_globals is disabled in your PHP configuration error

To fix this problem I recommend this solution:
a ) create a text file
b ) rename it to php.ini (when renaming be sure to rename the file utitled.txt to php.ini not php.ini.txt)
c ) include the following in this text file (now named php.ini):
register_globals = ON
d ) upload this file into your catalog folder

Feel free to add to this entry, hopefully people new to osCommerce will find this information useful.

Before posting a question.
Always remember to do a forum search. All to often your question will already be answered!

A Suggestion When Installing New Contributions

Wednesday, August 23rd, 2006 by Andrew Yuen
Posted in osCommerce

I added Order Editor 2.6.3 to my store today to deal with orders that customers make with custom ring sizes that require special pricing. When doing so I noticed that I had remnants of order editor 1.6 on my server. Fortunately all turned out well and I got everything to work.

I realized I should have been doing something from the beginning that I wanted to point out to all new osCommerce users. When installing your first contribution to your store I suggest creating a text file and recording the date, name of contribution and contribution version. Then after installing new contribution thereafter, I suggest adding them to this list. I regret not doing this when setting up my store, I now have well over 60 contributions installed on my store but do not know the version of each contribution installed and when it was installed. This information will be very useful if any of the contributions need to be reinstalled or updated/upgraded.

Diff For Mac

Wednesday, July 26th, 2006 by Harald Ponce de Leon
Posted in osCommerce

I haven’t yet found a suitable “diff” application for the Mac that is as good as Beyond Compare for Windows. Under Linux it isn’t a problem as Beyond Compare can run fine under a Wine environment, which is unfortunately not available on the PPC platform.

As the unix “diff” program is commonly available, I followed up its manpage to see what parameters were available to adequately report a listing of different files within two separate directories. The following command meets my demands appropriately:

diff -rq --ignore-matching-lines=$Id: --exclude=.svn --exclude=.DS_Store dir1 dir2

This recursively scans dir1 and dir2 to list different files, while ignoring “$Id:” strings within files and “.svn” directories. Any (Mac specific) “.DS_Store” directories are also excluded from the listing.

I created an alias for this to save retyping the whole command each time I need it:

alias oscdiff='diff -rq --ignore-matching-lines=$Id: --exclude=.svn --exclude=.DS_Store $1 $2'

I can then use that as simple as:

oscdiff dir1 dir2

This helps me when I work on my own development branch and when it is time to commit to /trunk/, can make sure that all changes have been merged over.

Multiple Product Images

Thursday, July 6th, 2006 by Harald Ponce de Leon
Posted in osCommerce

I haven’t been actively online the past few weeks but have been pretty busy offline, and will blog about the past few weeks soon. For now I’m keeping this entry focused on showcasing the multiple product images feature that is finalized and ready to be fine-tuned.

The idea behind the implementation is to define image groups with their relevant sizes and to resize all images in each image group. The primary image group is an “Originals” group that holds the base image to resize from (ie, the largest image size).

The initial implementation was to form an image to image group relationship to only resize images in relevant groups to save on disk space on the server. This relationship was later removed to have images resized in all groups as disk space is cheap, and it’s cool to show a bunch of images ready for viewing when needed.

There are so far 5 image groups defined as default:

Originals
Thumbnails (default)
Product Information Page
Large
Mini

The Thumbnails group is defined as the default group which is shown throughout the catalog. The Product Information Page group is slighly larger than the Thumbnails group and is used on the product information page only. The Large group is larger than the Product Information Page group and is used for the popup window to show the single product image in more detail, or to view additional images of the product. The Mini group was added in last to be used in the You’ve Recently Visited module, and is smaller than the Thumbnails group size.

It’s up to the template on how the images are shown on the product information page. Traditionally it has only shown one image to click on for a larger view, and is now easily possible to show additional images on the product information page relating to a group, with or without the need for a popup-click-to-enlarge feature.

For the default template one image is still being shown on the product information page, and has its popup window dynamically sized depending if additional images exist or not. If the product only has one image defined, the popup window is sized specifically to the Large image. If multiple images exists, the popup window is sized accordingly to fit in a 2 column Thumbnail view and a larger view of the selected product image.

The administration part is really fun to work with, but will need to have user interface issues addressed as the edit product page is a form that needs to be submited to save any changes, where the actions on product images occur instantly with AJAX (uploading, deleting, and drag-and-drop sorting).

An additional issue exists of an iframe being used to handle the file uploads, due to forms not being able to be nested. Due to the tabs on the page, FireFox sometimes does not show the iframe (file upload form) until the tab is clicked on again, and Safari also has some issues with not uploading the file occasionally.

Otherwise it is working great and is really fun to play with 8)

Here is a movie showcasing the multiple product images feature:

osc30a3_product_images.mov

Yes, if you’re not following the RSS Timeline feed on the development site, this work is in /trunk/ 8)

Back To Our Roots

Tuesday, May 16th, 2006 by Harald Ponce de Leon
Posted in osCommerce

We’ve just announced our new public development server and are anxious to see the possibilities it can bring. I’ve been working on this the past week and look forward to development again to finalize the 3.0alpha3 release.

Although public access to our development repository is now available, public testing will first pick up when 3.0alpha3 is finalized as it will be packaged and available for download. No download package for the 3.0alpha2 release is available due to the problems it has on PHP4 servers, which have been fixed in the development repository.

The new public development server also brings us back to our roots as an Open Source Project, after closing the public CVS server we had a while ago to concentrate on the new framework and to cease the support conflicts it created on the support forums.

We’ve learned from that experience and have separated the development server from the support site.

Those that previewed the new site all provided positive feedback, and look forward to fostering a development community again.

Tip: Subscribe to the Timeline RSS feed on the development server to keep up to date with the development progress made 8)

Entries (RSS)