Slashdot Mirror


Building Online Stores with osCommerce

Stephanie Brain writes "Have you ever considered building your own online store and entering into the booming e-commerce arena? If you have, you may have come across some of the many open-source software available for downloading from the Internet. One of the most popular of these is OsCommerce which has been developed since March 2000 and has a full team of staff dedicated to its development. It is overseen by the founder, Harald Ponce de Leon and today there are around 6000 live, registered OsCommerce sites and 70000 registered community members, many of whom are active on the OSC forum you can log on to. This forum can provide a wealth of information when you come up against any obstacle when developing your own OsCommerce website." Read the rest of Stephanie's review. Building Online Stores with osCommerce: Professional Edition author David Mercer pages 372 publisher Packt Publishing rating 9 reviewer Stephanie Brain ISBN 1-904811-14-0 summary Practical guide to building online stores with osCommerce

Back in October I started working with someone who had already downloaded the OSC software and had the basis of an online store installed. I will be running the store, however my first task was to change the whole look of the site and make improvements to it before launching NetTechShop properly. Having read the OsCommerce blurb which promotes the simplicity of using OSC, I felt sure that I could quickly get to grips with the "simple" programming language of PhP and HTML and have the site ready in a month or two. I was sadly disappointed! By the end of November last year I was getting desperate, having spent hours making modifications to the coding on the database only to either break the site completely or find it had not made one jot of difference to the look of the site. I searched in vain for OsCommerce For Dummies.

My pain was somewhat relieved when I discovered that a book was going to be published on OsCommerce by Packt Publishing and I put my order in immediately and breathed a great sigh of relief.

Strangely such a book has been lacking until now. You can find plenty of books about Php programming and MySQL or HTML, but try to find a book which is easy to understand for someone with less than a University or College IT qualification background and about OsCommerce in particular and you will search long and hard.

David Mercer's book is the book you have been looking for and is available in either a beginner's or professional edition. It is written in a straightforward, easy to understand manner, yet does not compromise on technical knowledge and provides all the essentials of getting your website up and running with OsCommerce.

The book covers: installing MySQL, PHP, Apache and OsCommerce and testing them, configuration and customization of your store, working with data, taxes, payment and shipping, securing your store, installing more advanced feature using contributions from the OsCommerce website and deployment and maintenance of your site.

Before going onto the technical aspects and explanation of OsCommerce, Mercer explores the whole area of e-Commerce, what is required of a website store to make it a success, the arguments for using an open-source solution such as OsCommerce and the decision making issues any business faces when deciding if OsCommerce is right for them.

This manual was everything I hoped it would be and with its many illustrations, including screenshots of the files you will be changing on an OsC website, I found that anyone with even the most basic understanding of website design, would be able to get to grips with designing a website store using OsCommerce. I had the professional edition and found it really easy to just dip into when I needed to know some aspect of the design process. The book's content is well laid out, in manageable chunks with bold headings, which are clear about the content and the index is comprehensive.

One of the things I really liked about the book was that it addressed the problems, error messages and frustrations you are likely to come up against in the process of building your OsCommerce site. Those were the things that made my head spin the most before I got the book and although you should be able to find out about many of your error messages and problems on the OsCommerce forums, it can take quite a time to search and plough through all the replies. It is much better to find the most common problems in one place with practical solutions.

Another important chapter which is covered in depth is the installation and testing of a payment module. The most popular of these, Paypal is covered in the book and detailed instructions are given on how to get it working correctly, again something which sounds easy on paper, but can cause endless problems if you do it wrong. There are other payment providers and gateways which can be integrated onto your OsCommerce site by installing other so-called "contributions" from the OsCommerce website and Mercer explains fully how to download these contributions and get them functioning correctly.

I am sure that this book will prove to be an essential resource for anyone contemplating starting an online business with open-source OsCommerce software and hopefully will avoid them spending wasted energy in the initial stages just trying to figure it all out. After I received my book, the only wasted energy I spent was wondering why the front cover was emblazoned with juicy oranges!"

You can purchase Building Online Stores with osCommerce from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

6 of 146 comments (clear)

  1. Perhaps it's changed... by swimmar132 · · Score: 4, Informative

    But I last used osCommerce back in it's 2.2 days (t o build http://www.gamefest.com/ ). Doing modifications to the PHP / mysql code was absolutely painful. Horribly painful. There was hardly any separation of logic from the presentation. It was all a jumbled mess.

    Then I discovered http://www.rubyonrails.org/ and life is now good!

    1. Re:Perhaps it's changed... by flipper65 · · Score: 5, Informative

      Unfortunately it hasn't. There is really no concept of MVC in OSCommerce or it's branches like ZenCart. We tried to use both for a client project and ended up using Miva because of our inability to fix one area without breaking another. It's a bit hard to comprehend how a book can abstracts OSCommerce from php and mysql and still be relevant.

  2. osCommerce, bad for developers by spazoidspam · · Score: 4, Informative

    osCommerce is great if you don't plan on modifying any code. Its really easy to set up and get going. However, if you plan on making large modifications to the code, you are in for a special treat! The code is a gigantic mess, very very painful to read. I had a customer that wanted to use osCommerce, but they wanted to make the site look like their old shopping cart, which was proprietary. Lets just say that it would have been easier for me to build them a new shopping cart from scratch then to modify osCommerce enough to make it work for them.

  3. Re:We can't have "solutions" like this. by CastrTroy · · Score: 5, Insightful

    As bad as the bugs are in PHP, I'd have to say that the biggest thing you have to fear with ECommerce sites is badly written code in any language. A well written site in PHP is much better off than a poorly written site in J2EE. Most of the insecurity problems with ecommerce sites are due to bad coding, and not the underlying technology used.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  4. You see what Harald wants you to see by stevel · · Score: 4, Insightful

    First off - I love osCommerce. I run a web store using it, have written several popular contributions and participate in the official forum. But the reviewer can perhaps be excused for thinking that there has not been a book on osCommerce before this - there are several. The problem is that Harald (or one of his minions) quickly removes from the forum any mention of any commercial product (book, add-on, service, etc.) relating to osCommerce other than those from his advertisers. Go to amazon.com and search for "oscommerce" - you'll get many hits.

    Also censored from the forum is any mention of other cart software, especially those derived from osCommerce such as Zen Cart and CRE. Want to show how to interface osCommerce to a free API that also has a commercial version? Censored. Want to talk about your experience with a web host or SSL certificate provider? Censored. I once had an extended exchange with one of the forum moderators who seemed to equate "open source" to "one source".

    In any event, osCommerce is "not for wimps". A lot of people think the same way the reviewer did - that you download it, install it, and have an instant web store suitable for your customers. It took me about four months the first time to where I had something I would be willing to let customers see, and another year before I learned enough about it to customize it for the particular business and create something of a unique look. (I'm a software engineer with more than 25 years of experience and twenty or so languages under my belt.) You need to understand at least basic PHP, and some familiarity with MySQL wouldn't hurt either. One of the worst features is that making changes to the overall "look" of an osCommerce store requires editing some thirty or more source files.

    The current version of osCommerce was released three years ago. A small set of bug fixes was released last November. There has been ongoing work on a "Milestone 3" version that appears to introduce significant incompatibilities with the current and popular MS2. Personally, I'm skeptical that MS3 will ever be released, and even if it is, I think that most of the current MS2 users will ignore it.

    Again, I love osCommerce. It is great software and I do what I can to support the community. If you don't mind getting your hands dirty, there's so much you can do with it and hundreds of user add-ons and modifications. You should also look at the derivatives such as Zen and CRE. (These are two that come to mind, there may be others.) But if the letters PHP scare you, then you're better off looking elsewhere.

  5. OSCommerce = Spaghetti - Eeew!! by Spy+der+Mann · · Score: 5, Informative

    Beware those who want to use OSCommerce, you better wait until version 3 is out, or else.

    Current version (2.2MS2) is worthy of being designed by the Flying Spaghetti Monster: There are no tiers, SQL queries are embedded in the middle of HTML output - and there are tons of similar queries around different modules - so if you want to change one SQL, you'd have to SEARCH FOR and change ALL OF THEM. I'd recommend you to start using printf with the thing.

    Also, the same php file is used for both displaying and validating input fields, and there are tons of duplicated functions across the whole thing.

    OSCommerce apparently doesn't know that there is something called "associative arrays", and there is very little OOP in there, but most of it is used to implement very primitive data objects (which, btw, could be replaced with a single associative array).

    If that wasn't enough, you can't search and modify input fields or tags, you have to use the predefined functions tep_draw_input_field, which aren't very user friendly either.

    Some of the configuration variables aren't defined in PHP, but stored in SQL tables so you'd have to modify the original SQL or add new configuration variable manually if you want to add a field to a table.

    The input fields for the admin section aren't stored in associative arrays, but are hardwired among the HTML code (which makes the html output functions a hinderance rather than a help).

    So if you want a version that looks *JUST EXACTLY* like your typical OSCommerce site, and don't plan to add ANY NEW features, sure, go ahead, use the prefabricated store. But if you plan to add any field, table, or whatever,
    I strongly advise to wait for v3, or to rewrite the whole thing using your favorite multi-tier framework.

    Want to change the HTML? Good luck! The thing isn't standards compliant, and was written when nested tables were the norm. For spaces, there's the classical spacer gif consuming your bandwidth.

    OSCommerce, is, IMHO, an example of "Open Source gone wrong". Instead of being the work of a community, with strategic planning and all that, it's the work of one man who did it his way, and later open sourced it.

    As for security, the credit card info is stored unencrypted in SQL tables, and the admin section can only be secured via htaccess. That means the password is sent unencrypted unless you really know apache security and know to implement it the right way.

    Thanks, but no thanks.