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.
Wishes
For Shopping Cart and Payments.
Open & Pending
Closed
[+]
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.
- VirtueMart features (for Joomla!). Tom Aratyn likes it.
- Zen cart features
In Tiki7 and Tiki 8
CitadelRock working on new tracker based cart
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.
Related links
- Shopping Cart Tiki7
- Accounting
- Credits
- Payment
- Payments Pro
- PayPal Subscription
- Community Currencies take2: see CCLite integration with OsCommerce
Please also see:
- Review of 9 open source e-commerce platforms
- PayPal Shopping Cart Integration
- Shopping Cart / ecommerce / online orders
- Comparative chart of ecommerce solutions (French)
- http://www.treasurechestcart.com
- http://www.instinct.co.nz/e-commerce/
- http://www.briggs.net.nz/log/projects/yak-for-wordpress/
Skype chat log 2008-06-11
[+][CODE()}
3:03:15 PM *** Marc Laporte added mlpvolt, Nelson Ko, sylvie-g to this chat ***
3:05:09 PM *** Marc Laporte added André Proulx, djamel202, Dave Thacker, dumarestca, Franck Martin, gary.cunningham-lee, Louis-Philippe Huberdeau, luciash d' being aka Lukáš "luci" Mašek, pjalajas, Vincent Brousseau, Wesley Willians, Xavi to this chat ***
3:07:10 PM *** Marc Laporte added Alain Désilets, Etuate, Jean Georgiadis to this chat ***
3:16:14 PM *** Marc Laporte added bmeunier, Fabio Rampazzo Mathias, Greg Coyne, jean.francois.pelletier, kerrnel, René Lewandowski, Marc-André Lanciault, Hugo, Martin Cleaver, Norman Daoust, olaf-michael stefanov, pioneermiles, Régis Barondeau, Rodrigo Sampaio Primo, Kate Milberry, vigneault.guy to this chat ***
3:16:29 PM Marc Laporte says: Hi! Sylvie & I are having a planning discussion about adding Shopping Cart / E-commerce functionality to TikiWiki. I added you to the chat because I thought you may be potentially interested. Just quit if you are not. I am picking Skype instead of IRC because I can see the logs of the discussion.
3:17:18 PM Marc Laporte says: Some background info: http://dev.tiki.org/shopping+cart
3:18:41 PM Marc Laporte says: The idea is not to become a full-fledged (short term anyway) e-commerce / shopping cart solution but to re-use existing features where appropriate and to add some missing stuff to have a basic solution
3:19:16 PM Marc Laporte says: Trackers can be used for product management. User trackers can can be used for user profiles/preferences.
3:19:23 PM Alain Désilets says: It's a good idea, but I don't really have time to contribute much.
3:19:33 PM Alain Désilets says: But there has been a lot of usability work done on shopping carts.
3:19:41 PM Alain Désilets says: Most important thing I think is:
3:20:25 PM Alain Désilets says: Make sure that people can do the following without having to first register:
3:20:28 PM Alain Désilets says: - Put stuff in the cart
3:20:41 PM Alain Désilets says: - Find the price of something before they put it in the cart
3:20:51 PM Alain Désilets says: - See what they have in their cart and how much it costs total.
3:20:57 PM Alain Désilets says: - remove stuff from the cart.
3:21:20 PM Alain Désilets says: Registration should only be required at check out time, and then again, only if the user hasn't logged on yet.
3:21:50 PM Alain Désilets says: The alternative is similar to having a store where the first thing they do when you come in the door is to ask for your home address and credit card number.
3:22:31 PM Alain Désilets says: Most people want to window shop first, and don't want to waste time providihng this sort of data at that point.
3:22:52 PM Alain Désilets says: Oh, and PLEASE...
3:23:13 PM Alain Désilets says: ... Make it so that the system can recognize my credit card number no matter if I put spaces or not.
3:23:17 PM Fabio Rampazzo Mathias says: why don't work on a 3rd part software support, i mean, do not code a new one, make a plugin to integrate with an already existent one ?
3:23:21 PM Marc Laporte says: (this advice is much appreciated)
3:23:26 PM Alain Désilets says: There are spaces on my physical plastic card.
3:23:30 PM Alain Désilets says: There is a reason for that.
3:23:36 PM Alain Désilets says: Makes the number easier to copy and verify.
3:23:43 PM Wesley Willians says: I agree with fmathias
3:23:49 PM Alain Désilets says: So many web sites still require you to type the number without the spaces.
3:24:46 PM Fabio Rampazzo Mathias says: marc?
3:25:02 PM Marc Laporte says: I am reading
3:25:09 PM Louis-Philippe Huberdeau says: the way I see it, payment is likely to be handled by a third party, like paypal
3:25:22 PM Fabio Rampazzo Mathias says: yes....
3:27:13 PM *** Marc-André Lanciault left this chat ***
3:27:28 PM Nelson Ko says: this problem can be approached in 2 ways in parallel - (1) integrate with shopping cart (some work to link with Zen cart will be done very soon) and (2) provide a tracker based system for lightweight functionality.
3:27:37 PM luciash d' being aka Lukáš "luci" Mašeksays: fmathias, weslwywillians: sorry, i'm in work rush but just quickly: i don't know any usable FOSS which could be integrated... there's zen-cart but it's way too big mysql only solution
3:28:06 PM Marc Laporte says: 100% certain that PayPal (which can handle credit cards as well) will be an option. Most probably first option as we then don't have to worry about currency, security, no need to stock CC card numbers, etc. and we want http://dev.tiki.org/PayPalSubscription to be able to subscribe to groups and offer content based on groups.
3:28:14 PM luciash d' being aka Lukáš "luci" Mašeksays: (sorry, no tab completion here like in irc)
3:29:52 PM Marc Laporte says: One of the use cases is Registration and payment for events. A lightweight alternative would be very nice. This is an example: https://reseau-environnement.com/inscription
3:30:20 PM Wesley Willians says: i must go now. 😑
3:30:26 PM *** Wesley Willians left this chat ***
3:30:28 PM Marc Laporte says: This can already be done with trackers but it's clunky (not possible to register to several events)..
3:30:35 PM Fabio Rampazzo Mathias says: luciash: i don't know the software, do you know this one http://www.oscommerce.com/ ?
3:31:00 PM luciash d' being aka Lukáš "luci" Mašeksays: fmathias: yes, it sucks even more than zen-cart 😉
3:31:06 PM Fabio Rampazzo Mathias says: hehehehe
3:31:15 PM Marc Laporte says: I think Zen is a fork of OSC
3:31:28 PM luciash d' being aka Lukáš "luci" Mašeksays: i think zen-cart is only one usable
3:31:33 PM Nelson Ko says: ditto luci's comment on OSC
3:31:44 PM Fabio Rampazzo Mathias says: the point is....why do we have YAES (Yet Another Ecommerce Software) instead evolving an already existent one?
3:31:47 PM Nelson Ko says: i don't really like zen cart
3:31:56 PM Nelson Ko says: but there aren't much better around
3:32:02 PM Nelson Ko says: I evaluated magento - still too raw
3:32:08 PM luciash d' being aka Lukáš "luci" Mašeksays: fmathias: because there' no one to evolve ?
3:32:14 PM Nelson Ko says: anyway, I met the zen cart core members recently
3:32:24 PM Fabio Rampazzo Mathias says: i mean, let's code OSC and make it rule....and with tikiwiki support
3:33:16 PM luciash d' being aka Lukáš "luci" Mašeksays: ...or make own ecommerce solution integrated in tiki and rule them all 😉
3:33:21 PM Nelson Ko says: they are working hard on baking vastly improved new version
3:33:28 PM Nelson Ko says: anyway, I agree that a lightweight solution is needed
3:33:39 PM Marc Laporte says: Bitweaver forked ZenCart to BitCommerce and it's GPL (so we couldn't bundle)
3:33:40 PM Nelson Ko says: that does not depend on a full-fleged cart
3:33:45 PM Fabio Rampazzo Mathias says: and remake the wheel
3:34:33 PM Marc Laporte says: These are excellent discussions. I am glad to see an interest!
3:34:38 PM luciash d' being aka Lukáš "luci" Mašeksays: +1 for lightweight shopping cart solution integrated in tiki
3:35:08 PM Fabio Rampazzo Mathias says: i'm think we as a open source developers need to converge energy...
3:35:15 PM Fabio Rampazzo Mathias says: (cut the 'm :P)
3:35:41 PM Fabio Rampazzo Mathias says: (totaly wrong english, my bad :P)
3:38:33 PM luciash d' being aka Lukáš "luci" Mašeksays: w00t, we're 20: http://www.last.fm/group/Tikiwiki/members 😊
3:38:49 PM luciash d' being aka Lukáš "luci" Mašeksays: marc doesn't like music ? 😉
3:39:01 PM luciash d' being aka Lukáš "luci" Mašeksays: ok, gotta go...
3:39:09 PM *** luciash d' being aka Lukáš "luci" Mašekleft this chat ***
3:40:08 PM Fabio Rampazzo Mathias says: i can't see a lightweight shopping cart solution... solving problems
3:40:37 PM Fabio Rampazzo Mathias says: i mean, ok to basic shopping it's really ok, but if you grow up a little bit.....buy a software
3:41:07 PM Nelson Ko says: I am right now working on zen cart integration already
3:41:20 PM Nelson Ko says: but for a lot of people, installing another s/w etc... is too much
3:41:33 PM Marc Laporte says: All options are on the table for now.
3:41:38 PM Nelson Ko says: I see it as two separate options.
3:41:55 PM Fabio Rampazzo Mathias says: that's a point
3:43:14 PM Fabio Rampazzo Mathias says: in my opinion, having a lightweight ecommerce is not that bad if you have an integration to handle a more featured one....like OSC, ZenCart,whatever....
3:43:46 PM Fabio Rampazzo Mathias says: so u can startup with a basic one and can grow (without loose data 😉) to a particular one....
3:45:08 PM Marc Laporte says: I expect that most of my stuff will be ok in lightweight. Who would be using full solution? I mean, in 5 years, no one has ever released a working bridge of TikiWiki with any e-commerce solution. What it too difficult? No need? etc ?
3:46:04 PM Fabio Rampazzo Mathias says: a company who sells websites like 3rcorp ?
3:46:19 PM Nelson Ko says: Marc: the minute you sell multiple stuff, you need a real cart
3:46:29 PM Fabio Rampazzo Mathias says: thats the point.....
3:46:33 PM Nelson Ko says: or multiple currencies domains, etc...
3:46:58 PM Nelson Ko says: or multiple payment methods
3:47:04 PM Fabio Rampazzo Mathias says: let's do a real cool stuff to rule....
3:47:11 PM Fabio Rampazzo Mathias says: and takeover the world :P
3:49:33 PM Fabio Rampazzo Mathias says: this is a great disscution, cause handle much interesting point.... i'm glad to participate 😊
3:49:44 PM *** Louis-Philippe Huberdeau left this chat ***
3:54:08 PM Fabio Rampazzo Mathias says: oh sorry
3:54:11 PM Fabio Rampazzo Mathias says: i have to go right now
3:54:28 PM Fabio Rampazzo Mathias says: thanks for the opportunity
3:54:28 PM Marc Laporte says: you can leave open an read log when you come back
3:54:36 PM Fabio Rampazzo Mathias says: ok
3:58:01 PM Marc Laporte says: Multiple currencies and multiple payment methodes, I can see a full-featured cart. But for multiple stuff, I was think of it being cart of the lightweight solution. wikis & trackers for product management. An shopping cart form which remembers that you have 5 items of trackeritemid #6 and 3 items of trackeritem #9 It calculates total and provides you an order form. Order form sends you to Paypal for payment. In some cases, there is no payment (B2B), it just sends an email to someone (with Community Currencies to the customer) informing them about the order information.
3:58:45 PM Nelson Ko says: yeah - I meant multiple types of stuff with upsells, related products, bundles and all sorts of that kind of things
3:58:50 PM Marc Laporte says: For this b2b case, I can do now with trackers except for the part where the order is kept in a cookie as I shop around on the site and select my quantities
3:59:05 PM Marc Laporte says: ah yes, I fully agree.
4:00:19 PM Marc Laporte says: items with subSKUs for colors, sizes, etc would be better handled by full solution, but just to sell books or registration to a cocktail, simple solution would work.
4:00:45 PM Nelson Ko says: right.
4:01:44 PM Marc Laporte says: Should Lightweight solution maintain a history of orders? Or it's just fired off in an email?
4:03:26 PM Nelson Ko says: my original hunch was yes, but now that you asked it- I'm not so sure anymore - esp. if something like Paypal is already keeping some kind of history.
4:03:57 PM Nelson Ko says: it sure is a nice to have
4:07:01 PM Alain Désilets says: Hate to say this, but Tiki trackers suck even when used for tracking things.
4:07:16 PM Alain Désilets says: I can't see how they will be usable when used to implement a shopping cart.
4:07:22 PM Alain Désilets says: Had to say it 😉.
4:07:33 PM Marc Laporte hugs Alain
4:10:02 PM Marc Laporte says: The idea is to use trackers to manage the product list, but the products are in wiki pages. We use a template to show structured info in the various wiki pages (price, type of product, etc). This template is another wiki page so you can change layout of your cart. Each wiki page has an add to cart button
4:10:59 PM Marc Laporte says: But once you have added to cart, you are no longer in trackers. You would be in a yet-to-be-developped tiki-cart.php page
4:12:12 PM Alain Désilets says: Sounds pretty kludgy to me.
4:12:42 PM pjalajas says: just dropping by, fwiw, my use case would be a 1) small retail shop in town (or an online mall for multiple small shops in town with distinct style for each store).
4:13:03 PM Alain Désilets says: For example, the product list will probably have a header that says "Tracker Items" as opposed to "Available Products".
4:13:25 PM Alain Désilets says: When you right click on a tracker item, the menu will tell you about trackers instead of products, etc...
4:13:46 PM Alain Désilets says: If Tiki used an object oriented architecture, I could see this work.
4:13:50 PM pjalajas says: also, I hope to work with sylvieg to put some good TRACKER plugin example images into the tiki docs so that folks see their full power in action
4:14:12 PM Alain Désilets says: There would be some base class "list of items", which could be used to implement both the Tracker list and the Product list.
4:15:12 PM Alain Désilets says: Both subclasses would override appropriate behaviour, so that the TrackerList would look and behanve like a list of tracker items, and the ProductsList class would look and behave like a list of products.
4:15:25 PM Nelson Ko says: Alain: I think the magic will happen at the level of the TRACKER plugins, which embed the tracker contents within a wiki page, hence showing it in the context of the wiki page based on parameters submitted
4:15:35 PM Alain Désilets says: But I'm not sure it will be that easy to customize a list of trackers to make it appear like a list of products.
4:15:51 PM sylvie-g says: Alain - not pb
4:15:55 PM Nelson Ko says: it is possible to write tracker plugins in an object oriented way
4:16:05 PM Alain Désilets says: Nelson, I don't know the Tiki arthitecture well enough to say. I'll take your word and Sylvie's on this.
4:16:11 PM Nelson Ko says: actually that may help - to have "sub-class" tracker plugins
4:16:19 PM Nelson Ko says: so to speak
4:16:26 PM Alain Désilets says: You mean there are actual classes in Tiki 😉?
4:16:37 PM sylvie-g says: Alain http://iscpif.csregistry.org/tiki-index.php?page=publications is a TRACKERFILTER only
4:17:28 PM sylvie-g says: and a link and a header at the top
4:17:34 PM Alain Désilets says: I take it all back! This page certainly doesn't look like a tracker.
4:18:01 PM Alain Désilets says: Gotta go now.
4:19:14 PM Marc Laporte says: thanks Alain!
4:29:30 PM Marc Laporte says: If we don't use Paypal (in b2b scenario, or free event), we'd be without an order log. So maybe it's a bit more than a nice to have.
4:31:29 PM Marc Laporte is now on : http://www.last.fm/group/Tikiwiki/members
4:57:30 PM Etuate says: hi guys i just got this chat today
4:57:35 PM Etuate says: in the morning
5:00:13 PM Franck Martin says: me too 😉
5:00:17 PM *** André Proulx left this chat ***
5:00:37 PM Franck Martin says: don't forget google pay system
5:00:40 PM Etuate says: looks like a very important discussion
5:01:35 PM Franck Martin says: we need plugins to put in the wiki that put stuff in the cart
5:03:28 PM Marc Laporte says: This is what I have in mind for lightweight: http://www.thewatchmakerproject.com/cart-demo/index.php
5:04:07 PM Marc Laporte says: simple code: http://www.thewatchmakerproject.com/journal/276/building-a-simple-php-shopping-cart
5:13:15 PM dumarestca says: thank you
5:14:42 PM Etuate says: good stuff
5:16:01 PM dumarestca says: I agree that it doesn't make sense to redo from scratch - just find the best open source one out there in PHP and MYsql and integrate it
5:17:13 PM Etuate says: i think the minor problem is understanding the code to find out if it does not cause harm to the current security of tikiwiki
5:20:21 PM djamel202 says: mmm very interesting
[CODE}
See also
Alias
- Cart or Carts
- Shopping Carts
- Commerce, E-Commerce, or ECommerce