Loading...
 

 Note

This page is to document "what Tiki should do". For feature documentation (what Tiki does), please see corresponding page on doc site
Adding a shopping cart to Tiki Type of page »  Projects

Shopping Cart

New to Tiki5

We now have a basic Cart

What

The plan is to build a lightweight, basic e-commerce system in TikiWiki by making good use of existing features and by adding a few things. E-commerce is was one of the rare Use Cases not addressed by Tiki until Tiki5. Please read Skype log below for debate/discussion.

A typical use will be a mostly informational website to sell a few products & services.

  • Selling registration to various packages for events. (Ex.: day 1 package, day 2 package, full event package)
  • Selling memberships (Ex.: 1 year, 3 year, etc.)
  • Selling a few dozen products (books, software downloads, etc)


For this, the overhead of a full-featured shopping cart like ZenCart is not necessary.

Who & What

  • Marc Laporte, requirements & testing
  • Sylvie Greverend, coding
  • Nelson Ko
  • Robert Plummer

Details

Basic online ordering functionality for a Tiki-powered site can be seen at reseau-environnement.com. Wiki pages are used for product information and the tracker forms are filled thanks to PluginTrackerPrefill. Also, some rewrite-rules were used to handle https. It's sufficient for this project but it's clunky. And it only works for single item shopping. There is no connection to a payment gateway. No calculated totals.

There are some efforts underway for a full-fledged integration with ZenCart. This will be the option for people with more advanced e-commerce needs (upsell / cross-sell, multiple currencies, inventory, discounts, etc.) and it will require more work to install and maintain.

We need something better than the forms we have but not to the level of a standalone shopping cart.

Plan

For the new lightweight Tiki Cart or (Tiki Commerce?), from current code base, we'll use:

  • User trackers for profiles (name, phone number, ship to address, bill to address, etc).
  • trackers to manage products, with categories and filters
  • Wiki pages for products which include structured data from trackers, and use nice template (editable as a wiki page).
  • As suggested by Alain (on the Skype chat), only ask to fill out profile after the order is ready to go.
  • To keep things simple, there would be an address (maybe 2 since sometimes, bill to is different than ship to) in the user profile, and this info would be used at the time of the order (and thus recorded with the order)
  • tiki-cart.php should be not only to add items to a shopping cart, it should also be more generic to add items to other batch actions (ex.: print all wiki pages in cart, mass delete all these pages, mass watch all these pages, etc)


Needed:

  • "Add to cart" button in wiki pages
  • A simple cart like this
  • better https handling
  • link to PayPal and Google Checkout?
  • Email confirmations



Nice to have:

  • Order logging
    • For sure, a copy of the order will be sent out by email (to site administrator and to the customer).
    • If we use Paypal, a copy of the info will be logged in Paypal. However, for b2b, payment will not be handled. So it would be nice to have a Web interface to check previous orders. Users should be able to access this from their user profile.



A full shopping cart would be the next step.

In Tiki7 and Tiki 8


CitadelRock working on new tracker based cart

Shopping Cart Tiki7

Considerations for Tiki 9

Handling of cart payment validity period and abandoned carts


Jonny and I was having a short discussion about this.

When the original payments system was created it was more in the context of requesting a payment from some other user, hence the payment delay (before it becomes overdue) was set to days that made sense. However, for a cart situation, it does not make sense that the user can have the whole day to pay for his order.

To change the interval from days to minutes is easy enough in the code, simply to change "DAY" to "MINUTE" in the query in request_payment() in lib/payment/paymentlib.php. However this function is called not only from cartlib. It is called from a bunch of other places as well, and to add "* 1440" in all these other places is not a clean solution. So it seems best to be to change the pref to support minutes as well. But this is too late for 8.x now we will do it in trunk.

The other thing I had tried to make the payment system more cart like is to run a cron job that runs every 5 minutes that checks if there are any overdue requests. If so, it cancels them, thus reinstating the inventory and all that since the "cancel_cart_order" behavior executes when the payment request is cancelled... This isn't critical if you are not keeping track of inventory I suppose, but cancelling overdue payment requests does make sense anyway otherwise you will have a whole bunch of them sitting around after a while, and it means shoppers can still come back and pay even if it's overdue (which is kind of weird in a cart situation). Another thing for trunk.


The cron job:

if(php_sapi_name() != 'cli') {
        die;
}
require_once ('tiki-setup.php');
global $paymentlib;
require_once ('lib/payment/paymentlib.php');
global $perms;
$perms->setGroups( array('Admins') );
$overdue = $paymentlib->get_overdue(0, -1);
foreach($overdue['data'] as $ov) {
        $paymentlib->cancel_payment( $ov['paymentRequestId'] );
}

This is also not yet committed. Is there some new fancy cron things in Tiki that can do this kind of thing? Timed events? Also, theoretically, payment system could be used for not just the cart on a particular Tiki, and so different handling logic for different overdue payments could be needed.... in the case of cart, to cancel it, or in other cases sending reminders perhaps?

Just some things to think about.

Nelson.


Please also see:




Skype chat log 2008-06-11

[+]

Alias

http://en.wikipedia.org/wiki/Rental_management_software

Spaces [Toggle]

Search Wishes (subject only) [Toggle]

Keywords [Toggle]

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting 7.x
Administration
Ajax 2.x
Articles & Submissions
Backlinks
Banner
Batch 6.x
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution 2.x
Cookie
Copyright
Credits 6.x
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
DogFood
Draw 7.x
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping 3.x
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Payment 5.x
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Report
Score
Search engine optimization (SEO)
Search
Security
Semantic links 3.x
Shopping Cart 5.x
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tags 2.x
Task
Tell a Friend, alert + Social Bookmarking
TikiTests 2.x
Theme
Toolbar (Quicktags)
Trackers
TRIM
User Administration
User Files
User Menu
Watch
WebHelp
Webmail and Groupmail
WebServices 3.x
Wiki 3D
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives 4.x
WYSIWTSN 4.x
WYSIWYCA
WYSIWYG 2.x
XMLRPC




TogetherButton [Toggle]

Documentation: PluginTogether


Calendar [Toggle]


July 2014
Su Mo Tu We Th Fr Sa
29 30 01 02 03 04 05
06 07 08 09 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 01 02