Drupal 6 Ubercart

Notes on Drupal 6 Ubercart e-commerce / online shop setup.

Index

UberCart initial setup

  1. Install as normal, enabling the required sub-modules Cart, Conditional Actions, Order, Product and Store.
  2. Enable the Catalog module for the store front.
  3. For site membership subscription payments, enable the following optional sub-modules: Payment, Roles.
  4. To allow products to have additional attributes, enable the Attribute sub-module.
  5. Enable the sub-modules required by payment gateway, e.g. Credit Card, Test Gateway.
  6. Install the Secure Pages module (http://drupal.org/project/securepages) so we can have credit card payments.
  7. Configure SSL for Apache.
  8. Enable the Secure Pages module via Administer -> Site building -> Secure Pages and add the following URLs to to the list of pages that will be in SSL:

    cart/checkout
    cart/checkout/review
    cart/checkout/payment_details/*
    cart/checkout/complete
    
  9. Make sure that the Secure Pages module is working by visiting the pages that should be SSL.
  10. Administer -> Store administration -> Configuration -> ‘Payment settings’ option -> Edit.
  11. Via ‘Payment gateways’ tab, enable the test gateway.
  12. Create a directory called ‘keys’ at the same level as the root drupal directory and give web server permission to write to it.
  13. Via ‘Payment methods’ tab, enable the ‘Credit card’ payment method for the test gateway and set the ‘Card number encryption key filepath’ to ‘../keys’ in the ‘Credit card settings’ section.

Set up the shop

  1. Add the ‘Shopping cart’ block to the sidebar via Administer -> Site building -> Blocks.
  2. Add a term to the Catalog vocabulary via Administer -> Taxonomy -> Catalog ‘add terms’.
  3. Create a product via Create content -> Product and make sure it’s in one of the catagories (aka “terms”) in the Catalog vocabulary (otherwise it’ll not show up on the store front). It must have a unique SKU and a selling price.
  4. The store front is at /catalog.
  5. Set the ‘Continue shopping’ link to ‘catalog’ via Administer -> Store administration -> Configuration -> Cart settings -> Edit tab.
  6. A list of products are visible at Administer -> Store configuration -> Products or via the normal Administer -> Content management -> Content.
  7. To test checkout, add the product to your cart.
  8. Checkout via the link in the shopping cart sidebar block.
  9. To test a successful transaction, use the card number 4111111111111111 with any valid 3 digit CVV code and expiration date.
  10. To test an unsuccessful transaction, use the card number 0000000000000000 with any valid 3 digit CVV code and expiration date.

Subscriptions

  1. Administer -> Store administration -> Configuration -> Product settings. Make sure Role assignment is enabled in the ‘Product features’ section. Click the section to administer.
  2. In the ‘Product features’ tab, choose default role and product roles. Can set default expiration period of e.g. 1 year relative from activation time, with a reminder time and ‘show expirations on user page’ in the ‘Expiration display’ section, but can override when you later create the product.
  3. Create a product via Create content -> Product. It must have a unique SKU and a selling price. If e.g. 1 year’s membership, then disable “Product and its derivatives are shippable”.
  4. In the ‘features’ tab, add Role assignment, choosing the SKU, role and overriding default expiration if necessary.
  5. Now, when user purchases that product they will be granted the role until expiration time.

Note: There is a bug when creating a product (“..Call to undefined function uc_price()..”) with Ubercart 6.x-2.0-rc3 and Meta tags 6.x-1.0. I believe it’s been fixed in Meta tags 6.x-1.x-dev.

Authorize.net

  1. Enable the Authorize.net module (requires the PHP cURL lib).
  2. TODO - reminder to dig through my offline notes and update this page!

Issues

One issue is drop shipping. UberCart doesn’t have drop shipping support directly (e.g. module) but as Drupal is so flexible it can be configured to support drop shipping, though the value of doing so depends on complexity and, as a related point, whether a dedicated interface is needed. Will have to mention this to the client when we bid.

Translation of products is fine, as it uses standard Drupal i18n functionality, though Ubercart will treat each translated product as unique. Multiple currencies however are not supported - you can only have one default currency. So, no probs if euros ok but not if also need gbp. A related problem is that even if you could have different currencies for each product, they’d still be gathered by Ubercart into a single order but you’d have to then somehow convert to the currency that’s used by the payment gateway or submit multiple orders - one for each currency.

Last modified: 16/11/2011 Tags: ,

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top