Username Password
Bookmark and Share

Shopping Cart Wobject

Here is a little wobject I threw together in the last few days. I hope you like it. :)

You can look at a working version on my development site:

There are many features; most are what you'd expect in a shopping cart package:

  • Categories for organizing products.
  • Full add/edit/delete/move for categories and products, just like you'd expect within WebGUI.
  • Breadcrumb for easy store navigation.
  • Full add/view/update cart functionality. Cart is tied to the user's WebGUI session so even visitors can use it.
  • Support for multiple currencies.
  • Support for pounds or kilograms for shipping weight calculations. Weight of a product may be hidden from customers.
  • Orders are visible to user who placed them. User can come back to the site later and view tracking information.
  • All orders can be viewed by admins, who can also modify the orders to enter tracking data, etc.
  • Pluggable shipping and merchant modules. Includes the following plugins:
    Flat Rate shipping
    UPS XML shipping calculation
    PayPal merchant integration with IPN support

You can discuss this wobject in the discussion forum here.

# Installation Instructions
# WARNING: Be sure to read the important warnings below before using
# this wobject!

1. Download webgui-shopping-cart-1.0.tar.gz and move it to your
   WebGUI directory.

2. Unpack the tar file:
   # tar zxvf webgui-shopping-cart-1.0.tar.gz
3. Several additional Perl modules must be installed:
   # perl -MCPAN -e 'install Locale::Country'
   # perl -MCPAN -e 'install Business::Shipping'
   # perl -MCPAN -e 'install Business::PayPal'
   # perl -MCPAN -e 'install Business::PayPal::IPN'
   Business::Shipping requires many other Perl modules, some of which
   may not want to install correctly.  If CPAN fails to install these
   modules automatically, you need to manually install them:
4. Create the ShoppingCart database tables and populate the necessary
   data by executing the create-ShoppingCart-1.0.sql script:
   # mysql -uwebgui -ppassword WebGUI < docs/ShoppingCart/create-ShoppingCart-1.0.sql
5. Add an entry to the wobjects line in your etc/WebGUI.conf file for
   this wobject:
   wobjects = Article, ..., ShoppingCart, ...
6. Restart the web server.

7. Add a Shopping Cart from the Add Content... menu.  Please see the
   online help for more information on form options.


1. To use the PayPal IPN feature, you must disable visitor caching of
   the page you place your shopping cart on.  Edit the page's properties
   and set both the Cache Timeout and Cache Timeout (Visitors) to 10
   seconds or less.  There is a bug in WebGUI <= 5.5.3 that ignores
   the visitor cache setting which is why you must set both values.  If
   you fail to properly set the cache timeout, PayPal IPN will fail to
   process random IPN's and you will probably lose order data!

2. This wobject has only undergone fairly quick development testing.
   You should thoroughly test your shopping cart before using in a live
   production environment.  As with all open source software, there
   is no warranty and use of this wobject is at your own risk.
   You can test PayPal by creating a second account separate from your
   business account and send small dollar payments to yourself.  You
   can then refund the payment from your business account and not
   incur any fees!
3. Make sure that the values for "Shipping Plugin" and "Shipping Plugin
   Template" match, or your shipping form will not work properly.

# Optional Installation Instructions

To use the UPS shipping calculator, you will need to sign up for a
free UPS account and receive an XML Access Key.  Sign up at:

Once you have a user account, select "Get Access Key" and
"Get XML Access Key" to obtain your access key.

Enter your information on the "Edit Shipping Plugin Options" page.

# Future Enhancements

Here are some things that may be added in the future.  I basically
just ran out of time to implement them all in time for the contest
deadline. :)
* Allow an override shipping charge on individual products.
* Allow a custom handling fee that is added to the shipping charge.
* Support for sales tax/VAT.
* US Postal Service shipping plugin using Business::Shipping.
* Companion macro that displays the current cart contents.
* Manual merchant plugin.  The customer enters all address and credit
  card data via a secure SSL form, and an email is sent to the shop admin
  who comes back to view the order via SSL).
# Uninstallation Instructions

1. Remove ShoppingCart from the wobjects line in etc/WebGUI.conf.
2. Remove the ShoppingCart database tables and all supporting data
   by executing the delete-ShoppingCart-1.0.sql script:
   # mysql -uwebgui -ppassword WebGUI < docs/ShoppingCart/drop-ShoppingCart-1.0.sql
   This will erase all traces of the ShoppingCart from your system,
   including all orders!  Make sure you know what you're doing!
3. Remove the following files/directories:

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
4azote: "
I can Wait to try it! ;)

4agrundma: "Testing bug"
4dpaule: "

2metropolice: "
It gives east error me in log of webgui, and no longer that to do. 

WARNING: Could not use wobject ShoppingCart because: Can't locate object method "new" via package "WebGUI::Wobject::ShoppingCart" (perhaps you forgot to load "WebGUI::Wobject::ShoppingCart"?) at ../lib/WebGUI/Macro/ line 36.

Aid please.
2aaronp: "I would like to know if this Wobject is being maintained and improved.  I am considering using this for a large new shopping cart site and wanted to be sure that it is an active project.  Also, if I needed enhancements or support for it would I be able to pay simebody to help me out?"
2agrundma: "I haven't yet started working on any new features, but I certainly don't intend to abandon the shopping cart.  If you have a need for a specific feature or support, feel free to send me an email and we can discuss"
4agrundma: "That's a new one, some people have had trouble loading the plugins but not the wobject itself.  This is probably a stupid question, but do you have and the ShoppingCart directory in"
4aaronp: "Good to know.  I couldn't find your email address (it's not in your profile), which is why I posted here instead.  I would gladly send you an email.  Please let me know."
2agrundma: "I know, I just added it to my profile."
4zxp: "
It's seems this wobject not run in WebGUI 6.0.0, it just hang up the server when display the wobject.

any one has advise?
4agrundma: "Yeah this will be fixed in version 1.1, out in maybe a week or two.  You can fix this yourself fairly easily.  In edit these 3 lines:

$p = WebGUI::Paginator->new($url,[],$_[0]->get("paginateCategoriesAfter"));
$p = WebGUI::Paginator->new($url,$_[0]->get("paginateCategoriesAfter"));

$p = WebGUI::Paginator->new($params{url},[],$_[0]->get("paginateProductsAfter"));
$p = WebGUI::Paginator->new($params{url},$_[0]->get("paginateProductsAfter"));

$p = WebGUI::Paginator->new($params{url},[],10);
$p ="
4zxp: "very good, I will try ASAP. Thanks for"
2edv: "I think there's another dependecy not listed in the above readme.  My

$ perl -MCPAN -e 'install Business::Shipping'

failed until I first ran

$ perl -MCPAN -e 'install Test::Harness'"
4gorzala: "... until Net::SSLeay is installed. But Net::SSLeay depends on OpenSSL Version 0.9.6j or 0.9.7b or newer. I have 0.9.7d installed, but Net::SSLeay claim that it can't found it. Also after i enter the complete Path to the openssl binary.
Sorry, when it is a silly question, at the moment i am quit new to perl and so."
4agrundma: "Interesting, maybe you should contact the Net::SSLeay"
4iei: "
I've followed the directions for signing up for an XML access key from the UPS web site, and have obtained the access key code.  Now, I'm not sure what I should fill in on the Tracking URL blank or where to find it.
4agrundma: "The default value should still work fine unless UPS changed their site"
4iei: "Is there a default value that should show up in the blank?  Mine isn't showing"
4agrundma: "Yeah, it should default to:"
4abreen: "
We are using the UPS shipping method and when I create an order and click on the "calculate" button it calculates my shipping charge, if I add/update my cart after that and then checkout it does not re-calculate the shipping automatically and will actually allow me to proceed to checkout with the previous shipping calculation.  Is this a bug or am I missing something?
4fecund: "I'm trying to install the shopping cart on 6.2.2, but loading the SQL fails partway through:

ERROR 1146 at line 122: Table '' doesn't exist

Looks like Webgui 6 doesn't create a "help" table.

I posted this to another thread, but this one seems to be a better location."
4rje: "Hi,

I'm trying to use this shopping cart for the first time and I've run into a few problems using it with 6.2.9.  We migrated the internationalizations like the webgui migrate doc suggested and changed the 3 lines of code like the 6.0.0 posts suggested.  I'm not getting an error :
Can't call method "disconnect" on an undefined value at /home/webgui/WebGUI/current/lib/WebGUI/ line 155.

When I try to add the shopping cart wobject to the page.  The shopping cart object also doesn't show up propperly in the "new content" menu as it item is blank (eq where it should say "shopping cart" it is empty).

Any help is appreciated,"
2jdizzle: "We're having the exact same"
2ntisithoj: "
This is great... any chance of it working with 6.7.7?  What is
the status of this and/or the shopping cart modules?  And I see
your examples page is no more.  Has it moved or is it gone forever?

Downloadwebgui-shopping-cart-1.0.tar.gz webgui-shopping-cart-1.0.tar.gz
LinksNo Support Offered
Statistics Downloads: 833
Views: 18004
Rating: 3
Updated: 8/12/2005
Keywords Assets
NavigationBack to the Bazaar
© 2022 Plain Black Corporation | All Rights Reserved