In this tutorial, the fifth in the eCommerce series, you will learn how to add static product options to your online catalog store. Instead of retrieving information from a database, product details as well as the shopping cart application are specified using eCart functionality. When do static product options make sense? This technique is appropriate for a limited product line and for products that do not change on a day-to-day basis or need categorizing. For these situations, creating a database would probably be overkill. Instead you can add static product options directly to a webpage using eCart functionality. With eCart, you can also create an Add to Cart button, shopping cart display, and make changes to your product line in the future.
If you'd prefer to add dynamic product options (for example, product options that change often) or dynamic product options that affect more than one column (for example, a price increment), these product options requiring a database have dedicated tutorials in this series. You'll find a linked index including an overview of each tutorial belonging to the eCommerce series at the bottom of this page.
- Dreamweaver CS3 or higher.
- eCart 5 or higher installed and activated in Dreamweaver
- A php page on your Dreamweaver website displaying the name, short description, image, and price of your product.
Your first step is to create the eCart Object. An eCart Object is the backbone of your shopping cart functionality. It defines important settings such as the currency your store will use, as well as discounts, shipping, or tax rules. The eCart Object panel consists of 7 different tabs for configuring various settings for your cart. At this point, you will configure the General tab and the Columns tab. You can choose to leave the other options at their default settings.
As an example in this tutorial, we will use eCart to create a shopping cart that displays five static color options for an eCommerce site that designs custom birthday invitations. However, if the manufacturer was to offer a different color palette in the future, the color options (as well as other static product options) could be easily updated using eCart functionality.
- From the Dreamweaver Files panel, open your product page where you will be placing your Add to Cart button.
- Next, go to WebAssist > eCart > eCart Object to open the eCart Object panel and click the Add icon.
- In the Cart name field, enter a name for your shopping cart. I have named this shopping cart eCart2 since eCart1 exists already as the shopping cart for dynamic product options.
- Review the Settings, Currency, and Weight options on the General tab. In most cases, the default settings will be correct.
- Move to the Columns tab and just as you would a database, customize it to match the products you're selling. Revisiting the example of custom birthday invitations with five color options, you would want to add a Color column.
Since items in a product catalog do not necessarily contain the same type of information, carefully consider your inventory so you can design a structure that will specify the correct product options. For example, it would be unnecessary to create a color column if you sell downloadable music or magazine subscriptions.
- In Columns, click the Add icon and in the Name field, enter Color. Choose text for the Output Type and check Unique so the shopping cart will allow a customer to purchase multiples of the identical color.
- Click OK when you are finished.
You can re-enter this interface at any time to create additional columns as needed for storing product information within the cart by going to WebAssist > eCart > eCart Object and choosing the Edit icon.
Next, you will create the actual shopping cart. Think of it as a temporary database that holds informational details about the products a customer is purchasing. This is the page where your customer will review the items they have selected to purchase. From the shopping cart, your customer can add additional products to purchase, increase quantity, remove items, clear the cart, update the cart, and proceed to checkout.
- Create a new PHP page in your Dreamweaver site for the cart.
Give the shopping cart page a definitive name, since your eCommerce store may have more than one cart. For example, cart_static.php.
- Go to WebAssist > eCart > Display Manager to open the eCart Display Manager panel.
- Choose the specific cart, in this example eCart2.
- Make your design choices. Experiment with the type of cart, font, color scheme, and button (image or form), to be used on your shopping cart. Click next when you are done.
- Now you will add, delete, and group columns in your shopping cart. The columns are the individual details associated with a product when it is added to or updated in your shopping cart. Click next when you are satisfied with your choices.
To display additional columns that you created in the eCart object, click the Add icon. However, if you decide that you want additional columns, they need to be created first in the eCart object before being added on this page.
- Next you can determine how charges, discounts, shipping, and tax will be displayed. Choose between Summary which includes the section header and a corresponding total, Individually for each rule triggered in the shopping cart as well as the sum, or Do not show to disable the selected option on the cart display. Summary is a common choice. After you have have made your selection, click Finish.
- Review your shopping cart columns.
- Save the page (Ctrl or Cmd + S).
Using eCart, you will now add the static product options while creating the Add to Cart button that will be placed on your product page. When clicked, this button will add the customer's selected items to the shopping cart created in the previous step.
- Place your cursor on your product page where you want to place the Add to Cart button.
- From the Insert menu, choose WebAssist > eCart > Add To Cart Button to open the interface.
- In the Add To Cart Button interface, choose the shopping cart you wish to use. If your site only has one cart connected to it, this will be selected by default.
- Select Add static item to cart.
- Specify the destination page where you want a customer redirected after adding an item to the shopping cart, in this example, cart_static.php. (Click the folder icon to select the page.) Alternately, leave the field blank if you want your customer to remain on the product page.
- Select the Bindings tab where you will specify the details for the product. Select the ID column, and in the Default value field, enter a unique ID for your product.
- Repeat this process for Name and Description.
- Set the Default value field for Weight at 0 if weight is not a consideration in your product line. You can also do this for any of the other 5 default columns (ID, Name, Description, Quantity, and Price) if you do not plan to use them.
- In most cases, you will want to leave the Default value field for Quantity at 1 and select the Updateable option. Set Action to Sum which increases the quantity of the item in the cart. This allows the customer to specify how much of that product they intend to purchase, for example, 25 sheets of red paper.
- Add the price.
- Select the Color column and set it to Updateable. From the menu, choose select list.
- Select the Button tab. In the Style menu, browse through the 11 different color schemes. Choose the button that fits best with your website's design. You also have the option of a form button or specifying a custom image location. Lastly, you have the option of adding a description in the Alt text field.
- Click OK to insert the Add to Cart button on your product page.
- Now it's time to add the static product options by editing the Color select list in the Properties Inspector. Click on List Values.
- In this example, I added five color options for the custom birthday invitations. The Item Label and Value do not necessarily need to be the same. Item Label passes through to your site and will be seen by your customers.
- Click OK and save your page (Ctrl or Cmd + S).
- View the product page in your browser (File > Preview in Browser) where you will see that quantity and color choice can be specified. By clicking the Add to Cart button, you can review your order on the shopping cart page (assuming the product page was re-directed to the shopping cart page in the General tab).
- Use the Continue Shopping button to return to the products page to make more selections. You can also increase quantity, remove items, clear the cart, update the cart, and proceed to checkout from the shopping cart.
Your data may need modifying at some point, even when using static product options. For instance, you may want to update the color choices. To do this, re-enter the eCart Object and eCart Add to Cart Button interfaces to modify and update information. You can also re-create the shopping cart display.
- Open your site, making sure that you have chosen the correct Dreamweaver site from the Files panel.
- In the Server Behaviors window, click on eCart Object (eCart2) to open the interface. Make changes and click OK.
- After updating the eCart Object, you will need to manually update the Add to Cart button to reflect those changes. In the Server Behaviors window, click on eCart Add To Cart Button (eCart2) to open the interface. Make changes and click OK.
- After updating the eCart Object and Add to Cart button, you will also need to re-create the shopping cart display to reflect those changes. Open your shopping cart page (in this example, cart_static.php) and go to Insert > Webassist > eCart> Display Manager to re-create your shopping cart display.
With eCart technology as the cornerstone of the WebAssist eCommerce series, these in-depth tutorials will walk you through the steps of building an eCommerce site: product catalogs, shopping carts, product options (both static and dynamic), and checkout including payments. Completing the eCart portion of the series is help for setting up a back-end administration to manage your eCommerce business. Additionally, to be used with or without eCart, you will learn about payment gateway providers, hosting solutions, and online shipping accounts.
- Introduction to the eCommerce series: An overview of the WebAssist eCommerce series including a detailed description of each tutorial.
- Create a product catalog: Learn to create a dynamic product catalog for an online store.
- In Create a product catalog I, you will learn if a dynamic product catalog is appropriate for your online store and how to complete the initial set-up.
- In Create a product catalog II, you will learn how to create product administration pages, product catalog pages, and order pages for your dynamic product catalog.
- Add a shopping cart: Learn about using eCart to create a responsive shopping cart for selling your products online.
- Create an eCart object to define the structure of your shopping cart.
- Place an Add to Cart button on a product catalog which your customers can use to select items to purchase and add them to their shopping cart.
- Design a responsive shopping cart page that holds informational details about the products a customer is purchasing.
- Add dynamic product options I: Learn how to add dynamic product options to your website's online store using eCart's shopping cart functionality.
- Add dynamic product options II: Learn how to add dynamic product options, which include options within themselves (for example, incremental pricing), to your website's online store using eCart's shopping cart functionality.
- Add static product options: Learn how to add static product options to your online catalog store.
- Add checkout and administration: Learn how to manage checkout, payments, and the back-end administration of your eCommerce site using the seven tabs in the eCart Checkout Wizard - Settings, Payments, Shipping, Tax, Orders, Email, and Form Design.
- In the Settings tab, you will choose the general settings for your site and checkout pages.
- In the Payments tab, you will set up payment provider and checkout options.
- In the Shipping tab, you will choose shipping providers and set charges.
- In the Tax tab, you will set the rules for sales tax or VAT.
- In the Orders tab, you will configure your order storage options.
- In the Email tab, you will enter your email server settings.
- In the Form Design tab, you will select your checkout form from preset designs.
- Online payment solutions: Learn about online payment solutions including seamless checkout, remote checkout, and various PayPal checkout options.
- Hosting provider solutions: Learn about and choose between five hosting providers, 1&1, GoDaddy, HostGator, Network Solutions, and DreamHost.
- Online shipping solutions: Learn where and how to set up free shipping accounts with FedEx, UPS, USPS, and Australia Post.