Implementing E-Commerce on Your Linux System - page 4
Previews of TallyMan, Yams, and OpenMerchant
Yams (Yet Another Merchant System) may not be as highly publicized or promoted as TallyMan or OpenMerchant, but in most ways it's the equal of both packages. Built around Perl and back-end MySQL database (specifically, Perl 5_005_03, MySQL 3.22.25, Apache 1.36, mod_auth_mysql 2,20 and mod_perl 1.21), Yams 0.5.5 runs in conjunction with any Web server, either as a CGI script or as a Perl script under Apache summoned under the mod_perl module.
It supports both physical goods (toys, books, merchandise, et al.) and electronic goods (services, subscriptions, software downloads). (Be warned that a reference to "affiliate programs" in the Yams documentation is treated slightly differently in Yams than in TallyMan: in TallyMan you run the program and disburse payments to those advertising your products on the Web, while in Yams the assumption is that you're the one reselling items offered by others.)
Yams already has addressed the shopping-card issue by including a persistent shopping cart after a user has logged in. This means that a user can at all times access their shopping cart to see what's been set aside, to delete items or to check out of the system.
It also supports inventory tracking (when a product is out of stock, it will inform the user), and sales-tax calculation (though not to the extent offered by TallyMan).
We downloaded the source code and configured it on our Slackware Linux 7 server. Installation is rather simple, although it does help to know a little about Apache, Perl and MySQL configuration. The first step is to properly configure the back-end SQL database files. The MySQL file tables.sql contains all the definitions needed to create the databases and tables used in the system. To enable user registration, configure the http_auth database.
The actual Yams distribution is stored in three directories: modules (the actual code, which should be placed in the site_perl directory), scripts (which contains all the Perl scripts that are called as CGI or mod_perl scripts), and html (where HTML files are stored).
Preparing the Apache Web server for use as an e-commerce system may require some small changes. First, Apache must have mod_auth to be compiled into to enable the user registration system. The mod_perl module must be compiled into Apache to run Yams as Apacha::Registry scripts. (It's also necessary to define initial database connections in the perl-startup.pl file, and the code to do this is included with the distribution.) If Yams is to be run as a normal CGI script, then mod_cgi must be compiled into Apache.
Most of the work in Yams is done in four Perl files: CreditCard.pm, Shipping.pm, Template.pm, and YamsGlobals.pm. The YamsGlobals.pm is the configuration file for the system, providing information about variables and how to toggle them. The CreditCard.pm file contains the code used to authorize real-time credit-cards transactions using the Signio (formerly PaymentNet) authorization service--currently the only payment service set up, but support for other vendors is planned. The Template.pm file specifies a templated header and footer around dynamically generated content. This templating ability is still crude, but plans include the addition of several other variables (such as a departmental image, a navigation bar, and more). Finally, the Shipping.pm file calculates shipping per item or weight (using UPS ground rates), with plans calling for an increase in the number of possible shipping calculations. (To use UPS ground shipping and calculate pricing based on weight requires the Perl module Business::UPS.)
The back-end administration tools are surprisingly robust. View all orders or a subset (for instance, only new orders or a specific customer's orders), order status, or item status (inventory levels, which items are on order or back-ordered, retired items). When an order is initiated, the system automatically assigns it a tracking number.
Set up an online store via departments and subdepartments. With these departments you can have product categories.
By default, Yams stores various bits of information about products in specific fields. These fields can be changed at any point, but for many online stores the defaults should be more than enough. The default fields are: SKU (the tracking number for the product; assign your own number or use the same numbering system as the manufacturer), name, category, department/subdepartment, platform (any, Linux, Mac, Windows, Windows/Mac, or NA; these fields are pretty worthless outside of the software world!), type (shipped, subscription, download, subscription renewal, affiliate, bundle), URL for downloading, short description, long description, other text, small image path, large image path, price, taxable, weight, domestic shipping cost, international shipping cost, initial amount in stock, threshold quantity when an administrator is notified and status.
In the Inventory area is a list of all the products with number shipped and the current inventory. This is the most rudimentary inventory-management system possible; other more sophisticated e-commerce tools have links to back-end inventory managers or accounting packages that can provide instant information about inventory levels.
Yams is unique in that it supports subscriptions--no surprise as it was obviously designed with software management in mind. Many software packages--including many Linux distributions--are sold on a subscription basis, with the end user receiving all updates within a specified period. Yams manages basic subscriptions, as well as supplying subscriptions to specific groups (permissions that are administered via the Web server).
Clearly Yams is still a work-in-progress and is missing essential features. For instance, security isn't addressed in the documentation, and while it's true that security in this situation is more a matter of the Web server and the payment server enabling secure transactions, it would have been nice to see those relationships spelled out more clearly. There's currently no mechanism for automatically sending out electronic mail to both customers and merchants when a transaction is completed, but sending confirmation mail out to users is a critical part of e-commerce today. There's no search engine letting end users search for specific items (although it shouldn't be hard to implement one in Perl). We're hoping that these glaring holes are addressed before an initial release.
Yams is distributed under the GNU General Public License. As stated earlier, it has not received a lot of press to date nor attracted a lot of developer interest judging by the lack of participation in the Yams forums at the Open Forge site hosting it. This is a shame, as it's on its way to being a very good open-source e-commerce package.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Linux from Scratch, Ubuntu 14.01 Beta and Arch Updates