|
Introducing Contributions
During the first two parts of this series we installed the osCommerce open source shopping cart onto a website and gave it the kind of configuration necessary to make the store operate as we might anticipate with a selection of our own products. We’ve also gone to great measures to include some basic branding on the site by changing the default copy and including a more personalised logo.
Sadly, although this has resulted in a fully-functional store that we can unleash onto the buying public, we’re still left with an online shop that retains the look and feel of an osCommerce-generated store, rather than one that’s been created to match the appearance of an existing site.
If your store isn’t intended to integrate into a parent site, this may not be a problem, though you may find the default layout and design features could lack the punch of a dedicated creation. However, thanks to the control enabled via the store’s central Cascading Style Sheet (CSS), plus a wealth of other extensions available through the osCommerce website, there’s no reason why we can’t modify things and give the store its own personality.
A style guide The primary CSS file that controls the appearance of the installed store can be found by opening the ‘stylesheet.css’ file contained within the root/catalog directory of your store. Although there are few comments to help out with the vast list of classes and attributes available, you can easily work out their individual function through the self-descriptive titles.
The base selectors control the attributes given to the most fundamental aspects of your page layout, covering the body, anchor and form tags, for example, while more specific class selectors have been clearly named to reflect their purpose. Regardless of the clear titles and the occasional comment, there are still too many similar and abstract class names that will leave the first time editor quite confused as to what might affect which part of the page layout.
This will make some experimentation on your part inevitable as you attempt to convert the default style sheet into something that more closely matches your own requirements. However, the osCommerce Knowledge Base (www.oscommerce.info) includes a reasonably comprehensive list of CSS definitions relating to the standard ‘stylesheet.css’ file under the Catalog Area | Design and Layout section. Each of the CSS classes is listed, along with a clear description of what it controls within the context of your pages.
Quick fix Contributions In combination with the administration controls and the various ‘/includes/configure.php’ files we introduced last month, you should find a number of methods of transforming the entire design to better suit your preferred results. However, the process will take time and plenty of patience, which may be in short demand if you’re eager to see your online store go live as soon as possible, and start to see some return on your ecommerce investment. In which case, you may want to consider looking towards Contributions.
Centrally stored here, Contributions provides add-ons, feature updates, language packs and extended modules that you can simply plug into your standard osCommerce installation. For example, if your store happens to be targeted at a non-English language audience, visiting the above website will provide 122 language packages, from Arabic through to Vietnamese, taking in Azeri, Euskera and Bahasa as well as more common European and Western tongues.
To return to more cosmetic matters, the Contributions pages also contain a number of predefined templates and themes that can be used to skin your store. Options available include simple design selections that change the available buttons and style sheets (ideal for those lacking design skills), right through to more ambitious projects to provide a complete redesign that replaces the default osCommerce appearance. As Contributions are submitted by existing osCommerce users, the quality of the results can vary, as can the reliability of the available add-ons. Most are provided with clear ‘readme’ files that explain the installation and configuration process involved, but it should be taken as read that backing up your original files should be a basic requirement before applying any modifications.
Assuming you have a reasonable balance of design and technical skills, the Contributions add-ons provide a wealth of additional tools that will really help you move away from the default templates. One option is the excellent Basic Template Structure application found here. With this installed, you introduce a number of supporting PHP and Javascript files to your default osCommerce installation. These enable you to maintain the design of your store all from one page, including the DTD, head, header, columns and footers for each page. However, the method relies on inserting an SQL file into your osCommerce database, so some familiarity of phpMyAdmin must be assumed as a minimum requirement.
Functional Contributions In addition to the cosmetic improvements introduced by Contributions, there’s also a number of more practical modules that help you customise the functionality of the shopping cart. The ‘Credit Modules’ option, at the time of writing, contains over 130 freely available additions that can help you process credit or debit card transactions, from simple validations through to managing gift voucher schemes within your site.
Similarly, the ‘Payment and Shipping’ modules provide commands that take care of virtually any circumstance you can think of when using more localised payment or dispatch methods, while the various ‘Reports’ will help you manage and maintain your store, stock levels and customer base. We’ve already mentioned ‘Language Packs’, but in addition to this is a comprehensive range of country zone information from where you can import an exhaustive list of countries, counties and other geographical and political regions into your core mySQL database, as you continue to recognise the origins of your customer’s locale.
By far the largest category of Contributions is the one put aside for ‘Features’. These include a number of additional components you may want to consider as you further personalise your store. With almost 800 contributions available within this section alone, the facility to search through the available options will become invaluable. Complementing these are the ‘Infobox’ modules that provide a number of predefined boxouts to populate your store’s left-and right-hand columns. These, too, enable you to get further away from the standard osCommerce installation implications to include auction bidding, preorders, RSS streams and other such enhancements.
As you become more familiar with the range of options available through Contributions, you’ll soon realise that the task of opening your own ecommerce store isn’t just a simple process of installing the files and stocking up all your virtual shelves. With Contributions, you can really move away from the default osCommerce look and feel to create your own individually branded shop front. To get some idea of what can be achieved, a quick browse around a few existing stores created using osCommerce is a good idea. Try heading over to here to get some design inspiration and you’ll see just how really good (and how really bad!) some osCommerce sites can be once they’ve been modified away from the default appearance.
Selling downloads You don’t need to be selling just physical goods to make money through your store.
If the sample content of the osCommerce store is anything to go by, you would be forgiven for assuming that you can only sell real world items through your store. And if you don’t have immediate links to a distribution chain, then you may want to consider alternative avenues.
Selling downloadable content is an option. Whether you choose to sell audio files of your karaoke warblings, ‘stock’ images taken on your trip to Majorca, or applications you’ve cobbled together using the SDK of a more established title, you can still make use of osCommerce to bring in revenue. To do this, you’ll need to upload the files in question to the ‘catalog/download’ folder and protect this by changing its CHMOD settings to 755. However, the code determines that the file will actually read from the ‘catalog/pub’ folder, so changing the CHMOD settings of this to 777 will enable downloads to complete successfully.
Once the basic set-up has been completed, you’ll need to turn to the ‘Admin’ console, access the ‘Configuration’ area and click on the ‘Download’ option. Set the ‘Enable Download’ option to ‘True’ and configure settings for the redirection, expiry and number of downloads. You can then turn to the Catalog | Product Attributes section and draw up your chosen product from the ‘Products Attribute’ table. Choose the ‘Download’ option to prompt the filename details.
Should a download demand increased or reduced charges, this can be done using the ‘Value Price’ column. Enter the amount difference in this field before using the ‘Prefix’ field to determine if the difference is plus or minus to the original price.
|