So you've installed RediCommerce and are itching to set up your first online shopping cart with this amazingly simple tool. Let's cut to the chase and get it up and running.
If your brain needs a little jarring to remember how and where we installed RediCommerce, revisit ”E-commerce for idiots: A shopping cart anyone can install.”
Logging in and setting up
When you first log in to the RediCommerce Store Manager application, from the URL http://10.16.58.91/cgi-bin/store/protected/manager.cgi?welcome_screen=yes - , where 10.16.58.91 is the IP address of the server hosting RediCommerce, you’ll be greeted with a login screen. Here, you’ll enter the username and password that you created earlier (see the first RediCommerce article).
Once you’re past the login screen, you’ll find yourself in the Store Manager (see Figure A). Here, you can add, edit, and delete products; configure program settings; or view tracking of purchases and hits.
|From the drop-down box in the top right-hand corner of the window, you can get information on accepting credit cards, support, and the GPL license.|
Before you actually start setting up your shopping cart, you have to configure a few settings for your RediCommerce solution. In the Store Manager, click the Program Settings link to configure your store. You’ll enter the following information:
- · How you’ll process orders: From the drop-down box, select from the following choices: Offline, Authorize.Net, iTransact, or LinkPoint. If you’re going to use any method other than Offline, you’ll have to have an account set up for the service you use.
- · URL or directory path for images to be displayed: For this example, I’ll enter the URL http://10.16.58.91/images but won’t include a trailing / character.
- · The full URL of your store: This URL will look like http://10.16.58.91/cgi-bin/store/redicommerce.cgi, where 10.16.58.91 is the IP address or FQDN of your server. Please take care to be consistent here. If you don’t include www as part of your full URL, make sure none of your links include www or cookies won’t be set.
- · State where sales tax is applicable: Self-explanatory
- · Sales-tax amount: Enter this as a decimal-point value.
- · Do you wish to have orders e-mailed to you? Select Yes.
- · Do you wish to have the orders written to a log file? Select Yes.
- · Select a unique name for your log file. (Make sure you remember this name. I'll use redicommerce_log.)
- · Enter the e-mail address of your Webmaster or administrator: This e-mail address will be the return address for all outgoing e-mail.
After you’ve entered all your data, click the Submit button and then go to the top of the screen and select the Gateway Settings link.
From the Gateway Settings screen, you’ll be asked specific questions depending on how you have chosen to process payment. If you selected Offline processing, you’ll be asked for the complete URL of your store. If you selected any other form of payment processing, you’ll be asked to enter data according to which service you use.
Creating the shopping cart
With the server’s configuration complete, you can create your very own shopping cart. The shopping cart I’m going to set up in this example will sell yours truly, Jack Wallen, Jr. First, I’m going to get the image necessary for the shopping cart. The image I’ll use will be taken from the TechProGuild Web site and will be saved (using root) to /var/www/html/images.
To set up this shopping cart, I’ll click the Add A Product link from the top of the Store Manager screen (Figure A). In the Add A Product screen, I’ll enter the following information:
- · Category: Here, you’re configuring the individual categories for your shopping cart. This edit does not, however, hard code the categories into the Web pages; you have to manually do that later.
- · Price: How much does the item cost?
- · Product Name: The name of the individual product
- · Image File: This will be only the file name, not the full path or URL.
- · Option File: Option Files allow you to tack value-add onto the product. The files are located in /var/www/cgi-bin/store/html/options. Included with the default installation is an Option File for Gift Wrapping.
- · Shipping Price: This is the base shipping price per product.
- · User-Defined Fields 1-5: These are user-defined fields that are information-only and aren’t captured as part of the order. (I'll discuss how to use these fields in a moment.)
- · Description: This is where the item description is located. You can embed HTML into the description.
Most of the above is self-explanatory. With the exception of the Option File and the User-Defined fields, you should be able to enter the data for your items fairly quickly. Once you start entering data, you’ll probably be stopped (or stumped) at the Option File entry. Let's talk about this value.
When you add your first item, you’ll notice that the Reference Number is 23. This number is generated by RediCommerce and is just a numerical counter of items. By default, 22 items are in the shopping cart at installation. You can remove these items if it's critical that your items begin with the number 1.
The Option File
Let's say you want to toss in some value-add to a product. What about a third-party book or related software or gift wrapping or any number of items? How could you do that? With RediCommerce, it's actually very easy. If you look in the /var/www/cgi-bin/store/html/options directory, you'll see three files: blank.html, gift_option.html, and index.html (an empty placeholder). The blank.html file is the default Option File and adds nothing to the product. In fact, the only text within the blank.html file is <!--DO NOT DELETE-->, which stands as a warning to not delete this file.
The next file, gift_option.html, serves as a standard template that you can use to add drop-down lists so shoppers can select products and services to add to their purchase. The file looks like this.
This is, of course, after I edited the file to fit the shopping cart I’m creating. The principle of the Option File is that you create various files that add different options to your items. You place these files in this particular directory, give them specific names, and then add the option file names to the item entry from the Store Manager screen. Once you've edited (or created) your option file (I'll call it options.html), you’ll then go back to the Store Manager window, click Edit A Product, select the item you wish to edit (in this case, it’s item #22), and then enter options.html in the Option File slot. Once you've made this change, click Submit Edit, and then you can view the item to make sure your changes have taken effect.
Viewing an item
The easiest way to view an item is to click View Tracking on the Store Manager window and then click the product entry within that item’s corresponding category.
Figure B shows how the product will look when the Option File is used.
|Now shoppers can add both an operating system and a live penguin to their purchase of Jack Wallen, Jr.|
The User-Defined field is a bit less obvious to grasp. The RediCommerce folks had many requests to make individual items (or even groups of items) more customizable, so they came up with the User-Defined fields. Here, you can add up to five entries of extra information (which can even include HTML code). This information is not read or written to the actual order; it’s used simply to enhance the shopping experience by offering more information on the product.
To include the User-Defined fields, you must take two steps. First, edit the /var/www/cgi-bin/store/html/html-templates/productPage.inc file and add the following below the %%optionFile%% token:
The above tokens act as placeholders that read in data from the item’s configuration file. Specifically, these tokens will read in and display to the item page any information that is entered in User-Defined Field(s) 1-5.
To more easily sell Jack Wallen, Jr., I can let the shoppers know the following information/requirements about Jack:
- · Knows Linux
- · Litter-box-trained
- · Minimal feeding
- · Small footprint
Once the tokens are placed in the productPage.inc file, the next step is to go back to the Store Manager page, click Edit A Product, click the appropriate item number (in this case, 22), and then enter the above bits of information in User-Defined Fields 1-4. Once the new information is entered, click Submit Edit. When that item is opened, the new information will be displayed, as shown in Figure C.
|Even basic HTML code can be added to the User-Defined entries to give them an interactive feel.|
The way you've configured your store to accept orders will dictate how orders are fulfilled. For this example, I’m going to show how order processing is taken care of with an offline processing option configured.
Once a shopper submits an order, two things will happen. First, a log entry will be written to the log file configured when the store was set up (for this example, the redicommerce_log file). In this file will be written the Product Information, the Order Information, the Billing Information, and the Shipping Information. The crucial bit of information here is within the Order Information section. The credit-card number for this order will be split (for security reasons) into two parts; the first eight digits of the card will be written to the log file. The last eight digits of the credit card will be found in the e-mail sent to the administrator of the store.
If a shopper places an order for one Jack Wallen, Jr. (with the Linux operating system and a live penguin added), the Order Information section from the log file will look like the information in Table A.
|SHIPPING: 6.89 UPS Overnight - Upgrade|
|SALES TAX: 12.00|
From the e-mail generated by the system, you’d see the information shown in Table B.
|EXP: Month: 8 Year: 2004|
|SHIPPING: 6.89 UPS Overnight - Upgrade|
|SALES TAX: 12.00|
Manually splice the two halves of the numbers together to get 1234567891011, and you can process that order. You simply take the information from the RediCommerce-generated e-mail, add the credit-card number, and process the order as you would any credit-card order. It’s because of this style of transaction that you’ll want to make sure that the log file has group and other read/write permissions removed.
I haven’t yet dealt with several features, including configuring the look of the store, security, and processing orders online, but you should now be able to create your first online store presence.
The RediCommerce application is an outstanding way of migrating your company reliably and safely into the e-commerce playground. With the stability of Linux underneath and the flexibility of the open source software, RediCommerce is ready to fit your needs.
Are you interested in more of this same type of content? Let Jack Wallen, Jr. know.