ubercart user's guide

85
Dokumentation User’s Guide

Upload: will-jackson

Post on 06-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 1/85

DokumentationUser’s Guide

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 2/85

Übercart DocumentationUser’s Guide

ContentsUbercart User’s Guide ..................................................4

What is Ubercart? ......................................................................................... 5Introduction to Ubercart .............................................................................. 6

Installing Ubercart .......................................................6Installing Drupal ........................................................................................... 7Installation .................................................................................................... 8Installing Ubercart ...................................................................................... 11Upgrading Ubercart .................................................................................... 15

Con guring Your Store ...............................................16Drupal Settings Tips ................................................................................... 17Ubercart Settings Tips ............................................................................... 18Attribute Settings ....................................................................................... 18Cart Links Settings .................................................................................... 19Cart Settings ............................................................................................... 20Catalog Settings ......................................................................................... 21Checkout Settings ...................................................................................... 22Checkout settings: ..................................................................................... 22

Country Settings ........................................................................................ 24Google Checkout ........................................................................................ 25Importer Settings ....................................................................................... 26Manu acturer Settings ............................................................................... 26Noti cation Settings .................................................................................. 26Order Settings ............................................................................................ 27Payment Settings ....................................................................................... 28Product Settings ......................................................................................... 34Report Settings .......................................................................................... 34Shipping Quote Settings ........................................................................... 35Stock Settings ............................................................................................ 39Store Settings ............................................................................................. 39Table Display Settings ............................................................................... 40Tax Settings ................................................................................................ 41Workfow Con guration ............................................................................. 42

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 3/85

Übercart DocumentationUser’s Guide

Creating Products .......................................................43Basic Product Creation .............................................................................. 44Product Attributes and Options ................................................................ 45Product SKUs and Adjustments ............................................................... 47Understanding Product Classes ............................................................... 48Selling Files ................................................................................................ 49Selling Site Access (Role Assignments) .................................................. 52Tracking Stock Levels ................................................................................ 55

Importing Data ............................................................................................ 57Processing Orders ...................................................... 60

Automated Order Processing with Workfow-ng ..................................... 60Receiving Payments ................................................................................... 62Shipping Your Products ............................................................................. 62

Viewing Reports .........................................................63Contributed Modules ..................................................65

Installing Contributed Modules ................................................................. 65Module Comparisons ................................................................................. 65‘Out o Stock’ solutions ............................................................................. 66

Site Enhancement Tips .............................................. 68Remove Blocks to Focus Customers ....................................................... 68Security Tips ............................................................................................... 68Using the Catalog E ectively .................................................................... 69Using Third Party Drupal Modules ............................................................ 70

Tutorials ......................................................................76An A liate Program using Ubercart ........................................................ 76Watermarking product images .................................................................. 80

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 4/85

Übercart DocumentationUser’s Guide

What is Ubercart?Ubercart is an exciting open source e-commerce package that ully integrates your online storewith Drupal, the leading open source content management system. This is a killer combination oranyone looking to build a community around a product, sell access to premium content, o er paidle downloads, and much much more!

Ubercart was designed to take advantage o Drupal’s major core and contributed systems, provid-ing our users with shopping cart unctionality that seamlessly integrates with other parts o yourcompany or community website. To learn more about the bene ts o using Drupal, check out ourarticle which answers the question, “Why use Drupal or e-commerce?”

One o the key strengths o Ubercart is its design that allows o cial and third party developersto add to or alter its eatures to accommodate virtually any e-commerce need. This means you’ll

never have to change the source code to add new eatures, so you’ll have an easy upgrade pathwhen the core gets improved or bug xes are released.

Current online stores are leveraging Ubercart to meet the ollowing e-commerce needs:

* Selling physical goods rom various sized product catalogs.* Selling le downloads (i.e. music, videos, so tware).* Selling site access or members only websites, including automatic renewals and expiration o

user access.

Our demo site, the Ubercart Livetest, has the latest code as we type it out. Feel ree to check itout and post your thoughts in our orums. The Livetest showcases many o the core eatures in ade ault Drupal installation, but you can nd much prettier example sites in our Live Sites directory.

Key Aspects:

* Built as a module package or the search engine riendly Drupal CMS, meaning you can ullyintegrate your store with the rest o your site or community. Ubercart can also be enhanced by thedozens o contributed Drupal modules and themes.

* Designed to be enhanced and modi ed. The core systems o Ubercart, including products,checkout, orders, payments, and order ul llment are all designed to incorporate contributed mod-ules. (In programming lingo, these systems are all extensible.) No hacking o code required to addunctionality to your site! Just enable a module, con gure the settings, and get to work. View thecurrent contributed modules in our contrib directory.

* Strong desire or usability, refected in testing, changing things, testing again, changing morethings, and ultimately letting you customize how all the pieces t together yoursel . We believe theadministrative inter ace can always be better, and we’re committed to enhancing it.

* Strong desire or fexibility, refected in testing, changing things... you get the point. Everye-commerce site has a di erent set o needs, so we are constantly improving the core systemsto make it easier or developers to meet those needs. (For those who know, we have mimickedDrupal’s hook system or the core systems o Ubercart. You can read more in the Developer’s

Guide.)

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 5/85

Übercart DocumentationUser’s Guide

Current Features:

* Con gurable product catalog includes catalog pages and a block to display product categories.

* Flexible product creation system. Create normal products by de ault. Add elds to store addi-tional product in ormation using Drupal’s CCK system.* Flexible product attributes system. Create user selectable attributes or your products that

modi y the price, SKU/model, and/or weight o items as the customer adds them to his or her cart.Set de ault attribute/option sets or each product class to easily create many similar products.

* Single page checkout. All checkout in ormation gathered on a single screen composed o con-gurable checkout panes. Third party modules can de ne checkout panes to replace or add to thede ault set, making it easy to customize the checkout experience.

* Automatic account generation (anonymous checkout). Accounts and emails are automaticallygenerated based on the customer’s e-mail address. (Optional setting allows customers to speci y

account names and passwords in checkout.) For return customers, previously used addresses willbe listed on the checkout page or easy access.* Simple order processing. The order administration screens have been designed by and or our

salesmen. We believe there is always room or improvement and will try to make it happen! Orderscreens use the “pane” model, so the screens are con gurable and extensible to accommodate awide variety o e-commerce applications.

* Simple order creation and editing. Easy to create orders manually or customers, addingproducts, shipping prices, etc. rom a single screen. Line items system makes it easy to add ees,discounts, and coupons to orders.

* Integrated payment system that acts as a bridge between acceptable payment methods(check, credit card, cod, etc.) and payment gateways (Cyber Source, Authorize.net, PayPal, etc.).Con gurable payment processing and tracking, and easy to use credit card terminal with varyinglevels o access.

* Activity logging. Enable logging to see all the changes made to an order, including paymentprocessing. (Your accountant will love this!)

* XML import/export allows you import products, attributes, orders, and customers rom your oldstore into Ubercart or export products, attributes, orders, and customers rom your Ubercart store

Ubercart User’s Guide

Welcome to the Ubercart User’s Guide! Our goal is to provide a help ul, easy to use handbook oreveryone planning to use Ubercart or their e-commerce sites. We want to cater to those with noprior experience in e-commerce while satis ying the questions o the seasoned e-commerce veter-ans. I anything seems incorrect, hard to understand, or is just plain missing, please bring it to ourattention in the orums!

For a very brie overview o Ubercart, eel ree to read our introduction titled What is Ubercart?The user’s guide will provide a more in depth look at the eatures o Ubercart. When you’re readyto start using it, you can nd installation and con guration instructions here along with all the in oyou’ll need to build your catalog and start processing orders!

Approved contributed modules will also be documented here.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 6/85

Übercart DocumentationUser’s Guide

Introduction to UbercartUbercart started as a project sponsored by Prima Supply, a Louisville, KY based company thesells commercial restaurant equipment online through their own sites and eBay. The company gotits start on an osCommerce installation that became more and more customized over the years.When we got tired o hacking osCommerce and ound out just how cool Drupal was, we beganinvestigating the possibility o moving our sites to Drupal. Un ortunately, the e-commerce package just wasn’t right or us. While we didn’t set out to write our own e-commerce suite rom scratch, wedecided it would be expedient to do just that and develop a system custom tailored to our needsrom the start.

While Ubercart has got its start as just a shopping cart system or Drupal, the plan is to integratethe various other systems we currently use or our stores, including eBay auction listing, Quick-Books importing, and customer relationship management (CRM) so tware.

Currently, two coders are employed ull time feshing out the core Ubercart code. We would loveor other people to nd this so tware use ul, so our plan has been to make every aspect o the cartextensible rom the get go. We simply can’t code or every situation, but we hope to create a devel-oper riendly environment that brings hobbyists, store owners, and consultants on board the Uber-cart team.

Installing Ubercart ( or Ubercart beta & Drupal 5.x)

This section is our attempt to break down in layman’s terms the installation process. I you’realready amiliar with Drupal (its installation process, installing modules, and so orth) ollow theInstalling Ubercart link. I you’re new to Drupal, we recommend either downloading a Drupal +Ubercart package ( ound on our downloads page) or using the UberInstaller mentioned below. Fora more detailed way o setting up Drupal & Ubercart goto the Installing Drupal link. Follow alongand eel ree to let us know o inaccuracies and con using descriptions.UberInstaller

For those daunted by the process o installing Drupal, modules, and Übercart or those lookingor a test install o Ubercart, we’ve also created an installer, an UberInstaller i you will. The Uber-Installer automates the entire process o downloading required les, installing Drupal, installingmodules, and running the installation script.

Note: Using the UberInstaller will not work with an existing installation o Drupal, ollow the steps inInstalling Ubercart to install Ubercart on an existing Drupal installation.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 7/85

Übercart DocumentationUser’s Guide

Installing Drupal ( or Ubercart beta & Drupal 5.x)In order to install Ubercart we rst need a running installation o Drupal. While a lot o work hasbeen done to make Drupal easy to install, it still can be intimidating or many people. This sectionassumes that readers o this page have no, or little, knowledge in PHP, Apache (or any web serveradministration), and MySQL (or any database server administration), but are ready, willing, andable to learn (those daunted by this page might nd the UberInstaller or using the ubercart pack-age more to their liking). We will go through, in detail, each step to install Drupal on your website.I you already have a Drupal installation ready to go, you should move to the installing ubercartsection.RequirementsDrupal has a ew system requirements that it needs to run. Depending on who does your web

hosting or you, you’ll need to nd out whether they support these requirements. To put it briefy,the recommended requirements are Apache/PHP 5/MySQL 4.1 or 5.0. I you know your web hosthas these requirements skip to the installation section. I not, review the requirements below. Indetail, these are the minimum requirements o Drupal:

Web Server that can run PHPMost pro essional web hosting companies (i you’re looking or a web host, check site 5 web-

hosting) o er servers that can run PHP, a common programming language used by web servers.The 2 most used web servers today are Apache and IIS. It’s recommended that you go with aserver that uses Apache. Most Drupal developers work with Apache so the likelihood o encounter-ing problems is much less. Additionally, Apache supports a ew eatures that are use ul or Drupal.PHP 4.3.5 or higher

Make sure your web host is running PHP 4.3.5 or higher. It’s recommended to use a host thatsupports PHP 5. The Uberteam works in a PHP 5 environment; while we will support problemsencountered in PHP 4, we do not rigorously test Ubercart in a PHP 4 environment. The likelihoodo problems encountered will be less i you run Ubercart on PHP 5A PHP supported database server

While Drupal is designed to be database independent, MySQL 4.1/5.0 is recommended orDrupal. PostgreSQL is supported as well, but you’ll nd more support or MySQL. I you need sup-port or a MS SQL or an Oracle database server, see the Drupal Enterprise Group

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 8/85

Übercart DocumentationUser’s Guide

InstallationNow that you’ve determined that your web host can run the so tware needed or Drupal. Lets getstarted installing Drupal. Though this guide is made as universal as possible, depending on yourweb server setup the details in these steps could vary. I you’d like audio/video instructions, checkout this video by Lullabot to hear Je ’s soothing voice directing you through the install Eye-wink Iyou encounter problems installing Drupal go to drupal.org’s support page or post a message in ourorums. Depending on your problem, you may need to contact web host or your web server admin-istrator.

1. Download the latest version o Drupal 5.x rom drupal.org:

The Drupal project

You can always nd the latest release o Drupal o the Drupal project page. For our purposeswe will download the latest Drupal 5.x release, as Ubercart only works with 5.x currently. The lewill be in a tarball ormat (.tar.gz), a compressed le ormat.

2. Unpack the archive and upload it to your web server:

Drupal tarball opened in 7-zip

I you don’t have the right compression so tware to decompress tarballs, you can use the ree-ware 7-zip compression utility or Windows. Once you’ve uncompressed it, open the older named“drupal-xx” where xx is the version o Drupal you’ve downloaded. The les contained in this olderneed to be uploaded to your web server.

WinSCP’s connection screen where you’d enter your username, password, and host address,select “SCP” and click the login button

Depending on your web host, you may connect to your web server directory in di erent ways.Some popular ways are through a web-based le manager, FTP, and SSH. We recommend FTP orSSH (i possible, SSH is pre erred or security reasons). I you do not have a FTP or SSH client toconnect to your web server, you can download the reeware WinSCP FTP/SSH client or Windows.

I you decide to use FTP/SSH you will need some in ormation that your web host should pro-vide you. That is the host address (typically the same as your website’s domain name or a subdo-main o that name e.g. tp.mydomain.com), a username, and a password. With these should beable to use your FTP/SSH client to connect to your web server’s le directory. Once connected,you should upload all the les contained in the “drupal-xx” directory to your website’s public direc-tory, the directory where anyone on the web can view the les (typically named “www”,”public_html”,”htdocs”). I you’re not sure what this directory is contact your webhost.

A ter connecting to your web host you’ll need to upload all the drupal les into a “htdocs” direc-

tory or the world-viewable directory on your web server

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 9/85

Übercart DocumentationUser’s Guide

3. Create a database or Drupal and a user with all privileges on that database:

More than likely, your webhost provider does almost all database administration or you (includ-ing creation o new databases). Most providers have some sort o “administration page” or “controlpanel” section o their site through which you can create a database (contact your web host orurther in ormation about this). Once you’ve created a database, you should have a database hostaddress, the database name, a username, and a password which you will use to connect to yourdatabase server. Once you have this, you should be ready to install Drupal.

On the chance you can administer the database yoursel , you can use a web-based databaseadministration tool like phpMyAdmin to create a database with the appropriate permissions.

You can use phpMyAdmin to create a new database on the database server

4. Browse to your website to run the installer

The Drupal installation page

I you’ve copied the Drupal les into the correct directory on your web server, you should beable to goto your website’s address and see the page above. Here you we will enter the databasename, user, and password that we received in the previous step. I your database host addressisn’t the same as your domain name you will need to click the advanced options link. A box shouldopen up and a text eld or database host will be there. Enter your database host address into thateld then click the Save Con guration button. A ter the installer has nished, you should see a linkinviting you to view your new Drupal website.

5. Customize and con gure your new Drupal site

The Drupal post-installation homepage

Congratulations! I you’ve reached this step, you’ve now installed Drupal to your website. Onthe ront page you should see a number o steps to ollow. These steps will walk you through theprocess o creating the rst user account (a special account that has access to everything on thesite), how to change the theme o your site (a customizable “skin” that changes the look o yoursite), create new content, and how to enable new modules. For now, ollow these outlined steps.Browse around your new website to get accustomed to how administration works in Drupal.

Note: You should take a moment to review our list o recommended Drupal settings to improveyour website. Be especially sure to visit the “File system” con guration page. It creates a directoryor le uploads, which makes setting up product images go more smoothly.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 10/85

Übercart DocumentationUser’s Guide

6. Enabling new modules:

The Drupal module administration page

I you’ve ollowed all the steps listed on the ront page o your new site, you should have seenthe module administration menu by now ( ound by going to Administer > Site building > Moduleson the le t sidebar a ter logging in to your website). This page list all the modules that are currentlyinstalled and enabled on your website. Modules are one o the many things that make the DrupalCMS (content management system) so great; you can add additional unctionality (blog, orum,poll, e-commerce) to your site just by downloading a new plugin or your site.

In the next section, we will cover new modules you’ll need or Ubercart. For now, enable the Pathand Upload modules at the module administration menu (Administer > Site building > Modules)You will need the Search module or searching your product catalog a ter we’ve installed Ubercart.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 11/85

Übercart DocumentationUser’s Guide

Installing Ubercart( or Ubercart beta & Drupal 5.x)

With your Drupal installation running, all you need is to Ubercart and its required modules. InDrupal, modules are sel -contained bits o code that adds unctionality to Drupal. Some o the coreparts o Drupal (such as the unctionality that maintains a list o users who can login to your site)are implemented through modules. I you nd yoursel saying “Drupal is great, but I need it to do...”,more o ten than not, you can nd a module on drupal.org that does what you need it to.

Modules are easy to install and uninstall in Drupal. To get started, connect to your website direc-tory like be ore through FTP/SSH (or however you access your website’s les). Browse the theworld-viewable directory where you uploaded all the drupal les. Among these les you should seea “sites” directory. Open that directory and then open the directory named “all”. In the “all” direc-

tory you will create a new directory named “modules” (or use the existing “modules” directory i italready exists). Any new modules will be uploaded into this directory. We will go through the list omodules that you need to upload and install be ore we can install Ubercart.

Read I You’ve Used the E-Commerce module on your Drupal InstallationI you are using, or have used, the old Drupal e-commerce module on your site there are ew warn-ings to be aware o .

1. Do not attempt to install Ubercart on a Drupal site that already runs Drupal’s e-commercepackage. Similar URLs in the two packages will result in display or unctionality errors.

2. Some users have reported problems installing Ubercart on a site they uninstalled e-commercerom. Make sure you empty out your cache and cache_* tables be ore attempting to install Uber-cart. These are two big module packages, and there are bound to be le tovers laying around tohose things up. For more in o, please see the FAQ be ore attempting an install like this.

InstallationRequired Modules or UbercartHere’s the list o modules that we will need or Ubercart. Every module listed below contains themodule’s project page on drupal.org as well as a download link to each release that’s supportedby Ubercart. Like with the Drupal package, each module is compressed in a tarball (.tar.gz) ormat.For each module, you will extract the directory contained in the compressed le and upload it tosites/all/modules directory..

These are needed or Ubercart to work

1. Tables API (TAPIr) (download TAPIr 1.5)2. uBrowser (download uBrowser 1.3)3. Token (download Token 1.11)4. Workfow-ng (download Workfow-NG 1.6) Only the Workfow-NG & Workfow-NG UI modules

should be enabled.

Only needed i you need to display images with each product on your store

1. Content Construction Kit (CCK) (download CCK 1.7) Only the Content module is needed.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 12/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 13/85

Übercart DocumentationUser’s Guide

Other core modules:

The ollowing core modules provide other basic systems and unctionality but may not be requiredor every store. Consider what your needs are, check out this list, and i you still can’t gure outwhich ones you need then stop by the orums and ask!

Attribute (ubercart/uc_attribute)Allows customer selectable options on products. For example, i you sold shirts you’d give the

customer a selectable option on the size.Catalog (ubercart/uc_catalog)

Creates a block and a page display o products by category.File Downloads (ubercart/uc_ le)

Allows products to be associated with downloadable les.

Noti y (ubercart/uc_noti y)Send e-mail noti cations to customers at checkout and when modi ying their orders.Payment (ubercart/payment/uc_payment)

Enables the payments API or receiving and tracking payments through your site. All paymentrelated modules are ound in the ubercart/payment directory.Reports (ubercart/uc_reports)

View reports about your store’s sales, customers, and products.Roles (ubercart/uc_roles)

Assign permanent or expirable roles based on product purchases.Shipping Quotes (ubercart/shipping/uc_quote)

Displays shipping quote in ormation to customers at checkout. All shipping related modules areound in the ubercart/shipping directory.Shipping (ubercart/shipping/uc_shipping)

Sets up shipments or shipping companies with integrated web services.Taxes (ubercart/uc_taxes)

Calculates tax on orders

Extra modules:

These modules provide eatures that aren’t necessarily extensions o core systems and don’t de-serve to be included in the core category. You may nd them help ul, but they aren’t essential.

Cart Links (ubercart/uc_cart_links)Create specialized links to purchase products rom other nodes.

Google Analytics or Ubercart (ubercart/uc_googleanalytics)Send e-commerce data to Google Analytics or reports and tracking.

Importer (ubercart/uc_importer)Provides an inter ace to import and export XML representations o the store’s contents.

Product Kit (ubercart/uc_product_kit)Create products that represent collections o other products. For example, i you sold TVs, you

could create a collection o CRT, LCD, and Plasma TV products.Repeater (ubercart/uc_repeater)Allows a multisite setup to share changes to the catalog.

Stock (ubercart/uc_stock)Manage stock levels o your ubercart products

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 14/85

Übercart DocumentationUser’s Guide

Ful llment modules:

These modules extend the unctionality o the shipping quote and order ul llment systems. Theyrely on one or more o the core modules, with many speci cally designed to work to quote andprepare di erent types o shipments.

Flatrate (ubercart/shipping/uc_fatrate)Charge a fatrate per product or per order or shipping.

UPS Shipping (ubercart/shipping/uc_ups)Integrates UPS online tools or rate quoting, shipping, and tracking.

USPS (ubercart/shipping/uc_usps)Returns quotes rom the United States Postal Service.

Weight quote (ubercart/shipping/uc_weightquote)Quotes a shipping ee based on an order’s total weight.

Payment modules:

These modules extend the unctionality o the payments API and so rely on the core Paymentmodule being enabled. Modules in this category o er di erent payment methods and various pay-ment gateways designed to receive and record payments or the di erent methods.

2Checkout (ubercart/payment/uc_2checkout)Integrates checkout with 2Checkout.com.

Authorize.net (ubercart/payment/uc_authorizenet)Processes credit card payments through Authorize.net.

Credit Card (ubercart/payment/uc_credit)Receives credit card payments through checkout.CyberSource (ubercart/payment/uc_cybersource)

Enable to process payments using CyberSource Silent Order POST.Payment Method Pack (ubercart/payment/uc_payment_pack)

Provides the check/money order, COD, and ‘other’ payment methods.Recurring Payments

PayPal (ubercart/payment/uc_paypal)Integrates various PayPal services with Ubercart; read more here.

Recurring Payments (ubercart/payment/uc_recurring)Assign recurring ees to products and manage them.

Test Gateway (ubercart/payment/uc_payment)Adds a credit card gateway that simulates a success ul payment or testing checkout.

Post InstallationOnce you’ve enabled the modules, you’re not nished! There’s still plenty o work to con gure andcustomize your site. Keep in mind that your business model might require additional unctionalitythat Ubercart doesn’t include out o the box (e.g. you’re a music store that sells CDs as well as mu-sic downloads, you’re a European based business that needs a VAT calculated or products sold).For additional unctionality, visit our contributions section to see i there are any additional modulesyou might need. I you don’t see a module that adds the unctionality you need (or i you’re notsure), ask in our orums.

A ter that, spend some time reviewing the list o things to do post installation at Con guring YourStore.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 15/85

Übercart DocumentationUser’s Guide

Upgrading Ubercart ( or Ubercart beta & Drupal 5.x)

I you have a previous release o Übercart already installed and you need to upgrade to the latestversion run the ollowing steps.

1. Go to http://drupal.org/project/ubercart or http://drupal.org/node/129292/release, downloadand untar / unzip the latest release on your local system.

2. Backup your existing Drupal database and installation directories / les (just to be on the sa eside).

3. IMPORTANT AND OFTEN FORGOTTEN - Run the Drupal “update” script. You do this by typ-ing the ollowing url into your browser “yoursite.com/update.php” (o course you need to replace

yoursite.com with your actual site! Smiling). I you see the error message, “database schema out odate” this is Drupal’s reminder that you need to run update.php

Although this is pretty simple, sometimes people orget to do that last “update” step.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 16/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 17/85

Übercart DocumentationUser’s Guide

Drupal Settings TipsWe recommend the ollowing Drupal con guration settings on sites using Übercart:

1. Choose a compact administration theme, like bluemarine, and only use a two column layout soyou have the maximum space or viewing and processing orders.2. Enable Clean URLs. (Required or image support.)3. Make sure to enter your own site in ormation!4. Uncheck the box that makes new accounts require email veri cation at Administer > User

management > User settings. This isn’t very e-commerce site riendly.

We would also recommend setting up the site with the Administrator account (user 1) and thensetting up a separate account that you will use or the day to day business o the site. You may con-sider setting up an administrator role and giving that role all permissions.

Drupal recommends using the sites directory on your server to store contributed modules andthemes used on your site. In the sites directory, you can create a subdirectory called sites/all/mod-ules where you can store modules used by all sites running o your Drupal installation. You mayalso make a modules and themes subdirectory in your individual site directories i you only wantÜbercart to be used on those speci c sites. We recommend ollowing this practice.

Browsing a website can be di cult or inexperienced (and even experienced!) users when sitenavigation items are mixed with user interaction items in a menu. You should consider breakingup your site’s navigation into these two main categories. For example, instead o a single menuwith items listed like “Catalog, My account, Special, Log out”, you can provide two menus or someother way to access the account in ormation.

For more in ormation, you can read the Preliminaries section o the tutorial The Anatomy o a FrontPage:

http://www.bywombats.com/tutorial/anatomy- ront-page

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 18/85

Übercart DocumentationUser’s Guide

Ubercart Settings Tips

A ter your initial Ubercart installation, we recommend you take the ollowing steps:

1. Setup a store administrator role (or roles i you want varying levels o access).* Browse to Administer > User management > Roles and create the role.* Click “edit permissions” in the row or the new role. Click the checkboxes or the permis-

sions you want to grant to this role and click submit.2. To help yoursel and store administrators navigate the site, turn on the Store Links block.

* Browse to Administer > Site building > Blocks and select a location or the Store Linksblock. Save the changes.

* (Store Links block does not display well in Internet Explorer! Watch out!)

* Click the con gure link or that block. Scroll to the “Role speci c visibility settings” sectionand click the checkbox or the store administrator role. Save the changes.* (While you’re in the blocks admin area, you can go ahead and setup your cart block along

with the catalog block i you enabled the Catalog module.)3. Browse through the Con guration menus and adjust the settings to meet your needs.

* Visit Store Administration to see i Ubercart requires any post-installation set up. Productimages in particular require user action.

* For in o on these, browse to the documentation at: http://www.ubercart.org/docs/user/297/ con guring_your_store

4. Adjust product node type settings.* Browse to Administer > Site building > Themes > Con gure where you can uncheck the

box to display post in ormation on products.* Browse to Administer > Content management > Content types > Product where you can

adjust the comment settings or products.

Attribute SettingsThis settings orm only appears when you have enabled the Attribute module.

Attributes are created and attached to products to let customers choose rom a list o options thata ect the product they’re purchasing. For example, a t-shirt may have the attribute o size withoptions or small, medium, large, etc. Attributes may a ect the price, weight, and model numbero the product when added to the cart. This settings orm lets you speci y how to display the pricealterations on the product pages.

By de ault, the price change is displayed by each option name in the select box. This may bechanged so prices are not displayed at all or displayed as a total price instead o just the modi ca-tion.

Further attribute con guration should take place through the Manage attributes section o theProducts administration menu. Read more about this here.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 19/85

Übercart DocumentationUser’s Guide

Cart Links Settings

This settings orm only appears when you have enabled the Cart Links module.

Cart links in Ubercart are specially cra ted links that allow you to do the ollowing things when acustomer clicks them:

* Empty the customer’s shopping cart.* Add any quantity o any number o products (while setting attribute i applicable).* Display a custom message to the user.* Track the click or display on a store report.* Redirect to any page on the site.

The settings page shows some instructions or creating links while taking care o a ew administra-tive options:

* The rst checkbox lets administrators with access see the product string necessary or the cartlink to add a given product to the cart. All you have to do is go to the product page and add it likenormal and a message will be displayed with the string to use.

* The second checkbox turns on tracking or any cart link that has an ID.* The rst textarea allows you to speci y the custom messages used in cart links. These include

an ID number and a text message separated by a | (pipe) character. Hit enter between separatemessages.

* The third checkbox lets the API know it should process cart links that include the empty cartaction.* The second textarea lets you restrict access to cart links to only the links speci ed in the box.

Do not include the /cart/add/ part o the cart link when speci ying links.* The nal text eld lets you speci y what page to redirect to when you are restricting cart link ac-

cess and someone attempts to use an inappropriate link.

Using the cart links module will allow you to track a liate sales, see basic reports, and make suremalicious users or people don’t create unapproved links. Cart links can be added wherever youwant-on any node, post, or e-mail message or example.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 20/85

Übercart DocumentationUser’s Guide

Cart Settings

Cart Settings:

There is a text box that lets you enter the redirect URL or a customer who has added an item tohis or her cart. By de ault, this redirects to the shopping cart view page. You may leave this eldblank or enter <none> to disable the redirect or enter any other Drupal path to redirect to uponadding an item.

There is a text box which lets you speci y a minimum order subtotal or checkout i applicable oryour store. Customers who attempt to proceed to checkout will see an error message indicatingthe store’s minimum order total.

The anonymous cart settings section lets you speci y how long products should sit in an anony-mous user’s cart be ore they are removed rom the database. For this to work properly, you musthave a cron job running or your Drupal site. You can either con gure a crontab to execute yoursite’s cron.php or use a module work-around like Poor Man’s Cron. See also Drupal’s cron jobdocumentation.

There is a similar section that lets you adjust the setting or an authenticated user (anyone whohas logged in to your site).

Two settings pertain to the continue shopping unction on the cart view page. You may speci ywhether it should be a text link or a button element and what URL it should send the customer to.

Finally, the shopping cart view page has a breadcrumb that just de aults to the ront page since itis not normally part o a site’s structure. You may set a breadcrumb link to direct your customers toany other certain navigational page you want (like back to the catalog) or just remove it altogetherby wiping out the URL and text settings.

Cart Panes:

Cart panes are used to build the display o the cart view page. You should keep the De ault cartorm enabled unless you have another module providing alternate unctionality. Using the menuhere you may enable/disable any o the panes and adjust their display order by changing theirweight.

Shopping Cart Block:

I you go to the con guration page or the shopping cart block, you are presented with several op-tions. Some are standard Drupal settings, others are speci c to Übercart. The rst section titled“Block speci c settings” is covered here.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 21/85

Übercart DocumentationUser’s Guide

The rst text eld lets you rename the block i you want. Overriding the de ault title will remove itsability to collapse/expand to hide the cart contents. I you want to do this, then set the title to some-thing and be sure to choose to expand the block by de ault i you want to show the cart contents.

The next set o checkboxes are pretty sel -explanatory. Choose the options you want and give yourcart block a whirl! It’s best to test the entire ordering process be ore opening your site to custom-ers. Choose the settings that you think will best enable your customers to complete an order!

For our sites with a 3 column layout, i the cart is in a column by itsel we like turning it o on ad-ministrative and order view pages. To accomplish this rom the cart block con guration page, usethe text area labeled Page speci c visibility settings. Keep the rst radio select box marked andenter the ollowing lines in the text area:

adminadmin/*user/*/order/*

Catalog Settings

The Catalog module extends the unctionality o Drupal’s taxonomy system. When it is rst in-stalled, a vocabulary named Product Catalog is created with the ollowing settings:

* Multiple inheritance -- Terms may be in more than one place in the hierarchy.* Multiple selection -- Nodes may be in more than one category in the Product Catalog.* Not required -- Product type nodes are not required to be in the catalog.* No ree tagging -- Categories must be speci cally created be ore being used.* Node types: product

Any o these properties may be changed as with any other Drupal vocabulary by browsing toAdminister > Content management > Categories and then selecting the edit vocabulary link. Iother modules that de ne product-like nodes are enabled, those node types should be allowed inthe vocabulary. When a product class is created, the new node type is automatically added to theProduct Catalog.

The Catalog settings page under Store Administration lets you change which vocabulary is usedas the product catalog. There is also a text eld to set the URL that links to the main catalog page.The checkboxes contain various display settings or the catalog block and pages. The choice orthe number o grid columns should be based on your theme.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 22/85

Übercart DocumentationUser’s Guide

Checkout Settings

Checkout settings:The rst two checkboxes let you speci y whether or not checkout is enabled at all (disable to notsell products or rely solely on a third party checkout system) and whether or not it is enabled oranonymous users.

The next two text boxes let you adjust the buttons displayed on the checkout screen. We’ve triedto choose de ault words that minimize con usion or the customer, but no doubt you’ll know yourcustomers better than us. Give it a tweak and run through checkout to see how the changes t.

The next checkbox should remain checked in most cases. When checked, it will cause variousparts o checkout to hide themselves when no shippable products are ound in the customer’s cart.

The next settings group re ers to the way checkbox displays the checkout screen orm. Di erentparts o the checkout screen are displayed in what Ubercart calls panes. By de ault, panes arecollapsed and are progressively expanded by the use o buttons on the orm. This takes the placeo a multi-page checkout. You can uncheck these boxes to have all the orms expand rom the getgo. There is also a text eld that lets you change the text o the next buttons on checkout panes toyour liking.

The nal settings group relates to things that happen upon checkout completion. When new cus-

tomers checkout at your site through an anonymous checkout, they will have accounts createdor them. By de ault, new customers receive an e-mail with their new account details along withan e-mail noti ying them o their order details, but you may use the rst checkbox here to turn thato . For new customers, the noti cation e-mail also has their new account details, but that can beadjusted in the checkout completion invoice template i you desire.

Furthermore, some sites may wish to have the user accounts or tracking purposes but do notwant users logging into their sites. In those cases, you may uncheck the second checkbox in thisgroup so that new accounts are created with a blocked status preventing them rom logging in withthose accounts. You will want to adjust your noti cation settings to make your customers aren’t

receiving an account noti cation and then nding their accounts blocked.Lastly, you may speci y an alternate checkout page i you need to. This isn’t recommended, assome contributions may rely on the de ault checkout page. Advanced users may nd this optionhelp ul i they want to execute arbitrary PHP upon checkout completion through another page ontheir site.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 23/85

Übercart DocumentationUser’s Guide

Checkout panes:Each section on the checkout page is de ned as a checkout pane. These panes display to or col-lect rom the user in ormation regarding their order. Checkout panes are de ned by modules andmay be toggled on or o . You can rearrange them by adjusting their weight. Panes are displayedon the screen in order o lowest weight to highest weight. Feel ree to tweak the de ault order tosomething you think is more natural or your customers to use, but bear in mind that some panesdepend on other panes or in ormation:

* The billing in ormation pane has a button to copy the delivery address to it.* The shipping cost pane calculates a quote based on the cart contents and delivery address

blocks.* The payment method pane keeps a running list o order line items based on the cart contents,

taxes based on the delivery address, and shipping quote.

Furthermore, some checkout panes will have their own settings. These are displayed as part o thisorm in collapsible sections below the main orm. Click the title to expand the section and adjustthe settings as need be.

Checkout messages:All the text boxes in this section let you adjust various messages on the cart pages. Each oneshould have a little description underneath that lets you know where it will be displayed. Feel reeto play with these and run through the checkout process several times to make sure you’re happywith the results.

Because you can speci y an input ormat on these messages, it is entirely possible to insert cus-tom PHP here that you need to execute upon completion or at other times in checkout. By de ault,these elds are all set to the Drupal ormat titled Full HTML. I you remove or alter this input ormat,you may need to adjust your settings here.

For the checkout completion messages, you can use the ollowing keywords that Übercart willtranslate into di erent things:

* !site - This will translate out to the site name.* !new_user - This will translate out to the username o a newly created user.* !new_password - This will translate out to the password o a newly created user.

I you have any recommendations or other use ul keywords, let us know in the orums!

Address elds:The delivery and billing in ormation panes collect standard address in ormation rom your custom-ers. However, di erent countries and stores will have di erent needs. The address elds have beenmade fexible to account or this. On this orm, you may enabled/disable di erent elds, renamethem (e.g. Postal code to Zip code or U.S. stores), and mark them as required or not required.

Tips:

You might consider the ollowing design tips or your site:http://www.ubercart.org/docs/user/326/remove_blocks_ ocus_customers

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 24/85

Übercart DocumentationUser’s Guide

Country SettingsÜbercart uses a simple inter ace or importing and updating in ormation or international countrysupport. Browsing to the country settings page will show you a list o countries currently installed(U.S. and Canada by de ault) along with a select box that lets you import additional countries.Below that are eldsets with country speci c settings, speci cally at the moment the country’s ad-dress ormat. Read on to learn how to get additional country support or your installation.

Imported countries:The table in this section lists the countries you have installed, their current versions, and a set ooperations or each one. From this list you can disable/enable, update, and remove countries youhave installed. A disabled country can simply no longer be selected on address orms whereas aremoved country is totally wiped rom the database. In the case o a store that has been accept-ing orders rom other countries and no longer wishes to support them, it is recommended that you

simple disable the country instead o removing it. Addresses or countries that are removed will nolonger display properly i the country is removed, even i it is later imported again.

To import a new country or update to a new version o a country le, you must place the most re-cent le in the Übercart directory ubercart/uc_store/countries on your server. The latest version othe le will always be used or importing and updating. To install a new country, simply select it withthe select box and click the Import button!

Country speci c settings:The rst collapsed box is the key or writing address ormats. When a country is imported, its de-ault address ormat is set. However, i you need to change the way it displays you may do so usingthe instructions or address ormats and the country’s settings menu. Simply click the name o thecountry you want to modi y and put in the address ormat you want to use. Instead o typing out anactual address, use the ollowing variables to represent the di erent components o an address.

Variable Description! rst_name customer’s rst name!last_name customer’s last name!company company name!street1 rst street address eld!street2 second street address eld!city city name!zone_name ull name o the zone!zone_code abbreviation o the zone!postal_code postal code!country_name name o the country!country_code2 2 digit country abbreviation!country_code3 3 digit country abbreviation!country_name_i name o the country i di erent rom store country!country_code2_i 2 digit country abbreviation i di erent rom store country!country_code3_i 3 digit country abbreviation i di erent rom store country

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 25/85

Übercart DocumentationUser’s Guide

The ollowing example is the de ault address ormat or addresses in the U.S.!company! rst_name !last_name

!street1!street2!city, !zone_code !postal_code!country_name_i

Google Checkout

( or Ubercart 1.x & Drupal 5.x)

Requirements:* Ubercart* uc_google_checkout* An SSL Certi cate or your site* Secure Pages to use SSL* PHP con gured with OpenSSL* Merchant Account or Google Checkout

Con gure Secure Pages:Once your SSL certi cate is set up and your web site responds correctly to https:// requests,Secure Pages must be con gured to secure the communication between Ubercart and GoogleCheckout’s servers. On the Secure Pages settings page, set “Pages which will be secure” to “Makesecure only the listed pages”. In the ollowing eld, put the ollowing:

admin/*google_checkout

More entries such as “node/*/edit” and “user/*” may be added i desired. SSL sacri ces per or-mance or security, so make sure to secure only what needs to be. To prevent errors on autocom-plete elds, add “*/autocomplete/*” to the “Ignored pages” eld.

Con gure Google Checkout:The Google Checkout settings page is ound under Store administration > Con guration. A Mer-chant ID and Merchant Key are needed to send orders to Google Checkout, and they can be oundthrough the link to the Merchant Center at the top o the page. At the Merchant Center, go to theSettings tab and click on Integration. The Merchant ID and Key (which should be mailed to youduring registration) appear on the right-hand side.

UC Google Checkout is designed to provide digitally signed carts, so check the rst box. The call-back URL is also ound on the settings page, but it ollows the pattern o https://www.example.com/ google_checkout. (Note: I have not been able to use https or the callback in test mode. I you have

trouble getting checkout noti cations in Ubercart, remove the “s” in the callback, and unsecure the“google_checkout” path in the Secure Pages settings.) The callback method is XML.

It is recommended that all the Advanced Settings are turned on, though none o them appear to becrucial.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 26/85

Übercart DocumentationUser’s Guide

Enabling UC Google Checkout creates a new cart pane that holds the Google Checkout but-ton. This pane may be disabled to turn o Google Checkout processing, but it should be kept asclose as possible to Ubercart’s checkout button. I any products in the catalog do not con orm to

Google’s purchasing policies, a checkbox is added to the node edit orm which prevents it rombeing purchased through Google Checkout. Care ully read Google Checkout’s user documentationand ollow all applicable policies and regulations.

Importer SettingsWhen importing an XML le into a site that already has existing products, the importer needs toknow how to handle data with the same identi er, usually the name. Each type o data object thatthe importer recognizes can be handled di erently. These settings should be revisited whenever a

new batch o products are imported to make sure the module is going to behave as expected.The last setting is used by the Repeater module, which imports data programmatically. Setting theimported nodes’ author to an existing user is more o a stylistic choice than a technical require-ment.

Manufacturer SettingsÜbercart uses the Taxonomy system to organize products by manu acturer. The Manu acturermodule creates a vocabulary called Manu acturers and extends the taxonomy terms with phoneand ax numbers, websites, and logo images. The vocabulary is created with the ollowing proper-ties:

* No inheritance -- There is no structure to the vocabulary, all terms are on the same level.* Not required -- Products need not have a listed manu acturer.* Free tagging -- Manu acturers can be created as needed rom the product creation page.* Multiple selection -- Products may be listed under multiple manu acturers, but this should be

avoided because it’s probably not true. This property is required or “ ree tagging” vocabularies.

The Manu acturer settings page actually points to the term list o the Manu acturer vocabulary un-

der Administer > Content management > Categories.

Noti cation Settings

The noti cation module uses the order hook system and other events to respond changes in anorder by sending a notice o the change to the customer. The various settings pages let you con-gure the e-mail noti cations or these di erent events. The only general setting at the moment letsyou speci y a store help URL or use in e-mail noti cations so customers can come learn how to

navigate and use your website as logged in users.Invoices use templates that are either in les (in ubercart/uc_order/templates) or con guredthrough the settings orm. These templates allow the use o tokens which are simple pieces o textyou put in the template that get replaced with actual values when the noti cation is generated.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 27/85

Übercart DocumentationUser’s Guide

For example, including [order-id] in your template will show the actual order ID in the e-mail to thecustomer.

Ubercart comes with a de ault invoice template, but you should read this page i you’re interested

in creating and customizing your own template.Checkout:When a customer completes checkout, you can enable an e-mail noti cation sending them theirorder details and links to their account pages. Furthermore, you can send as many admin noti ca-tion e-mails as you want by speci ying multiple e-mail addresses in the admin settings text box.Ubercart provides a de ault customer template, customer.itpl.php, and a very basic admin tem-plate, admin.itpl.php.

Order update:

When an order is updated and the checkbox to send an e-mail noti cation is checked, Ubercartwill send an update noti cation with the current order status and the order comments to the user.Currently this is a very minimal orm and does not use a ull fedged invoice template le.

Role assignment:I you are using the uc_roles module to sell site access and membership roles, there will be an-other section pertaining speci cally to noti cation messages sent by this module. These includee-mails that alert the customer when they are granted a role, when a role they purchased expires,when they renew a role by purchasing it again, and when a role they purchased is about to expireso they can come renew it.

Order Settings

Order settings:These are pretty straight orward. How many orders do you want to see on the screen at a time?Make it so! Enabling order logging will track anything done to orders rom the administration pages.This will log changes to addresses, payment in ormation, products, etc. The payments systemuses it to track when payments are completed, and the noti cation system logs when e-mails aresent out. Never lose in ormation again! Sticking out tongue This is great or systems with multiplestore administrators to understand what your co-workers or employees have been doing withorders prior to you processing them. Finally, i you don’t like using the uBrowser to browse yourproduct catalog when adding products to an order, you can disable it here.

Order workfow:The order workfow section lets you view and customize the order statuses available to you whenadministering an order. Ubercart de nes some de ault statuses that may be renamed or reordered,and they all correspond to an order state to handle de ault actions like creation and checkout o or-ders rom a customer’s shopping cart. You may rename the de aults statuses or even de ne addi-

tional order statuses or the various states to accommodate your store’s particular order workfow.For example, a store that allows users to pay remotely a ter an order has been placed may receiveand review every order that gets checked out. When an order is reviewed and payment has not yetbeen received, it may be moved into an “Awaiting payment” order status. To de ne this status, you

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 28/85

Übercart DocumentationUser’s Guide

would click the “Create new status” button on the workfow settings page and de ne a new orderstatus or the “Post checkout” order state.

I you want to adjust the de ault statuses or the various order states, you will need to expand the

collapsed eldset titled “Order states” and adjust the settings accordingly.Order panes:

Every block on the order administration pages is re erred to as an order pane. Each pane can betoggled on or o or di erent order viewing/editing screens, and they may be rearranged usingweight. Panes are displayed in order o lowest weight to highest weight. Expand this menu to see alist o all the panes available to your site, and expand each pane menu to adjust its settings.

Tips:

When processing orders, it helps to have as much in ormation on the screen as possible. We’vetried to help you out by making the orms compact, but we can only do so much. Some themesdisplay everything spread out and just won’t accommodate order administration. We recommendusing a compact administration theme like bluemarine so you have maximum space available orviewing and managing your orders.

Also, you may not want your fedgling store to appear so young to your customers. However, assoon as someone checks out with an order number in the single digits, you’re exposed. You mightconsider manually modi ying your database to orce order numbers to start at a higher value. Cur-rently, this is done by looking in the table called sequences or a row with a name o uc_orders_or-der_id. (This may vary depending on your database pre x.) Adjust its value to a higher numberand order IDs will start there. Be care ul not to move it down below already existing orders, as thatwill cause errors on new order creation. I there is no row or this variable, it is recommended to goahead and create a test order so the order ID row gets set then adjust it rom there.

Payment Settings

General settings:These are your basic settings or the payment system. The rst three checkboxes re er to twosystems in place to track payment in ormation. I the rst box is checked, a ledger is kept or eachorder showing payments received/re unded along with the current balance or each order. I thesecond box is checked, you may grant permission or people to delete payment lines rom theseledgers in the event o mistakes. The third box makes sure payment in ormation is copied to theorder log which cannot be deleted.

Finally, at checkout, when a customer is choosing their payment method, Ubercart automaticallyloads up an extra details that must be lled out by or displayed to the customer. In the event thatthe payment method requires no urther in ormation, this text eld lets you speci y a de ault mes-sage that gets displayed to the customer so they know it is sa e to proceed with checkout.

Payment methods:The table at the top lists the di erent payment methods available on your site and lets you choosepayment gateways to process those types o payment. For the de ault check and other methods,no gateway is required. I you’ve installed modules that de ne extra payment methods like the

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 29/85

Übercart DocumentationUser’s Guide

Credit module, you may also want to install a payment gateway module that will let you processcredit cards through your site. The select boxes here let you choose the de ault processor per pay-ment method.

Payment methods require their own settings, some more than others. To properly con gure thepayment methods in use on your site, come click on the title below the main table to expand agroup o settings or that method. Be sure to save your change when you’ve nished editing them,and be care ul that you don’t click the reset button accidentally!

Payment gateways:

There is a short description o what payment gateways are here. Di erent payment gateway mod-ules may require you to ll out di erent settings be ore being used to process payments. When youinstall a new one, be sure to come back here and con gure it properly.

Con guring PayPal Website Payments Standard (WPS)Note: This document was originally written by druru and was improved by Ryan and raddy. Inaccu-racies should be reported in the documentation orum.

ACRONYMS

UC - UbercartPP - PaypalCC - Credit CardWPS - Web Payments StandardIPN - Instant Payment Noti cation

INTRO - How this works behind the scenes

PayPal WPS works as ollows:

1. Customer lls in name, email, billing and shipping in o on the checkout orm.2. Customer selects to pay with CC (WPS) on the checkout orm.3. Customer clicks “Review Order” and then “Submit Order.”4. UC automatically “packages up” the customer’s order (either as an itemized list or as a sum to-

tal depending on your WPS settings), along with the name, email, and shipping / billing addressesand redirects the customer along with that in ormation to a secure payment orm at PP.

5. Customer lls in credit card in o on the PP site. The orm already contains all o the in ormationpassed to it by UC so the customer only needs to enter the CC details in the PayPal orm.

* The customer may choose to create a PayPal account at checkout time depending on howyou con gured “Website Payment Pre erences” in your PayPal account (see con guration stepsbelow).

6. Customer is either approved or denied by PayPal.7. Customer is manually or automatically redirected back to UC site.8. A user account is created automatically and the order tables updated appropriately when

Ubercart receives the IPN rom PayPal.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 30/85

Übercart DocumentationUser’s Guide

CONFIGURATION - How to make it work

PP Account Settings:

1. Signup or a PayPal account.

Be ore you can use WPS you need to sign up or a PP account. We recommend using this linkto tell PayPal you registered through Ubercart. They in turn support the continued development oour project.

2. Open a business account (optional).

Although this step is optional, it is recommended or you to keep your personal and businessPayPal accounts separate. Opening a business account is pre erable because it allows you to usea business name on the PayPal checkout pages and in theory allows you to keep your private

name separate. Presenting a business name to customers will help build customer con dence.3. Go through the approval process to veri y your account. This will require a bank account andcorrect contact in ormation, possibly more. You can always contact their customer service i you getstumped here.

4. Con gure PayPal account settings.

Login to your PayPal account and go to the pro le page/tab. There are many options here butonly a ew are required to get WPS working with UC.

Setting up WPS:* Click on “Website Payment Pre erences” under the “Selling Pre erences” section.* Enable “Auto Return”.* Set the “Return URL” to http://www.yourdomain.com/cart/checkout/complete* Enable “Paypal Account Optional” (optional). This will make it so customers are not orced

to create a PayPal account during checkout.* Save your settings.

Setting up IPN:* Click on “Instant Payment Noti cation Pre erences” under the “Selling Pre erences” section.* Make sure that “Instant Payment Noti cation (IPN)” is notchecked.

* Make sure that no IPN URL is set. UC provides this automatically.

* Note: When you login to PayPal, you may get taken to a “Getting Started Steps” page. Steps 1and 2 are required and involve opening your business account and getting veri ed. However, step3 is not required. You do not have to create any buttons or links as UC handles redirecting users toPayPal automatically.

Ubercart PayPal Settings

1. Enable uc_payment and uc_paypal modules at “admin/build/modules”.2. Con gure PayPal WPS settings at admin/store/settings/payment/edit/methods:

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 31/85

Übercart DocumentationUser’s Guide

* Click the “Enable” checkbox or WPS.* Expand the “PayPal Website Payments Standard settings” eldset and make the ollowing

changes:1. Enter your PayPal account e-mail address in the appropriate eld.

2. Set the “PayPal server” to “Live” (versus Sandbox) when you’re ready to process or-ders.3. The other elds are sel -explanatory and based upon your requirements. Be sure to set

them per your needs.3. Con gure your Checkout Settings at admin/store/settings/checkout. You probably want to

make sure you’ve enabled the ollowing two options:* New customers receive an e-mail with their account details.* Anonymous checkout.

4. Enable Automatic order update in WorkFlow-NG module by going to “admin/build/workfow-ng”* Click “Edit” or the Update order status on ull payment

* Tick “Active” checkbox.* Click “Submit”5. For using Report module rst you have to enable the Statistics

module by going to “admin/build/modules”* Now enable Report eature by going to “admin/store/settings/reports”* Choose “Payment Received” under “Report Statuses”

FINISHED

That’s it! Everything should be working now.

TIP: PayPal automatically checks your billing and shipping addresses to see i they are valid whenyou submit the order rom UC. It must use a national address database to do this. This is a greateature or security reasons. You can test it yoursel and see how it works.

However, you need to remember that i you are testing your site and entering bogus address in o,PP will not bring you to checkout page but instead spit out an error similar to ollowing:

“Unable to process payment. Please contact the merchant as the shipping address provided bythe merchant is invalid, and the merchant has requested that your order must be shipped to that

address.”So, test with valid addresses. You CAN enter in bogus name, email and phone number or testingpurposes but you MUST enter in a valid postal address or you never get to see how this works inreal li e!

Testing in the PayPal Sandbox (optional)

In order to test WPS without actually submitting real CC data, you can create a PP Sandbox ac-

count. This requires that you go to an entirely separate PayPal site and create a new and separate

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 32/85

Übercart DocumentationUser’s Guide

account rom your main PayPal business or WPS account. Here’s the site: http://developer.paypal.com

This process isn’t or the aint o heart, but you may nd some help in this thread on PayPal’s site.

When testing in the sandbox, make sure you’ve con gured WPS in your UC settings orm to pro-cess payments in the Sandbox.

Credit Card SettingsThe credit card settings eldset on the payment methods tab is quite extensive and may be a littlecon using at rst. Use this document to wade your way through the settings to arrive at the propersetup or your needs.

Credit card data security

Security is extremely important or websites handling customer credit card data. You should be ascare ul as possible in the way you protect the data to prevent credit card raud. Please be sure youare selecting the right options, as some choices may decrease the security o credit card data onyour website and should be avoided i at all possible. Most payment gateways will require compli-ance with a set o security standards called the PCI DSS. When the Ubercart credit card moduleis used in conjunction with an SSL certi cate and Drupal’s Secure Pages module, your site willcon orm to these standards.

First, you must con gure the encryption settings or card data during checkout. To do this, you’llneed to ll in the lepath text eld. Here you should speci y a older that is outside o your docu-ment root (i.e. not in your www or public_html directory) where the module can create a key leto encrypt credit card data. You will need to grant permissions on the older that allow Drupal towrite to it, but you can change this once the encryption le has been created. Relative paths willbe resolved relative to the Drupal installation directory, so i you have a directory structure like theollowing:mysitemysite/www <-- Drupal installed here.mysite/keys

You would be able to speci y ../keys and Drupal will make sure the credit card encryption key iscreated in the proper directory. For security reasons, you should not use your site’s les directory

except in testing.Note: I you are updating rom a version where encryption was not required, be sure to click thelink on the warning message that shows up to encrypt your existing credit card data. Once youdo this, you won’t be able to do it again. I you accidentally browse away rom the page be oreencrypting existing data, just browse to /admin/store/settings/payment/cc_encrypt to see the ormagain.

As o Ubercart 1.0 RC 5, there is also a credit card debug mode that you can use when testing orto store encrypted card data with orders or o fine processing. This may open you up to vulnerabili-

ties, but you should be aware that even in debug mode Ubercart will truncate credit card numbersto the last 4 digits when a card gets processed. This is in accordance with the PCI DSS restric-tion that ull card numbers and expiration dates should not be stored locally a ter a card has beenauthorized/charged. I you must use debug mode or o fine processing, you should either manuallywipe the numbers or use the “Debug mode data clearing” options on this orm to make sure credit

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 33/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 34/85

Übercart DocumentationUser’s Guide

Product Settings( or Ubercart beta & Drupal 5.x)

Product settings:These are miscellaneous settings that control how products are handled by the catalog and cartsystems. The Product module provides the limit on the number o rows on each page o the prod-uct lists, as well as the settings or the “Add to Cart” orm.

I product kits are enabled, there is also a setting that determines how the customer sees them inthe shopping cart. Kits may be seen as a unit or individual products. The Order module will alwayssee individual products, but uture modules may apply discounts or kits, and it would be bad i thecustomer put a kit in the shopping cart and then removed hal o it and still got the discount.

Product elds:Product nodes contain a variety o in ormation about the items being sold, but not everything is ointerest or use to the customer. The display o these elds in the view tab o the product may bedisabled here. The way nodes are ormatted by Drupal is ultimately up to the theme, but the de aulttheme unction uses these settings to con gure the display. Product template les will be able tond all o a product’s elds in the $content array.

Product eatures:Not every product in the store is cut rom the same mold. Some products sold might be services,downloads, or access to exclusive content. In addition, products might have certain properties(like 50% with a speci ed coupon) that other products don’t have. To accommodate this, Ubercartallows you add product eatures to a product. Any module (e.g. the Ubercare core modules FileDownloads & Roles) that make use o product eature will have its settings here.

Report SettingsThe report settings control a ew aspects o the reports that Ubercart generates.

Paged table sizeThis will set the maximum number o rows used on every report page. Depending on your serverhardware, store size, and screen visibility, you will want to adjust this value accordingly.

Reported statusThese are the order statuses that will be used in reports dealing with sales numbers. You can se-lect multiple statuses by hold the Ctrl button.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 35/85

Übercart DocumentationUser’s Guide

Shipping Quote Settings( or Ubercart 1.x & Drupal 5.x)

For some reason, the task o getting something rom point A to point B is immensely complicated.Deciding how much this service costs is, in some ways, even more so.

In Übercart, the order ul llment is separated rom the shipping quotes. The cost to the customeror shipping may have no bearing at all on how the products are shipped. Several quoting modulesare available that each represent a set o rules to apply to an order to determine how much ul ll-ment should cost. Some need only the address o the customer, others use the composition o theproducts in the order, and still others communicate with a third party (usually the transport com-pany) to get the quote. The store administrator’s rst job is to decide which quoting methods will beused. Quoting modules may contain several quoting methods, so even i Drupal says the module is

enabled, the quoting methods may still be turned o . The Flatrate module is an example o this.Quote settingsThis section handles global settings that control the display o debug in ormation. They may behelp ul in determining what a problem with the shipping quotes is so it can be xed. The de aultstore address is used as the originating shipping address when it is not overridden by a manu ac-turer’s or product’s shipping location.

Quote methodsThis page displays an overview o the various shipping quote methods available to Übercart. Eachquote method may be enabled or disabled and given a weight to determine its position in the re-turned quote. When a method is enabled, a corresponding Workfow-ng con guration is also en-abled. This allows the user to attach conditions and rules or the method that de ne the situationsit is allowed to return a quote. I the conditions ail, a quote is not returned by that method. This isparticularly use ul or setting up one method to handle domestic shipments, and another or inter-national orders. See the Workfow-ng Con guration page or more in ormation.

Each quote method has a page or it’s own settings, and they are explained on the ollowing pages.

Flatrate Shipping Quote( or Ubercart beta)

The Flatrate module allows the administrator to create di erent shipping methods or di erent situ-ations. Workfow-ng sees them as separate events, so it is possible to attach di erent conditionsto each method. This allows or a shipping quote to be custom tailored to any kind o situation yourbusiness rules require.

Set Up the Flatrate MethodsEach fatrate method has our pieces o in ormation: an internal name, a public label, a base price,and a de ault per-product price. Let’s make two shipping methods, one or the normal rate, and oneor ree shipping which we’ll give to large orders. At Store administration > Con guration > Ship-

ping quote settings > Quote methods > Flatrate, click on “Add a new shipping method”.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 36/85

Übercart DocumentationUser’s Guide

In the our elds, put the ollowing:Standard shippingShipping5.00

0.25This lets us see “Standard shipping” in the back end, the customer sees “Shipping” and $5.00 +$0.25 per product ordered.

We also want ree shipping, so we add another method:Free shippingShipping0.000.00

With both o them set up, we can check that they are enabled at Quote methods > General set-tings. O course, right now, they will both show up at checkout all the time. To x that we need to

Set Up Workfow-ng Con gurationsWhen the fatrate methods are created, corresponding events and actions are created by Work-fow-ng. A list o these con gurations is ound at Site building > Workfow-ng. Clicking on the con-guration title allows us to add conditions that limit the situations in which the quotes are returned.

We want to give ree shipping to orders o 10 or more products, so we’ll start there. Click “Add acondition” in the “Free shipping” con guration. On the next page, select “Check an order’s num-ber o products” under Order: Product. It doesn’t matter which products are in the order, as longas there are 10 o them. Select <All products> in the product list, enter “10” or the “Product countvalue” and leave the comparison type as “greater than or equal to”.

Fine and dandy. Go put a ew things in your cart and get a shipping quote. You shouldn’t see theree shipping option. I you have more than 10 things, you’ll see both Free shipping and the not-so-ree Shipping option. This is probably not what you want as it could cause customer con usion andlost sales. Shocked Go back to the Workfow-ng con gurations and add conditions to the Standardshipping method. Again select <All products>, 10 count, and then “Less than” or the comparisontype.

Test it all out to make sure it works the way you expect. Workfow-ng con gurations can get com-plex, so it’s good to start simply so you cover all o your edge cases.Price Overrides Per Product

The per-product price o each shipping method is only a de ault value. Each product may speci yits own shipping price or each shipping method. This is particularly use ul or very light or veryheavy items that a ect the total shipping price more than most. The “Flat rate settings” eldset inthe product edit orm hold the elds to override the shipping methods.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 37/85

Übercart DocumentationUser’s Guide

UPS Online Tool Settings

The UPS module uses the Rate and Services Selection XML Tool to get shipping rates publishedby UPS. To use the Online Tools, you will need the ollowing:

1. A username and password at www.ups.com2. A shipper number representing an account with UPS3. An XML Access Key

To receive this, go to the Online Tools page and click the “Register” link. Apply or a Developer’skey which will grant the right to the XML Access Key.

The quote method can request quotes rom either the test or production environment on UPS’sservers. Use the testing mode until you are airly certain no more errors occur when requestingquotes. The production environment probably has the most accurate in ormation about shipping

rates.The rest o the settings deal with the way UPS handles your shipments. The more Übercart knowsabout this, the more accurately it can get quotes rom UPS.

UPS does not provide all o its services in every location. An error may be returned when a cus-tomer gets a quote and they are not eligible or a service because o their location.

The “Customer classi cation” eld re ers to the kind o customer the store is to UPS, and shouldprobably match up with the Pickup type.

Negotiated rates, Assuming Residential locations, and the Markup all a ect how much the re-turned UPS rates will be. The “Product packages” also a ects the shipping price because a singlepackage is cheaper to process and transport than many boxes o equal total weight.

Übercart automatically converts the product dimensions into the speci ed measurement systemwhen it sends the data to UPS. Choose whichever is commonly used in your country: inches/ pounds or US, metric or nearly everywhere else. Canada can use either.

OpenSSL ( or Ubercart 1.x & Drupal 5.x)

You must do this in your php.ini or UPS to work...

;extension=php_openssl.dll

to

extension=php_openssl.dll

just delete ; to activatesave your php.ini then restart your server

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 38/85

Übercart DocumentationUser’s Guide

USPS Web Tool Shipping Quote Settings

To set up your site to use shipping quotes rom the United States Postal Service, the ollowingsteps should be done:

1. Make sure you have the latest version o Übercart and the uc_usps module.2. Enable the “shipping quotes” and “US Postal Service” modules.3. Your user should have permissions to “con gure quotes” or the “uc_quotes module”.4. Create or login to your USPS.com account and sign up or a Web Tools User ID. You can nd

it in a box on the right hand side o the page at http://www.usps.com/webtools/ entitled “AccessUSPS Web Tools”.

5. Once you have received your email with your Web Tools User ID in it, contact USPS person-ally and request access to the production server by email ([email protected]) or phone(1-800-344-7779) because the requests Übercart sends out will not work at all in testing or pro-

duction mode i USPS does not grant you access personally. Tell them that you are using Ubercartwhich has been tested with their systems already.6. Enter the “Web Tools User ID” you received in the email rom USPS.com into Übercart’s

“USPS User ID” on the USPS quote method page at /admin/store/settings/quotes/methods/usps.7. Make sure you have lled out your de ault store address in the shipping quote settings, as

USPS will need the zip code rom those settings.8. Enter the weight or all o your products in their product settings.9. Test: Attempt to get a shipping quote by adding things to your cart and checking out, ll out the

orms and be sure to enter a shipping zip code.

At this point it should work, and you should get usable shipping quotes in the pane during check-out. I not, enable the debugging in ormation in the shipping quote settings. Being able to see theraw requests and responses may be more use ul than the error messages that are returned.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 39/85

Übercart DocumentationUser’s Guide

Stock Settings

The stock settings page contains all the con gurations or the Ubercart’s stock keeping module.

Send email noti cation when stock level reaches its threshold valueChecking this value will send out a warning email to store admins when a stock level alls beholdits threshold.

Noti cation recipients:This is the comma separated list o email recipients or the threshold warning message.

Message subject:This is the subject o the email message sent.

Message text:This is the body o the email message sent. The input ormat o the message can be changed byclicking the “Input ormat” link below.

For both message subject & message text you can use tokens. The description text below themessage text eld contains a link to a page that explains what tokens you can use.

Store Settings

Contact settings:This section lets you con gure your store’s name, e-mail, and address in ormation.

Display settings:Here you may adjust the way the main store administration page displays the submenus. There arevarious options available, so choose the one you like the best. You may also speci y which orderaddress to use as the de ault address in order and customer lists. This is handy or sites that donot capture or use delivery addresses but do capture billing in ormation. In the event that an orderhas neither address, the username will be used.

Format settings:Ubercart is fexible in the way it ormats currency, weight, unit measurements, and dates so usersin any country should be able to customize these displays or their needs.

Census settings:Ubercart periodically reports to Ubercart.org with installation in ormation and optional sales g-ures. The data collected is anonymous and only used to generate “ un acts” about Übercartsuccess. This includes statistics like total number o installations, versions being used, and totalnumber o products sold and revenue generated across all Übercart sites. No site speci c sales

in ormation or numbers is stored anywhere in our database, and you may disable the eatures asyou desire.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 40/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 41/85

Übercart DocumentationUser’s Guide

Tax Settings( or Ubercart alpha 8 & Drupal 5.3)

The Taxes module is integrated with Workfow-ng to provide extreme fexibility in the way tax rulesare set up. For each tax rule de ned in Übercart, a set o Workfow-ng conditions may be appliedto it which control whether the tax is applied to an order.

De ne the Tax RatesCon guring taxes is a two-step process. First the taxes and their rates are de ned on the Tax Set-tings page under Store administration > Con guration. Under the list o taxes is a link to “Make anew tax rule.” The orm it brings up allows you to speci y the name and rate o the tax, as well asthe product and line item types it applies to. Because it’s possible or taxes to apply to tax amounts,the weights o the tax rules may be important. Taxes are only ever applied to lighter taxes.

Add Workfow ConditionsOnce the tax rules are set up, head over to the Workfow-ng page under Site building. Under Activecon gurations you should see a row or each o the tax rules (plus the con gurations rom othermodules). By clicking on the con guration name you can access the conditions and actions thatare evaluated whenever Übercart calculates the taxes. I the conditions return true or an order, thetax in the action is calculated and applied to it. See the Workfow-ng Con guration page or morein ormation.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 42/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 43/85

Übercart DocumentationUser’s Guide

Creating ProductsThis chapter covers all things related to creating and managing products. Follow the appropriatelinks below to learn about basic and advanced product creation, implementing a product catalog,using the core product eatures or le downloads and role promotions, and more. It will delvebriefy into customizing the look and eel o product pages, importing/exporting products, andimplementing simple stock management.

* Basic Product Creation* Product Attributes and Options* Product SKUs and Adjustments* Understanding Product Classes* Building a Product Catalog* Product Kits

* Selling Files* Selling Site Access (Role Assignments)* Theming Product Pages* Tracking Stock Levels* Importing and Exporting Products* Importing Data

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 44/85

Übercart DocumentationUser’s Guide

Basic Product CreationOn Drupal websites, pieces o content like pages and blog posts are called nodes. Ubercart prod-ucts are also nodes and may there ore be created and used like any other node on your site. Thisopens up a world o possibilities to Ubercart users since countless Drupal modules already exist toa ect things like node display, access, management, and more!

To get started creating products, you must be logged into your site as a user with the create prod-ucts permission. Click on the menu link titled Create content where you will see a list o contenttypes available on your site. To get started, click the link labeled Product.

Here you will see a orm containing all the de ault product elds and any elds added by othermodules you have enabled. Most o them are sel -explanatory and should contain a little bit o helptext to explain their purpose i you are unsure.

A ew things to note:* A product description (the node body eld) is optional, but you must enter a title!* I you’re using the core catalog module, there will be a select box titled Catalog be ore the

description text box. This will list all the category terms in your catalog vocabulary. You only need toselect one or the product to get listed in the catalog, but you can list the product in multiple cate-gories by holding the control key and clicking on multiple terms. For more in ormation on using thecore catalog, re er to this page.

* Most stores will want to attach images to products. Ubercart will automatically con gure im-ages or products i you enabled the required modules prior to installing the product module. I youdidn’t do this in advance, then browse to Administer > Store administration and look or the rowin the status messages table with the title Images. Here you can click on a link to setup the coreimage support. Once enabled, you can add as many images as you want to a product. The rstone added will be used as the de ault image while the others will be displayed as thumbnails onthe page. Images will automatically be resized and will display ull versions when clicked. Resizingworks best on .JPG images.

* The SKU (Stock Keeping Unit) must be unique per product.* You don’t have to use all the price elds i you don’t need them. The only required one is the

Sell price eld which tells Ubercart how much to charge the customer to purchase this product.* Ubercart will hide shipping related checkout panes during checkout i the customer isn’t order-

ing any shippable products. I the product you are creating isn’t a physical product that requires ashipping address, uncheck the checkbox labeled Product and its derivatives are shippable.

* Dimensions or a product aren’t required but may be used by some shipping modules to quoteshipping rates rom a carrier’s web service. You should consult an individual module’s documenta-tion (i it exists) to see i this is a necessary eld or not.

* Add to cart orms may contain a quantity eld to allow customers to add any number o a prod-uct to their cart. You can adjust the de ault or this eld or hide it altogether by adjusting the valueo the eld labeled De ault quantity to add to cart.

* The list position governs where in an ordered list the product will appear. This a ects the coreproduct and catalog lists, and the value may be used to sort a custom View.

Be ore you start adding all your products, you should read the rest o the documentation on pro-duction creation. Some eatures you will want to be aware o and plan to use in advance, like prod-uct classes and the catalog. It is much better to sort these things out in advance!

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 45/85

Übercart DocumentationUser’s Guide

A word about special product eatures:Various product eatures are enabled or your products only a ter installing other Ubercart modules.For example, installing certain shipping modules will add shipping in o elds to the node edit orm.Installing the attribute module will add attributes, options, and adjustments tabs to the node editorm. However, there are other modules that take advantage o a more general “product eatures”system in the product module to attach special things to products. Examples are le downloads,role assignments, and recurring ees. These things are all dealt with in their individual documenta-tion pages. I you have installed any o these modules, you must con gure their settings throughthe Product settings orm and then browse to a product’s Features tab on the node edit orm toattach them to the product.

Regarding Drupal node settings:When creating a product, you will see other eldsets containing general node settings in ormation.You can adjust these de aults elsewhere in Drupal so you don’t have to alter them or every prod-

uct you create. For example, you can de ault all product to have comments turned o by editing theproduct content type at Administer > Content management > Content types.

*To turn o the “Posted by/on” in ormation, you must alter the global themes settings at Adminis-ter > Site building > Themes > Con gure (tab). There is a set o checkboxes labeled Display postin ormation on where you can uncheck the node types you don’t want to display this post in orma-tion.

Product Attributes and OptionsProducts are not created equally, and in some cases the customer gets to decide the type o prod-uct they want. For example, your store may sell t-shirts, and the customer may nd a design theylike but need to get it in a certain size. In a situation like this, you will need to take advantage o theproduct attribute system in Ubercart. It lets you de ne attributes (like size), give them options (likesmall, medium, and large), and enable attributes and options on a per-product basis. For an ex-ample, check out the Ubercart Beanie on the Livetest.

Be ore exploring the process o creating attributes/options and applying them to products, makesure you understand this distinction. Attributes and their options are created on a global level withtheir own de ault settings. These are then applied to products individually a ter they’re created (orduring their creation when using product classes). The settings or attributes and options applied toproducts are speci c to that product, and they de ault to the global de aults but may be adjusted oneach product as need be.

To get started, you’ll need to make sure you have enabled the Attribute module. You must also belogged in as a user with access to administer products. You must create attributes and optionsglobally be ore adding them to the products using the ollowing steps.

Creating an attribute and its options:1. Browse to Administer > Store administration > Products > Manage attributes.

2. Click on the Add an attribute tab or link and ll in the orm. In the case o the Ubercart Beanie,the name was entered as Size and the order was le t at 0. Order determines the sorting o attri-butes on a product. Remember this is a de ault and may be overriden on each product i need be.

3. Submit the orm to create the new attribute.4. In the table o attributes, nd the row or your new attribute and click on its operations link titled

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 46/85

Übercart DocumentationUser’s Guide

options.5. This page shows a table o existing attributes and includes a tab and link labeled Add an op-

tion that you use to access the orm you use to add options to this attribute. Each option you addwill appear on the product’s add to cart orm or this attribute. You don’t have to enable every option

or each product, but you must prede ne any option here that you want to make available on yourproducts. Here again you’re setting up de ault values. The values or cost, price, and weight are fatvalue adjustments. These can be positive or negative numbers. In the case o the Ubercart Beanie,two options titled Small and Medium were added with empty values in the price and weight ad- justments. A Large option was added with a $1.00 price increase associated by de ault with thatoption. Since the ordering o the options de aults to alphabetical order when all options have thesame order value, the options were given order values o 1, 2, and 3 or Small, Medium, and Largerespectively.

Repeat this process every time you want to make a new attribute available or products. You can

also come back at any time and create new options associated with existing attributes. For exam-ple, the Livetest could decide in the uture to sell Extra Large beanies using this Size attribute. Thisoption can be added later and then enabled on a per-product basis or the types o beanies to beo ered in Extra Large versions. To assign attribute and options to products, use the ollowing steps.

Assigning attributes and options to products:1. Browse to the product you want to a ect and click on its Edit tab.2. This brings up the node edit orm, but it also displays several sub-tabs or the edit page. Click

on the on the Attributes tab.3. For products without attributes, there is a link in a table labeled add attributes to this product

that you can click on to pull up an add attribute orm. I you already have attributes on a product,you can use the add attributes orm link in the help text to get to this same orm. Here, using theAttributes select box, select the attribute(s) you want to add to this product and submit the orm.

4. I you need to adjust any o the attribute’s settings or this product, do so in the table showingthe attributes assigned to this product and click the Save changes button. Be aware that selectinga text eld display will disregard the options you enable or the attribute except to ll in the text eldwith the de ault option i you have speci ed one.

5. Now click on the Options tab.6. Here you will see a table or each attribute you have assigned to this product. It contains a

listing o all the options associated with these attributes. For each option, you must check its boxto enable it or this product and then veri y that the values set are correct or this product. Here you

may override the de aults and not a ect any other product. You can also speci y a de ault value tobe selected already when the add to cart orm is displayed or this product. I an attribute is markedas required, it will actually disregard the de ault selection so that customers are orced to look atthis eld and make their own decision.

7. Submit the orm when you have made all your selections and changes.

At this point, you would be nished or this product and can now select the option you want whenyou go to add this product to the cart. Items in the cart will have lines showing the customer theirselections. I the customer adds the same product to the cart with di erent options selected, it willbe displayed in the cart separately. It is possible to use alternate SKUs or products depending on

the options selected. Read the adjustments documentation to learn how to take advantage o thisunctionality.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 47/85

Übercart DocumentationUser’s Guide

Making a text eld attributeMany Ubercart users have taken advantage o our attribute system to let customers enter custommessages or text or a speci c eld. I you simply need a text eld where a customer can enter, orexample, a name to be engraved on a plaque, ollow the above steps or creating an attribute butdon’t create any options or it. Any attribute assigned to a product with no options enabled will bedisplayed in the add to cart orm as a text eld where the customer can enter their own message.There are limits to this method in number o characters allowed and the lack o validation, so youmay end up needing to have a custom module made i you need to change either one o thesethings.

As mentioned above, you can also speci y any attribute to be displayed as a text eld even i it hasoptions enabled. The options will be disregarded except to put the de ault option text in the texteld i a de ault has been selected.

I the products you sell will regularly make use o various attributes and options, you should con-sider using product classes with de ault attributes and options to avoid some o the monotony ocreating all your products. Re er to the product class documentation or more details.

Product SKUs and AdjustmentsIn Ubercart, the product model (usually de ned by a manu acturer) or SKU (Stock Keeping Unit) isthe main identi er or a product across the various systems. When creating your products, decidingon a standard or setting this eld up ront will save you a lot o grie later on. For the purpose othis handbook page, we will use the term “SKU” to re er to the eld, though in some parts o Uber-cart it may still be re erred to as “Model.”

It is important to know that while every product node must have at least one SKU de ned on theproduct orm, you may end up using more than one SKU per product node. There is a SKU adjust-ment system available through the Attribute module that may be used to alter the product SKUdepending on a customer’s attribute selections. Once you have attached attributes and options toa product, go to the Adjustments tab on the product edit page to alter the SKU when a particularcombination o attribute options are selected by a customer. When the product gets added to theircart, it will contain the adjusted SKU. It will be this SKU which may be checked or any number othings including stock, le downloads, recurring ees, etc.

Product eatures are generally attached to a product on a per-SKU or all-SKU basis. You can readmore about product eatures (like le downloads) in their individual sections o the handbook. Su -ce it to say that using the attribute system with adjusted SKUs is the way to sell a product as aphysical shipment or digital download rom one product page or sell a di erent length role promo-tion or site membership rom one product page. Adjustments may also just be used internally ororder ul llment, as the shipper can more easily locate di erent products using unique SKUs.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 48/85

Übercart DocumentationUser’s Guide

Understanding Product ClassesWhen you rst install Ubercart, you will have a single node type to use when adding new productsto your website called Product. The node system in Drupal is a mature system with many contrib-uted modules interacting with it. This is true in Ubercart where you can associate assign de aultattributes and options to a speci c product node type. For this reason, it can be bene cial or yoursite to have multiple node types available or adding products.

Ubercart lets you add multiple product node types beyond the de ault Product type. These addi-tional types are re erred to as product classes. Ubercart will treat any product class as a normalproduct node, adding image support to them i enabled and letting customers view them in thecatalog and add them to their carts.

A ew example use cases may be help ul. Consider product classes i ...

* You want to set de ault attributes/options to di erent product types to simpli y adding productsto your site. Ex: an apparel store selling shirts with size and color attributes and pants with size at-tributes. Consider making a “Shirt” product class and a “Pants” product class with de ault attributesand options appropriate or shirts and pants.

* You want to use CCK to add various extra elds to some types o products you sell but not allo them. Ex: adding an author eld or books. Consider making a special “Book” product class andthen adding the elds to this instead o to the generic “Product” node type, especially i you’re sell-ing other products that don’t have authors!

* You want to make a View that lets customers display a sorted list o products o a certain type.Ex: an apparel store selling hats and t-shirts. Consider making two product classes and adding alter to your View based on the node type so it can display all your hats or all your t-shirts.

There are certainly many other use cases. For the purposes o this documentation, we’ll examinewhat it takes to implement the rst use case. To get started, you need to be logged in as a userwith access to administer product classes. Then use the ollowing steps to add and setup yourproduct class.

Creating and con guring a product class:1. Browse to Administer › Store administration › Products > Manage classes.2. Fill in the in ormation on the orm under the heading Add a class. Re er to the help text be-

neath each eld or in ormation, but particularly note that the ID must be unique or Drupal to re er-ence this node type internally while the name will be what gets displayed to the user.

3. Submit the orm. This will create the new product node type and setup some Ubercart de aults,like images i you’re taking advantage o the core image support.

4. Click on the edit operations link or the newly added class. You can come here at any time toedit the name or description o the class, but you can edit these settings and more through the nor-mal Drupal node type edit orms at Administer › Content management › Content types.

5. For our use case, i you have the attribute module installed you will see two tabs labeled Attri-butes and Attribute Options. Use these two tabs to add de ault attribute and options settings to allproducts created using this product class. The process is similar to the one used to add attributes

and options to individual products detailed here.6. Once you are nished and have saved all the in ormation, you can now start adding productso this class by clicking on the new product class name on the create content page!

That’s all there is to it. Because new product classes are created as separate node types, they

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 49/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 50/85

Übercart DocumentationUser’s Guide

Product settings > Product eatures. You should see a link that says File download settings, a terclicking the link it should open up a orm to speci y settings or le downloads. It’s here where you’llsee the ollowing settings:

Order statusThis speci es when to grant the le download; when an order status reaches the status speci-ed the customer will be granted the download. By de ault, this happens when the order goes toCompleted status.Files path

This is the le directory or le downloads is speci ed. The path can be absolute (e.g. “C:\WWW\ downloads” (Windows), “/www/downloads” (Linux)) or relative to Drupal root (e.g. “../downloads”).I you were insistent on using the Drupal le directory or downloads you could speci y “ les/down-loads” as the path (assuming “ les” was the name o your Drupal les directory and the directory“downloads” existed within that directory).

Files maskI you are amiliar with regular expressions, you can create a mask so that only certain les willbe used as downloads. Do not change this unless you know what you’re doing.Downloads

I you wish to impose a limit on the number o times that a user can download a le purchased,you can speci y it here. Leaving the eld empty will set no limit on the number o downloads.IP addresses

I you wish to prevent the number IP addresses that can access the le you can speci y it here.Leaving the eld empty will set no limit on the number o addresses.Time

I you wish to speci y an amount o time rom when a le download granted that a user is al-lowed to download the le until expiration, you can set it here. By de ault, this is set to “never”which means there is no expiration on le downloads.

A ter lling out this orm you can click the “Save settings” button to save your con gurations.

Adding FilesOnce your le download directory has been setup you’re ready to start adding les to the directoryso that they can be used or le downloads. There are two ways to do this. One is through the builtin le manager located in Administer › Store administration › Products > View le downloads, thisle manager shows all les located in your le directory (with products or SKUs are associated

with them) and allows you to delete them or upload new les. Depending on your website’s con-guration, you might want to upload les that are too big or Ubercart to upload. In which case, youwill have to use the second method, upload the les directly through a FTP/SFTP/SSH client toyour le downloads directory. A ter uploading the les directly, they should appear in le manager.

Adding Files to ProductsFrom here you must associate your Ubecart products with le downloads. This tutorial assumesthe reader already knows how create an Ubercart product. I you do not you can re erence uber-cart product creation. Once your product is created you should see a “Features” tab on the productedit page. A ter clicking the “Features” link, you’ll see a empty list o product eatures. Select “File

download” rom the Add a new eature select box and click “Add”.The next step is to ll out the eature orm with the ollowing details:

Model/SKU

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 51/85

Übercart DocumentationUser’s Guide

The Model/SKU o the product that grants the download. I the product you are selling is solely adownload you’ll want to keep this to “Any”. I however the product you’re selling has di erent SKUadjustments you might only want to grant a download on a speci c SKU (e.g. a music album prod-uct might have 2 SKUs: one or the CD & or the album download).

File downloadThe name o the le (located in the le download directory) that can be downloaded upon pur-chase. Upon typing the le name, an auto complete box should appear showing the available lesthat start with the text typed. I there are any subdirectories in the le download directory, speci y-ing a subdirectory here will grant all les within that subdirectory.

Upon typing “Tes”, the le download module recognizes there is a le called “Test.txt”Description

A description o the le product. This text will be displayed alongside the le name on a custom-er’s le download page.

Shippable productThis checkbox speci es whether the product associated with the download is shippable or not(i there are no shippable items in a customers order he won’t be asked or a shipping address atcheckout). I there is a shippable product included with this le download you will need to checkthis box, otherwise leave it blank.

A ter lling in the orm, clicking “Save eature” will add the eature to your product. You should seethe summary o the le download eature on the product eature page. You can click the “edit” linkto change any details o the le download eature. Clicking the “delete” link will remove the ledownload eature altogether.

Customer DownloadAt this point, any customers that purchase the product should have a le download granted oncetheir order goes into the status you have speci ed. From here it is up to you to set up a workfowcon guration that will move the order into the correct status once a customer has paid, and then tonoti y the customer where they can go to download the le they’ve purchased. Once a customer isgranted a download they can go to My account > Files to download the le.

I you wish to send the customer an email with the le download link, you can do so with the builtin noti cation support. To do this make sure you enable the Noti y module in the same place whereyou enabled the File Downloads module. A ter the Noti y module is enabled, you can browse to

Administer › Store administration › Con guration > Noti cation settings > File download where youcan set up the email template that will get set out to the customer once they complete the sale.

Checking the “Send email to customer with le download link(s)” box will send out the noti cationmessage once the customer is granted the le download. The token [ le-downloads] will containthe le download links that the customer can use to download the le. Other tokens will let youcustomize the message urther (a link in the noti cation orm will describe each token you canuse).

From this point, you should know everything there is to create le products or your Ubercart store.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 52/85

Übercart DocumentationUser’s Guide

Selling Site Access (Role Assignments)

Many sites o ten want to o er exclusive content, eatures, or access to users who pay a sub-scription ee. Drupal roles allow you to assign users o your Ubercart/Drupal website to be givena special set o permissions on your site. Depending on your implementation, you can do manythings with roles. One o the most common uses is to allow users special content access (e.g. anexclusive website orum or a newsletter access). Sites like Warner Brothers’s an websites use theUbercart Roles module to o er an club membership or its bands. Here we will cover how to setupand use the Roles module.Initial SetupEnabling

Instead o creating a product that is exclusive a role product, Ubercart uses its product eature

system to attach role assignment to any product. This way i you wanted to o er a tangible productas well as exclusive access to the site, you could create your standard product then attach a roleassignment eature to it. To get started, enable the Roles under Administer › Site building > Mod-ules. Check the box next to Roles and press the “Save settings” button.Permissions

A ter enabling the module, the next step is to set permissions with the Roles module. Do this bybrowsing to Administer › User management > Access control. This orm will show you all the roleson your Drupal con guration and what permissions they have. You will want to scroll down to thepermissions or the uc_roles module. Here you will see one permission or “view all role expira-tions”, this will give a user the permission to view any role expiration on anyone’s user page. It isrecommend that you only give this role to a site or store administrator.Settings

Once the module is enabled, it still needs to be con gured to work. I you haven’t setup the moduleyou will see a warning message at Administer > Store administration

The Roles module is set up under Administer › Store administration › Con guration > Product set-tings > Product eatures. You should see a link that says Role assignment settings, a ter clickingthe link it should open up a orm to speci y settings or the Roles module. It’s here where you’ll setthe ollowing settings:

Order statusThis speci es when to grant the role to the user; when an order status reaches the status speci-

ed the customer will be granted the role. By de ault, this happens when the order goes to Com-pleted status.De ault expiration

This is the de ault expiration length o role assignment eatures when a store administrator be-gins to add a role assignment to a product.De ault role

This is the de ault role the role assignment eature grants when a store administrator begins to

add a role assignment to a product. I this blank, you will need to select roles to use in the Productrole orm eld below.Product roles

These are the roles that can be used or role assignment eatures. I there are no roles listedhere you will need to add a role under Administer › User management > Roles.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 53/85

Übercart DocumentationUser’s Guide

Show expirations on user pageI this box is checked, any expirations o roles is displayed on a customer’s user page (My ac-

count).Header

I “Show expirations on user page” is checked this is the header that shows on the user page.Depending on what you call access to your site, you might want to change this text.Title

For each role expiration a Title & Message is displayed. By de ault, the title is the name o therole that is expiring.Message

The message in orming the user o the expiration o the role. By de ault, the message is “Therole will expire on !date” where “!date” is ormatted string containing the expiration date.

A ter lling out this orm you can click the “Save settings” button to save your con gurations.

CronI you have any role assignments that have expirations you will need to set up a cron job to run onyour site. For more in ormation on to con gure cron jobs, see con guring cron jobs on drupal.org.Adding Role Assignment to Products

From here you need to start adding role assignment eatures to your products. This tutorial as-sumes the reader already knows how create an Ubercart product. I you do not you can re erenceubercart product creation. Once your product is created you should see a “Features” tab on theproduct edit page. A ter clicking the “Features” link, you’ll see a empty list o product eatures. Se-lect “Role assignment” rom the Add a new eature select box and click “Add”.

The next step is to ll out the eature orm with the ollowing details:

Model/SKUThe Model/SKU o the product that grants the role assignment. I the product you are selling is

solely a role assignment you’ll want to keep this to “Any”. I however the product you’re selling hasdi erent SKU adjustments you might only want to grant a role assignment on a speci c SKU (e.g.you sell a product with an attribute that can add optional access to website orum).Role

The role that will be granted when a customer purchases the product.

Time until expirationHow long the role will last. I set to “never” the role will never expire. The expiration date is setbased on when a customer is granted the role.Shippable product

This checkbox speci es whether the product associated with the role assignment is shippable ornot (i there are no shippable items in a customers order he won’t be asked or a shipping addressat checkout). I there is a shippable product included with this role assignment you will need tocheck this box, otherwise leave it blank.Multiply by quantity

Checking this box will speci y whether the product qty a ects the role expiration length. In other

words, i a role assignment attached to a product lasts or a year, buying 10 products will make therole last or 10 years. I a role assignment has no expiration this option has no e ect on the role as-signment. It is set by de ault.

A ter lling in the orm, clicking “Save eature” will add the eature to your product. You should see

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 54/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 55/85

Übercart DocumentationUser’s Guide

Tracking Stock LevelsAlmost any store dealing in tangible products will have some sort o inventory that needs to man-aged. Depending on your business model, your inventory management needs will di er rom manypeople. The Ubercart core Stock module provides a very basic stock tracking system or inventoryneeds that’s designed to be adaptable so that other 3rd party modules can link with this module toprovide greater control over your inventory. Here we will only discuss how to use the Stock mod-ule’s basic unctions.

Initial Setup

EnablingTo begin, you need to make sure you have enabled the Stock module. You can enable the moduleunder Administer › Site building > Modules. Check the box next to Stock and press the “Save set-

tings” button.SettingsThe next step is to adjust the settings or the Stock module. This can be done by browsing to Ad-minister › Store administration › Con guration > Stock settings. Here you can adjust the settings orthe email warning that will be sent to store administrators when stock levels run low. Checking the“Send email noti cation when stock level reaches its threshold value” box will send out the mes-sage when a stock has been decremented to a threshold value set by store administrators. Thetokens [stock-model] and [stock-level] will, respectively, contain the SKU and stock level that hasbeen reached. Other tokens will let you customize the message urther (a link in the settings ormwill describe each token you can use).

WorkfowThe Stock module’s de ault behavior is to decrement the stock count o items once an order hasbeen submitted. This behavior is controlled by Workfow-NG intergration (you can read more aboutUbercart’s integration with Workfow-NG here). This can be changed with the Workfow-ng UI mod-ule. To do this make sure you enable the Workfow-ng UI module in the same place where you en-abled the Stock module. A ter doing this you can browse to Administer › Site building > Workfow-ng. Here you will see the con guration or “Decrement stock upon order submission”, clicking thatlink will allow you to add new conditions that will determine when to decrement stock on an order.

Adjusting Stock With your settings adjusted, you are ready to set stock levels or your products. On the product editpage you should see a “Stock” link. Clicking it will bring a orm showing all possible SKU adjust-ments that are possible with your product. I there are no SKU adjustments on your product thenonly one SKU will be shown (the SKU entered on the product edit orm). Next to each SKU you willsee a check box that enables stock tracking or that SKU and 2 text elds, one or the current stocklevel, and one or a threshold level. The threshold level is the value that the stock level is supposeto stay above. I con gured, a warning will be sent i the stock level reaches the threshold level.Clicking the “Save changes” button will save any adjustment made to these values. Clicking “Dis-able” will turn o stock tracking or all SKUs associated with this product.

Viewing Stock With everything con gured when the Workfow con guration res (by de ault, when an order issubmitted), each stock level in an order will be decremented. You can see a visible con rmation othis by viewing an order page (this is done by browsing to Administer › Store administration > Or-

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 56/85

Übercart DocumentationUser’s Guide

ders and clicking the view order icon next to the order). In the Admin comments section you shouldsee message(s) that notes the stock levels have been decreased.

This should cover all basic unctionality o the Stock module. I you wish to view a comprehensive

list o all stock levels or your store you can do so through the report that the stock module gener-ates ( ound at Administer › Store administration › Reports > Stock reports). I there are greaterneeds or your inventory management you might want to look to other contributed inventory mod-ules that have been submitted to ubercart.org.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 57/85

Übercart DocumentationUser’s Guide

Importing Data( or Ubercart alpha 8 & Drupal 5.3)

Übercart can read in many products at once through the use o the Importer module. It uses anXML le that describes all o the components o each product and tries to nd link between thedescribed data and the data already in the system.

Because the products in the XML le will have re erences to other data structures, these re erenc-es need to be de ned in the XML. Übercart assumes that any ids in the XML are based on what-ever system the imported products come rom. It attempts to nd a match or these data objectsin its database, usually based on the name. For example, i you want to import a product into anexisting category, a <category> element corresponding to that term should be ound in the importle. Übercart will map the <id> tag to the Drupal tid, and translate it whenever it sees that category

<id> again.

XML Schema Description:XPath Type Required/Occurrences Description /store Container Yes, 1 Root element o the XML le. /store/vocabularies Container No, 1 Holds the <vocabulary> elements. /store/vocabularies/vocabulary Container Yes, unbounded The container or the vocabularyobject’s data. /store/vocabularies/vocabulary/id Integer Yes, 1 The vocabulary ID in the original system. Willbe mapped to a Drupal vid and re erenced later. /store/vocabularies/vocabulary/name String Yes, 1 The name o the vocabulary. /store/vocabularies/vocabulary/description String No, 1 The vocabulary description. /store/vocabularies/vocabulary/relations Boolean No, 1 Whether the vocabulary allows related terms. /store/vocabularies/vocabulary/hierarchy Enum No, 1 The type o hierarchy: 0 -- None, 1 -- Single, 2-- Multiple. /store/vocabularies/vocabulary/multiple Boolean No, 1 Whether nodes can be in multiple terms in thisvocabulary. /store/vocabularies/vocabulary/required Boolean No, 1 Whether nodes must have a term in thisvocabulary. /store/vocabularies/vocabulary/tags Boolean No, 1 Enables “ ree-tagging” or this vocabulary. /store/vocabularies/vocabulary/weight Integer No, 1 The relative position o this vocabulary or itsterms in lists. /store/vocabularies/vocabulary/nodes String No, unbounded A node type that may be categorized

with this vocabulary. /store/categories Container No, 1 Holds the <category> elements. /store/categories/category Container No, unbounded The container or the categoryobject’s data. /store/categories/category/id Integer Yes, 1 The category ID in the original system. Will bemapped to a Drupal tid and re erenced later. /store/categories/category/vid Integer Yes, 1 The vocabulary ID o this category, re erencingone o the previous <vocabulary> elements. /store/categories/category/name String Yes, 1 The name o the category. /store/categories/category/description String No, 1 Category descriptio /store/categories/category/parent Integer No, unbounded Each occurrence is the ID o theparent category o this category. Re ers to the original system’s ID. I not present, the category is at the top level. /store/manu acturers Container No, 1 Holds the <manu acturer> elements. /store/manu acturers/manu acturer Container No, unbounded Container or the manu acturerobject’s data. /store/manu acturers/manu acturer/id Integer Yes, 1 The manu acturer ID in the original system. Willbe mapped to a Drupal tid and re erenced later. Should re erence one o the previous <category> elements. /store/manu acturers/manu acturer/name String Yes, 1 The name o the manu acturer.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 58/85

Übercart DocumentationUser’s Guide

/store/manu acturers/manu acturer/description String No, 1 Manu acturer description. /store/manu acturers/manu acturer/url String No, 1 URL o the manu acturer’s website. /store/manu acturers/manu acturer/phone_no String No, 1 Manu acturer’s phone number. /store/manu acturers/manu acturer/ ax_no String No, 1 Manu acturer’s ax number. /store/attributes Container No, 1 Holds the <attribute> elements /store/attributes/attribute Container No, unbounded Container or the attribute object’sdata. /store/attributes/attribute/id Integer Yes, 1 The attribute ID in the original system. Will bemapped to an Übercart aid and re erenced later. /store/attributes/attribute/name String Yes, 1 The name o the attribute. /store/attributes/attribute/ordering Integer No, 1 The relative position o this attribute in lists. /store/attributes/attribute/options Container No, 1 Holds the attributes <option> elements. /store/attributes/attribute/options/option Container Yes, unbounded Container or the option object’s data. /store/attributes/attribute/options/option/id Integer Yes, 1 The option ID in the original system. Will bemapped to an Übercart oid and re erenced later. /store/attributes/attribute/options/option/name String Yes, 1 The name o the option. /store/classes Container No, 1 Holds the <class> elements.

/store/classes/class Container No, unbounded The container or the class object’sdata. /store/classes/class/id String Yes, 1 The Drupal node type keyed to this class. /store/classes/class/name String Yes, 1 The name o the class. /store/classes/class/description String No, 1 Class descripti /store/products Container No, 1 Holds the <product> elements /store/products/product Container No, unbounded Container or the product object’sdata. /store/products/product/unique_hash String No, 1 md5 hash o the product data. Must be 32characters long. /store/products/product/id Integer Yes, 1 The product ID in the original system. Will bemapped to a Drupal nid and re erenced later. /store/products/product/type String Yes, 1 Drupal node type o product. Must be in<classes> element or {node_types} table. /store/products/product/name String Yes, 1 The name o the product. /store/products/product/description String No, 1 Product descript /store/products/product/model String Yes, 1 Model number or SKU /store/products/product/manu acturer String No, 1 The name o the manu acturer. Correlates to theree-tagging orm on the product edit page.

/store/products/product/list_price Decimal No, 1 The manu acturer’s list price o the model. /store/products/product/cost Decimal No, 1 The cost o the product. /store/products/product/sell_price Decimal Yes, 1 The sell price o the product. /store/products/product/weight Decimal No, 1 The weight o the product. /store/products/product/weight_units String No, 1 The machine-readable units o weight. Currentlyvalid values are “lb”, “kg”, “g”, and “oz”.

/store/products/product/length Decimal No, 1 The length o the product. All three o length,width, and height must be present to be saved. /store/products/product/width Decimal No, 1 The width o the product. All three o length,width, and height must be present to be saved. /store/products/product/height Decimal No, 1 The height o the product. All three o length,width, and height must be present to be saved. /store/products/product/length_units String No, 1 The units o length, width, and height. Currentlyvalid values are “in” and “cm”. /store/products/product/pkg_qty Integer No, 1 The number o products that will t in onepackage. /store/products/product/de ault_qty Integer No, 1 The de ault value o the quantity eld in theproduct’s add to cart orm. /store/products/product/de ault_qty Boolean No, 1 I set, this product is shippable. /store/products/product/image Container No, unbounded Image in ormation oreld_image_cache.

/store/products/product/image/path String Yes, 1 The absolute path to the source image.Übercart downloads it rom this location to / les/ubercart_images where / les is Drupal’s lesystem directory. /store/products/product/image/alt String No, 1 Alternate text or the image.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 59/85

Übercart DocumentationUser’s Guide

/store/products/product/image/title String No, 1 Title text or the image /store/products/product/ elds Container No, 1 Holds the data o the CCK elds or <type>nodes. /store/products/product/ elds/ eld Container No, unbounded Container or the eld data. /store/products/product/ elds/ eld/name String Yes, 1 The machine-readable name o the CCK eld. /store/products/product/ elds/ eld/delta Container Yes, unbounded Contains the values o the eld.Fields with multiple values will have more than one <delta>. /store/products/product/ elds/ eld/delta/* Any Yes, unbounded The tag name oeach element contained in <delta> corresponds to a column in the appropriate content_ eld table. The most commontag will be a single <value> element containing the value o the eld. /store/products/product/categories Container No, 1 Holds the <category> elements. /store/products/product/categories/category Container No, unbounded The container or the product’scategories. /store/products/product/categories/category/id Integer Yes, 1 The category ID in the original system. I toldyou it’d be re erenced later. /store/products/product/attributes Container No, 1 Holds the <attribute> elements. /store/attributes/attribute Container No, unbounded Container or the product’s attribute

object’s data. /store/products/product/attributes/attribute/id Integer Yes, 1 The attribute ID in the original system. Mayre erence an attribute <id> given earlier. /store/products/product/attributes/attribute/name String Yes, 1 The name o the attribute. Used i the <id> cannot be mapped to an existing attribute. /store/products/products/attributes/attribute/de ault_option Integer The de ault option <id> or the attribute. /store/products/product/attributes/attribute/options Container No, 1 Holds the product’s attribute’s <option>elements. /store/products/product/attributes/attribute/options/option Container Yes, unbouContainer or the option object’s data. /store/products/product/attributes/attribute/options/option/id Integer The option ID in the original system. May re erence an earlier option <id> /store/products/product/attributes/attribute/options/option/name String The name o the option. Used only i the <id> can not be mapped to an existing attribute option. /store/products/product/attributes/attribute/options/option/price Decimal The price adjustment o the option. /store/products/product/attributes/attribute/options/option/weight Decimal The weight adjustment o the option. /store/products/product/adjustments Container No, 1 Container or the adjustments to the product’smodel number caused by the customer’s choice o attribute options. /store/products/product/adjustments/adjustment Container Yes, unbounded Container or the individualadjustment. /store/products/product/adjustments/adjustment/combination String A serialized array with attribute ids or keys and the chosen option ids or values.

/store/products/product/adjustments/adjustment/model String The model number that appears on the invoice that refects the chosen combination o attribute options.

Note: Elements marked as required are only required i the parent element is present.Note: All elements should be in the order given.

Order importing yet to come.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 60/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 61/85

Übercart DocumentationUser’s Guide

o Check an order’s weight - Deterimines i the order has the speci ed weight, possiblycounting only a certain type o product.

o Check i an order can be shipped - Check to see i an order contains shippable products.* uc_payment.module:

o Check the order balance - Compare the order balance against a speci ed value.o Check the order payment method - Check or a speci ed payment method.* uc_quote.module:

o Order has a product with a particular shipping type - Check that the order has at least oneitem o the chosen shipping type.

* Actions uc_order.module:o Update the order status - Change the order’s status to a speci ed value; activates the

order status update event.o Add a comment to the order - Add a comment to the order as a regular order comment

(visible by the customer) or as an admin comment.* uc_taxes.module:o Calculate a speci c tax - Calculate the amount o the tax.

* uc_stock.module:o Decrement stock o products in order - Decrements all the stock levels or the SKUs in the

order by each qty speci ed in the order.

* Con gurations uc_payment.module:o Update order status on ull payment - This con guration will update an order’s status to

Payment received when a payment is entered that brings the order balance to a value less than orequal to 0.

* uc_taxes.module:o Apply a speci c tax - Connects a tax rule to its own Workfow-ng event and action, which

allows conditions to be placed on it.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 62/85

Übercart DocumentationUser’s Guide

Receiving PaymentsWhen you setup your Ubercart site, it is your responsibility to con gure the payment settings toyour liking. More in ormation on that can be ound on the Payment Settings page in the Con guringYour Store section o the User’s Guide. You need to enable the payment methods you would liketo receive and make sure the settings are adjusted to your liking. I you plan on processing creditcard payments through your website, you will also need to install a payment gateway module thatinter aces with a credit card web service. The Ubercart project does not con gure or pay or any othese services or you. It is up to you to sign up or a service, enable the appropriate module, andcon gure it or your account.

Payment modules have been under development or a while now, and the latest list o compatibleweb services may be viewed at this page:

http://www.ubercart.org/paymentCore and contributed modules make possible a variety o payment methods, including check,credit card, PO, and special services like PayPal.

Shipping Your ProductsOnce you’ve received your customers money, they expect to be sent the products that they or-dered. With the Shipping module (not to be con used with the Shipping Quote module), Übercartcan keep track o which products got sent where in which box.

The process starts by organizing products into physical packages, each o which will have a sepa-rate shipping label. This is done under the “packages” tab on the order’s page. This page shows alist o the packages that have been created. I there are products that haven’t been packaged yet,there will be a link to the “New Package” page.

The New Package page groups the unpackaged products by shipping type. For each product inthe order, select the quantity and the package to put them in. I more than one product model havethe same package number selected, they are all considered to be in the same package, even ithey have the di erent shipping types. The shipping type with the lowest weight o those productsbecomes the shipping type o the package. Choosing “Sep.” as the package or a product makesQty. separate packages with one product in each.

Each package can be changed or removed through the “Actions” links in the package entry. Pack-ages inherit their de ault shipping in ormation rom one o their products, so things will go moresmoothly i shipping types or packages and their products match up.

Once packages have been made, shipment in ormation can be generated or them. With the ap-propriate shipping method modules, this can include printing a label and scheduling a pickup.Even without any, the Shipping module can record origin and destination addresses, pickup date,

estimated delivery date, package type, and other use ul in ormation. By assigning packages toindividual shipments, it opens the door or other modules to extend the unctionality through RMAs,damage reporting, etc. When shipping packages manually, the shipping types are not much morethan hints, but the method modules may expect speci c product in ormation that may not be therei given packages o the wrong type.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 63/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 64/85

Übercart DocumentationUser’s Guide

played. Clicking on each month will provide current orders placed in that month. This report can beexported to a CSV le i needed. By de ault, the current year is displayed. Store administrators canview any past years by entering a new year and pressing the “View” button.

Custom sales SummaryThis is a customizable report that details orders (broken down by status), products, and revenueproduced in a speci ed time span, with a total at the bottom. By de ault, this report displays salesor the past 12 months o orders (with the speci ed order status in Store administration › Con gu-ration > Report settings).

A ter clicking “customize report” a store administrator is able to adjust the ollowing details:

Start dateThe starting date o the report

End dateThe ending date o the reportSubreport length

The span o time or each row o dataOrder status

The order statuses used in the reportProduct breakdown

I checked, the number o products is replaced with a detailed list o products sold or that timespan.

This report can be exported to a CSV le.

Stock The Stock module creates a report or all SKUs that are tracked by the module. The shows all trackSKUs, their associated product, stock value, and threshold value (the value at which an admin isnoti ed o the stock level). Like the reports generated by the Reports module, you can export thereport to a CSV le.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 65/85

Übercart DocumentationUser’s Guide

Contributed ModulesDrupal and Ubercart both o er a lot o eatures out o the box. However, there’s simply no way

to accommodate every idea and possibility in the core o any project. As such, the unctionalityo these projects is meant to be expanded by contributed modules. You can nd these primarilythrough the Downloads section o drupal.org.

This part o the User’s Guide is meant to hold documentation or nding and using the various con-tributed modules created by the many Ubercart developers around the world.

Installing Contributed ModulesHundreds o developers have released modules that add unctionality to Drupal sites in generalin addition to the dozens o modules being developed speci cally or Ubercart. You can nd thesemodules through our Contributions Directory or the Downloads section on drupal.org.

To install a contributed module, you should:

1. Download the latest version o the module compatible with the versions o your Drupal andUbercart installations.

2. Unzip the module and upload it to a valid module directory on your Drupal site. Ubercart spe-ci c contributions can be placed in the contrib directory in your Ubercart directory, but any validdirectory like sites/all/modules will work.

3. Browse to the page at Administer > Site Building > Modules and enable any dependencies orthe new module and then the module itsel .4. Visit the page at Administer > User management > Access control to make sure you grant

yoursel permission to con gure and use the new module’s eatures.

Module ComparisonsThis section o the handbook is reserved or olks to post up comparisons o modules that o ersimilar unctionality. These should be written in the ormat o guides that either do direct eature

comparisons or list the pros and cons o each module so users can make in ormed choices aboutwhich module to use on their site.

For more general comparisons o Drupal modules, check out the similar comparisons section othe Drupal handbook.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 66/85

Übercart DocumentationUser’s Guide

‘Out of Stock’ solutions( or Ubercart 1.x & Drupal 5.0)

By de ault, ubercart doesn’t prevent the purchase o out o stock items. However, there are threecontributed solutions that o er such unctionality.

uc_stockstubhttp://www.ubercart.org/contrib/4792Version tested: 1

Pros:+ Replaces the “add to cart” button with an “out o stock” badge when the primary SKU is out ostock. This is very handy, as customers instantly know which products cannot be purchased.

+ I a product has attributes, an out o stock message will appear when a customer selects a sold-out attribute. [The message also blocks purchases].

Cons:- The out o stock badge is controlled by the main SKU and will only appear i the main SKU isat zero, regardless i the other attributes are in stock or not. As a result, it is best to disable stocktracking o the main SKU when selling a product with multiple attributes.- When all attributes have sold out, the out-o -stock badge does not appear, although the customerwill receive the out o stock message each time they try to add an attribute to the cart. Althoughthis stops them rom ordering sold-out goods, it creates a usability issue, as the customer has toadd every attribute to the cart be ore realizing that none o them are in stock. (As a work around,you can manually enable the main SKU and set its stock to zero to make the badge appear, butthis obviously isn’t convent or large product catalogues).

uc_multi_stock http://www.ubercart.org/contrib/5097Version tested: 1

Pros:+ Displays out o stock message, when the customer tries to purchase a main SKU or an attributethat is out o stock.+ Unlike uc_stockstub customers can still purchase attributes that are in stock even i the mainSKU is at zero.

Cons:- Unlike uc_stockstub, there is no out o stock badge. Customers have to add the product to cartbe ore being in ormed that it is out o stock. This creates a usability issue.- Like uc_stockstub, there is no message to alert the user when all attributes have sold out, whichcreates the same usability issue.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 67/85

Übercart DocumentationUser’s Guide

qrios’ stock display scripthttp://www.ubercart.org/ orum/support/4037/stock_level_product_page

Pros:

+ Allows customers to instantly see which attributes are in stock (The quantity o ‘in stock’ itemsare displayed as a table). This avoids the usability problems o uc_stockstub and uc_multi_stock.

Cons:- Doesn’t prevent purchase o sold-out products.- Although it can be used in conjunction with one o the above modules to prevent purchase osold-out goods, doing so will create a usability issue: The above modules mark a product as outo stock when it is added to a shopping cart. qrios’ script, however, considers products to be soldout when the order has been completed. Hence, this could create a situation where qrios’s scriptdisplays a product as in stock, but one o the above modules display it as out o stock.

- I no attributes are in stock, no table is rendered, which is con using to the end user.ConclusionOverall uc_stockstub and uc_multi_stock are more-or-less equal. From a customers’ point o view,uc_stockstub is very slightly better due to its “out o stock” badge. This, however, is only a slightimprovement, as the badge is solely controlled by the main SKU, which creates a usability issueor products with multiple attributes.

Either module can be used with qrios’ stock display script to partly overcome their shortcomings.

On the whole though, both modules would suit the needs o most stores, so you can’t go wrongwith either.

Notes:* uc_stockstub requires installation o the Inventory API. You do NOT need to enable Simple

stock levels, which comes with the API.* Be sure to disable uc_stockstub and Inventory API ( rom the modules menu) be ore installing

uc_multi_stock, or your site may become inaccessible due a atal error.* qrios’ stock display script may be a bit tricky or PHP noobs to install. The easiest way to use it,

is to download and install contemplate. Create a new template or Product and paste qrios’ code atthe top o the template. Next, paste “<? php print $stock_html; ?>” in the place where you want thetable to appear. Contemplate is really easy to use, but i you get stuck, check out this video.

* You can improve the usability o qrios’ stock display script by wrapping the table in eldset tagsFor example: < eldset class=”collapsible collapsed”> <legend> < a hre =”#”>HEADING</a></leg-end> < ?php print $stock_html; ?> </ eldset>)

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 68/85

Übercart DocumentationUser’s Guide

Site Enhancement TipsThere is a need or a collection o tips on enhancing your Drupal site or Übercart speci cally and

e-commerce use in general. This section o the documentation is meant to be a repository or allsuch tips and ideas. I the section gets unwieldy in the uture, I’ll break it up into subcategories.

Enhancement ideas can come rom emails, orum posts, comments, or anywhere good brain-storming is going on. A lot o these will ocus on usability and customer interaction with your site.We want shoppers to buy products rom your sites!

Remove Blocks to Focus CustomersWhen customers are browsing your site, you want them to easily nd their way around. Theyshould be able to get to the products they want with as little headache as possible. That’s part okeeping a customer on your site! Equally important is making sure they don’t fake out in checkout.I a customer nds the products they want but then never completes the checkout process, you’rehosed.

One way to ocus their attention on the checkout process is to remove distracting in ormation andlinks that lead away rom checkout. In a Drupal site, this o ten looks like removing blocks rom thepage display. Drupal’s block con guration makes it very easy to remove blocks rom certain pageson the site. Follow these very simple instructions to restrict a block rom appearing on cart pages:

1. Browse to Administer > Site Building > blocks (admin/build/block).2. Click the con gure link by the shopping cart block.3. Scroll down to the eld titled Page speci c visibility settings.4. Make sure the radio button is selected or Show on every page except the listed pages.5. In the text box labeled Pages, list the URLs on which you don’t want the block to be displayed.

In this case, simply type in there “cart/*” to restrict the view rom pages like cart/checkout and cart/ review.

There are other settings in the block con gruation page, and you’re encouraged to use whateverworks or your needs!

Security TipsSecurity. Most people want it when there’s money on the line, but it’s not always prioritized enoughto get it done. Really, though, it doesn’t have to be that hard! Übercart is built in such a way tomake real security possible i you ollow some standard Drupal best practices and take advantageo the logging and access control eatures o Übercart. Combined with one or more contributedmodules rom Drupal.org, Übercart can be a very secure solution or your online business.

The pages in the section have been contributed by community members to discuss data securitystandards and how we can meet them using Drupal, Übercart, contributed modules, and somesmart site con guration. Have a good read!

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 69/85

Übercart DocumentationUser’s Guide

Using the Catalog Effectively There are several things you can do to use the Catalog module more e ectively. The child pages othis section are all things store owners have encountered when setting up their sites. Feel ree toread these, take advantage o the help, and add your own pages to share your tips!

Making the Catalog the Front PageYou may choose to have the catalog display as the ront page o your site. To do this, you need tobrowse to Administer > Site con guration > Site in ormation. The last eld on the page is labeled“De ault ront page” and is the one you need to change. By de ault this is set to “node,” but you canchange it to “catalog” to use that URL as the de ault ront page.

(For what it’s worth, you can change this to be anything! Feel ree to create your own ront pagesome other way, either with a simply page node or using any contributed module, and set its URL

here.)Nicely Aligned ImagesA store’s catalog can look a little silly i the categories don’t line up. The size o the actual cells onthe catalog page is not determined by the CSS so store owners can choose custom image sizesor categories. To adjust the image sizes or your categories, you’ll want to go to Administer >Site con guration > Image cache and click on the eld labeled “Catalog.” Here you can tweak theimage size to make it larger or smaller or your site’s needs. When adding images, you’ll want tomake sure to choose a standard size or your images prior to uploading. It’s ne to rely on imagecache to resize images, but i you have di erent sized images to begin with it will resize them to bedi erent heights/widths. This will result in images that don’t line up and make the page seem clut-tered and disorganized.

Remove Link in Catalog Block TitleI you don’t want the title o the catalog block to be a link leading to the catalog page, you simplyneed to change the title in the block’s con guration page to be plain text. To do this, browse toAdminiter > Site building > Blocks and click the “con gure” link in the row or the catalog block. Thetext eld labeled “Block title” should be blank by de ault, and putting “Catalog” there instead willsimply display the word “Catalog” without making it a link.

Turn O the Products Menu ItemThe product module by de ault enables a menu item in the Navigation menu called Products thattakes the user to a table list o products. I you’re using the catalog, it’s really quite pointless tohave this still in your menu. To turn it o you simply have to go to the menus settings page (admin/ build/menu) and click the link titled disable besides the products menu item.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 70/85

Übercart DocumentationUser’s Guide

Using Third Party Drupal ModulesThis section o the handbook contains a list o other modules contributed to Drupal that will behelp ul in running your Übercart site. Each page contains a short description at the top o how itwill be use ul or an e-commerce site and then a description o how to con gure it properly. Pleasetake your time to read through these and start using them to your advantage!

I you notice any errors in the descriptions, please bring it to our attention in the Documentationorum. I you’re keen on adding modules to this list, go ahead and add your pages and we’ll reviewthem as they come. Smiling

(TODO: Need to get Pathauto, Secure Pages, and many more on here.)

Administration Menu

Once you’ve become amiliar with Drupal’s and Übercart’s administration menu structure, it canbecome tedious to drill down through a couple o page loads when you only need to load one spe-ci c page. The Drupal Administration menu provides a slick CSS-based drop down administrationmenu. Positioned at the top o every page, you can access any Drupal (or Übercart) administrationpage rom just one click.Con guration

A ter copying the module to your Drupal Installation’s module directory. Enable the module atadmin/build/modules. A ter the module is enabled, it should appear at the top o the screen. I itdoesn’t, check whether the Admin Menu Block is enabled (admin/build/block) in a region that yourDrupal theme renders (some themes don’t render blocks in the header region) and that your ac-count/role has the “access administration menu” permission enabled. I you would like to modi ythe menu’s CSS to customize it (or x it or speci c theme compatibility) you can create admin_menu.css in your theme directory to override certain CSS rules.More In ormation

Read more about the module on drupal.org.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 71/85

Übercart DocumentationUser’s Guide

Google AnalyticsOnce you have your site online, catalog ready, and are ready to process payments and shipping,the last step is attracting customers to your site. Advertising and good search engine optimizationwill help get people to your site, but the goal is to turn those people into customers. To do this youneed to create a user experience that is avorable to the customer.While knowing what customers think and eel about your site is di cult to tell without direct sur-veys, there are tools that can help you in er what sections o your site help make sales and whatdon’t. The Drupal Google Analytics module uses Google Analytics to provide all kinds o in orma-tion about your site (number o visits, where your users come rom, how long they visit, what pagesthey see, etc.) that can help you optimize your customer experience.

Con gurationA ter copying the module to your Drupal Installation’s module directory. Enable the module at

admin/build/modules. I you haven’t done so, you will need to register or Google Analytics with aGoogle account.

Getting a Google Analytics IDA ter signing up or a Google Analytics account, you should look or the “Add Website Pro le” onthe Google Analytics dashboard page. A ter you go there, choose a “add a pro le or a new do-main” and enter your website address and timezone. A ter hitting continue, you should see some javascript code like this:

<script src=”http://www.google-analytics.com/urchin.js” type=”text/javascript”></script><script type=”text/javascript”>_uacct = “UA-XXXXXXX-Y”;urchinTracker();</script>

UA-XXXXXXX-Y is the tracking ID or the site. Copy this text or use with the Google Analyticsmodule.Setting Up the Drupal Module

Browse to admin/settings/googleanalytics on your site. In the User ID eld, you can enter the track-ing ID that you copied earlier. From here, you can set up the Drupal user roles and pro le in orma-tion (i you’ve enabled Drupal’s pro le module) you’d like to track. A ter clicking “Save Con gura-tion”, your website should be set up to send Google Analytics in ormation to Google every time apage is viewed on your site. You can con rm this by going back to the Google Analytics dashboard.In the website pro les box, under the status column, it will read “Receiving Data” i Google Analyt-ics is receiving tracking in ormation rom your site.More In ormation

Read more about the module on drupal.org.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 72/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 73/85

Übercart DocumentationUser’s Guide

Tagadelic( or Ubercart 1.x & Drupal 5.x)

I you want Tagadelic module to show or term cloud catalog aliases (such as ‘catalog/12/act’) in-stead o taxonomy aliases (i.e. ‘taxonomy/term/12’) then just place this code in template.php le oyour theme<?php /*** theme unction that renders the HTML or the tags* @ingroup themable*/ unction phptemplate_tagadelic_weighted($terms) {oreach ($terms as $term) {/*i term is rom catalog vocabulary - then show catalog path or it*/

i ($term->vid == variable_get(‘uc_catalog_vid’, 0)) {$url = uc_catalog_path($term);} else {$url = taxonomy_term_path($term);

}$output .= l($term->name, $url, array(‘class’=>”tagadelic level$term->weight”, ‘rel’=>’tag’)) .” \n”;

}return $output;

}?>

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 74/85

Übercart DocumentationUser’s Guide

ViewsThe Views module can be used to display listings o product nodes in many di erent ways. A ewposters here (particularly BullCreek, bwv, and darxtar) have been using Views based product cata-logs on their sites. You can nd contributions or Views integrations here.

Child pages in this part o the book should include general instructions on using Views and speci cpages regarding Views integration with Übercart.

Making the Sell Price Diplayed on Views Themed According to the Con guredUbercart Currency FormatTo do this you need uc_views module. Please ollow the steps below:

1. Create a new unction in uc_views.module:

<?phpunction uc_views_handler_product_sell_price($ eldin o, $ elddata, $value, $data) {return theme_uc_product_sell_price($value,1);

}?>

2. In unction uc_views_views_tables(), under the ollowing lines:<?php‘name’ => t(‘Product: Sell Price’)

?>

add the ollowing line:<?php‘handler’ => ‘uc_views_handler_product_sell_price’,

?>

Note that, i you have created a view earlier, you may need to remove the sell price eld, save theview and re-add the sell price elds into your view. I’ve experienced also that it may take some-times until the changes to take e ect, possibly caused by cache. Emptying the cache table mayhelp.

----You can see the result here:http://www.toyzhunt.com/toy-categories/diecast-models/diecast-bikes

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 75/85

Übercart DocumentationUser’s Guide

XML SitemapEqually as important as having good prices and good customer service on your e-commerce site,good search engine optimization is necessary to attract users to site through search engines likeGoogle, Mircoso t Live, Yahoo. One way to help search engines to organize and display your con-tent to users is to create a sitemap. The sitemap module generates a XML sitemap or your site.Con guration

TODO: Instructions on setting up the module and sending them via search engines.More In ormation

Read more about the module on drupal.org.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 76/85

Übercart DocumentationUser’s Guide

TutorialsThe ollowing tutorials and walkthroughs have been submitted by Ubercart users and developers to

help explain anything rom routine to complex tasks. Posted tutorials may address Ubercart speci -ic issues, module integration, or even general e-commerce issues. Use the Documentation orumto report incorrect or out o date tutorials and we will address them as soon as possible.

An Af liate Program using UbercartWe needed to launch a 2-tiered multi-a liate program or the Ipod Fitness Center (www.ipod t-nesscenter.com) using Drupal. We also use the awesome Ubercart as our Drupal shopping cart,and by using the tools available we were able to build a very nice program to run our new a liateprogram.

We rst looked at the current Drupal A liate module, and elt that since it did not have a Link build-ing unction, or a tie-in to Ubercart, we would be better o rolling our own system. We’d hope thatthis module will continue to be enhanced.

To ollow along with this thread, visit www.ipod tnesscenter.com and login with:username: demopassword: demo

To become an a liate, you enter your in o in a pretty standard Drupal orm; it mainly makes surewe have your mailing address or your check, and your tax id number. Sign up orm is here.

http://www.ipod tnesscenter.com/a liate

Once you join the program, you can use our site to build image or text links to your website.

http://www.ipod tnesscenter.com/a liate/imagelink - To build Image links (cool)http://www.ipod tnesscenter.com/a liate/textlink - to build text links

You’ll notice that these both create links that include your a liate id (which is your Drupal uid) and

all other in o you need to place these on your website.The commissions tab is next, and this is where you can see commission that you earn on the site.These commissions are written using Ubercart during the checkout process.

http://www.ipod tnesscenter.com/a liate/commission - to see commissions earned

Our site has a 2 tier a liate program, we pay 20% commission to the a liate, and 5% to the per-son that re erred the a liate to the site. Here is the code we used in our a liate module to writethe commissions using Ubercart’s hook_order()

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 77/85

Übercart DocumentationUser’s Guide

<?phpunction a liate_order($op, $order, $status) // hoook_order or ubercart

{global $user;

i ($op == ‘update’ && $status == ‘pending’ && uc_payment_balance($order) <= 1) { // sale has been made write commision entries // make sure my a d are set

i (empty($_SESSION[a d])) {$_SESSION[a d] = geta liate oruser($user->uid, alse);$_SESSION[a dup] = geta liate oruser($user->uid, true);

}

// get total o commissionalbe products$comm_total = 0;oreach ($order->products as $product) {

$x = node_load($product->nid);i ($x->type == “supplements”) $comm_total += $product->price;

}i ($_SESSION[a d]) {// write primany commission record

db_query(“insert into {uc_a liate_pay} (order_id, a d, commission, commission_notes)values ($order->order_id, $_SESSION[a d], $comm_total * .2, ‘20% commission on $comm_totalsale to $order->billing_ rst_name $order->billing_last_name’)”);

}i ($_SESSION[a dup]) {// write secondary commission record

db_query(“insert into {uc_a liate_pay} (order_id, a d, commission, commission_notes)values ($order->order_id, $_SESSION[a dup], $comm_total * .05, ‘5% commission on $comm_to-tal sale to $order->billing_ rst_name $order->billing_last_name’)”);

}}

}

?>The rst couple o lines makes sure that my a liate and a liate sponsor are already set, (whichthey should be) they are set also set with hook_user() login, when you click an a liate link, or inhook_menu(), this is one nal check to make sure we have this set.

The next section...<?phporeach ($order->products as $product) {

$x = node_load($product->nid);

i ($x->type == “supplements”) $comm_total += $product->price;}?>

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 78/85

Übercart DocumentationUser’s Guide

Goes through the products in the order and calculates volume or products we pay commission on.We only pay 20% on the supplements product type. Once I have the total, we write a 20% and a5% commission to a new table We created called uc_a liate_pay. It has a simple structure as ol-

lows.CREATE TABLE `uc_a liate_pay` (`key` bigint(20) NOT NULL auto_increment,`order_id` bigint(20) de ault NULL,`a d` bigint(20) de ault NULL,`commission` double de ault NULL,`commission_notes` varchar(60) de ault NULL,PRIMARY KEY (`key`)) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

The next a liate tab is ‘clicks’ which keeps track o every click on an a liate ad

http://www.ipod tnesscenter.com/a liate/clicks

Our a liate code to track click and route the a liate links to the correct pages was super simple.

<?phpunction a liate_start(){$_SESSION[a d] = arg(4);$target = arg(5);$_SESSION[a dup] = geta liate oruser(arg(4), true);

db_query(“insert into (a liate_clicks} (a liate_id, click_datetime, target, re erring_site) values($_SESSION[a d], now(), ‘$target’, ‘” . $_SERVER[‘HTTP_REFERER’] .”’) “);switch ($target) {case ‘home’ : drupal_goto(“home”);case ‘shopping’ : drupal_goto(“supplements”);case ‘go’ : drupal_goto(“goipod”);case ‘join’ : drupal_goto(“user/register”);

case ‘fash’ : drupal_goto(“fash.php”);case ‘zeacaps’ : drupal_goto(“zeacaps”);de ault : drupal_goto(“supplements”);

}}?>

It grabs the a liate id and the target page rom the URL, then nds the sponsoring a liate, itupdates the click database (even tracks the site that sent the click using $_SERVER[‘HTTP_REF-ERER’], and then uses drupal_goto to navigate to the target page you selected when you built

your link.Ubercart was a great plat orm or us to use, and we were able to integrate order reporting easily.By making a call to uc_order_history we let our users see their order detail on a customized userpro le page. Check it out here...

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 79/85

Übercart DocumentationUser’s Guide

http://www.ipod tnesscenter.com/users/demo

<?php

global $user;i ($GLOBALS[‘user’]->uid == arg(1)) {echo ‘<div style=”width: 99%; padding-le t: 1%;”>

<div class=”cnt_hd_txt”><div id=” adeGreen”>

<div class=”cnt_hd”>Order History</div>’;echo uc_order_history($user->uid);

echo ‘</div></div>

</div>’;

}$account = user_load(array(‘uid’ => arg(1)));drupal_set_title(“Pro le - “. $account->pro le_ ullname);

?>

(Yes Ryan, I did have to use drupal_set_title(), thanks or the tip)

I you click on the order, you’ll see that we have including UPS and USPS tracking in ormation inthe order comments... so our users can easily see the status o their orders using Ubercart.

http://www.ipod tnesscenter.com/user/52/order/40

One other thing you may have wondered about when you look at our a liate link is why we usedsuch a long path in the a liate link. ie. Here is a sample link...

http://www.ipod tnesscenter.com/ipod/ tness/nike/a liate/5/go

We don’t actually need the ipod - tness - nike part o the URL, We could have used only a liate,but by having our site keywords included in links pointing to our site, it increases our SEO ratingor those pages.... (No big deal, but I had someone ask me about that when they made a link a ew

days ago.)All in all, we are pretty happy with what this does or our a liate needs. I you would like sourcecode, or have questions, please eel ree to ask... Also, we’d love it i you put up one o my a liateads on your website. Again, we pay out 20% on sales, and it’s FREE.

Enjoy.Jim Ful ordwww.ipod tnesscenter.com

PS. We did not build this as a ready to install Drupal module since we did some pretty extensivecustomization, but i you want to use any o the techniques we use, we’ll be glad to share ideas orsource code.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 80/85

Übercart DocumentationUser’s Guide

Watermarking product images( or Ubercart alpha 8 & Drupal 5.x)

The ollowing tutorial will show an example o how to achieve watermarking or Ubercart productimages. It could also be used as a general guide to achieve watermarking or other imagecachederived images.

Goals:* Apply a watermark to imagecache derived product images.* Apply a watermark to thickbox popup images.

Bene ts:* A single watermark image is required and will be scaled to t the chosen output dimensions.

* The imagecache presets remain fexible allowing or image sizes to be changed easily i theneed arises.

Requirements:* Drupal 5.x* Ubercart alpha 8* Imagecache watermark patch 0.14* A PNG image le (24bit with alpha transparency) or the watermark

I’ll assume you have Drupal 5.x, Ubercart and the required modules installed and working.

Instructions:

Install the patch.

Extract the imagecache watermark patch and copy the patched imagecache.module le into theimagecache module directory (overwriting your existing imagecache.module le).

It is probably a good idea to amiliarise yoursel with the new imagecache actions. Go to Adminis-ter > Site con guration > Image cache (admin/settings/imagecache) and click product to expandthe options.

I you are at all amiliar with imagecache you will notice a lot o new actions:

* De ne canvas: De ne the size o the working canvas and background color, this controls thedimensions o the output image.

* Overlay: source image to canvas: Places the source image onto the canvas or compositing.* Overlay: le image to canvas (watermark): Choose the le image you wish to use as an over-

lay, and position it in a layer on top o the canvas.

* Overlay: text to canvas: Overlay: text to canvas.* Return canvas: Return rezult canvas (by swap source image and canvas).* Replace source image by le.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 81/85

Übercart DocumentationUser’s Guide

Create the watermark image.

A 24bit PNG image le with alpha transparency is required or the watermark. An example le (wa-termark.png - 200x200px) has been attached which you may like to use or testing purposes.

Upload the watermark to the les directory o your Drupal installation.

Modi y the existing imagecache presets.

These instructions are valid or all existing imagecache presets so repeat the same steps or eachimagecache preset you wish to apply the watermark to.

1. Create blank canvas (De ne canvas)

2. Scale source image (Scale)3. Place product image on canvas (Overlay: source image to canvas)4. Overlay watermark (Overlay: le image to canvas)5. Merge to a single image (Return canvas)6. Scale to nal size (Scale)

1. Create blank canvas

Expand the options or the chosen imagecache preset and add a new action: De ne canvas. Up-date the preset and enter the settings using the ollowing as a guide:

* Width: 200* Height: 200* Red: 255* Green: 255* Blue: 255* Weight: -10

This action de nes a blank canvas. Our watermark.png le is 200x200px so we set our canvas tothe same dimensions. Red, Green and Blue are set to 255 to give a white background (althoughthis should never be seen due to the outside dimension setting in the ollowing scale action).

2. Scale source image

Add a new action: Scale image. Update the preset and enter the settings using the ollowing as aguide:

* Width: 200* Height: 200* Scale to t: Outside dimensions* Weight: -9

This action scales the source (product) image to the same dimensions as our canvas and water-mark image ensuring that the watermark covers the whole image. We set outside dimensions sothe source image is cropped to a square.

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 82/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 83/85

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 84/85

Übercart DocumentationUser’s Guide

Modi y the product image theme unction.

Copy the ollowing unction into your template.php le. I you don’t have a template.php le in yourtheme older, re er to: template.php: Overriding other theme unctions.

Don’t orget to rename the unction by replacing theme_ with the name o your theme. I you areusing Garland theme the unction would be garland_uc_product_image(). Also, don’t include the<?php ?> tags

<?php /*** Format a product’s images with imagecache and Thickbox.** @ingroup themeable

*/ unction theme_uc_product_image($images){static $rel_count = 0;$thickbox_enabled = module_exists(‘thickbox’);$ rst = array_shi t($images);$output = ‘<div class=”product_image”>’;i ($thickbox_enabled){$output .= ‘<a hre =”’. check_url( le_create_url(‘imagecache/watermark/’. $ rst[‘ lepath’])) .’”

title=”’. $ rst[‘title’] .’” class=”thickbox” rel=”thickbox’. $rel_count .’”>’;}$output .= theme(‘imagecache’, ‘product’, $ rst[‘ lepath’], $ rst[‘alt’], $ rst[‘title’]);/* i (count($images)){$output .= ‘<br />’. t(‘Click or more images.’);

} */ i ($thickbox_enabled){$output .= ‘</a>’;

}$output .= ‘<br />’;oreach ($images as $thumbnail){i ($thickbox_enabled){$output .= ‘<a hre =”’. check_url( le_create_url(‘imagecache/watermark/’.

$thumbnail[‘ lepath’])) .’” title=”’. $thumbnail[‘title’] .’” class=”thickbox” rel=”thickbox’. $rel_count .’}$output .= theme(‘imagecache’, ‘thumbnail’, $thumbnail[‘ lepath’], $thumbnail[‘alt’],

$thumbnail[‘title’]);i ($thickbox_enabled){$output .= ‘</a>’;

}}$output .= ‘</div>’;$rel_count++;

return $output;}?>

8/3/2019 Ubercart User's Guide

http://slidepdf.com/reader/full/ubercart-users-guide 85/85