You can use base in combination with xslt or usercontrols.
Base currently has a small problem that the current context is not preserved, so that option is likely out for now. I worked around the base issue by using templates to process and return the cart data.
I have a series of generic xslt extensions (static class methods) that I use to save the cart server-side in an xml file. I then capture a couple details (nodeId and quantity), and potentially modifier data (color, size, etc). I then return the data to the xslt to render a cart.
An example is available at http://skikey.com. I utilize jQuery Forms plugin to intercept the form submissions and display the cart ajax style. The whole thing fails-over to standard form actions if js is disabled.
If interested, I will share the base classes and xslt for the cart.
i have used simplecart.js on a couple different projects recently.. it is pretty fun to work with... in my umbraco set up... i have product nodes, modifier nodes [think size, color, etc.] and the propeties that can be found under them [think small, med, large, blue, red, etc.] i then use xslt to render options, following the simplecart.js 'api' [not really an api, but not sure what else to call it]
then you can use paypal or google checkout to handle the transactions... cart is built on your site, then info is passed to the checkout page in paypal or google...
you can see an example of simplecart.js with umbraco here...
umbraco tables -> would not advise that, doesn't make sense, use your own custom tables to keep track of shopping cart items .Or as Bob suggest, you could use simplecart.js which stores shopping cart items in cookies, and uses some http calls to do the actual checkout to a payment provider such as Paypal or Google checkout.
If I where to program something like this again, I would construct a cart in XML and then store it in a cookie between pageviews/sessions. And then have a bunch of XSLT macros to do all the basket handling, viewing, processing etc.
I'm a bit of an "XSLT purist", don't really like to put stuff in extensions, user controls and such :-)
It is also usually SLOWER to save the cart in the db as it requires a round-trip to the database server. Most (if not all) of the umbraco frontend doesn't require access to the database, so it would be a shame to slow down the site with this.
In any way you need to store something in a cookie, if nothing else then the ID of the cart in the DB, as you want the user to keep the basket between sessions.
I would to create a very simple paypal shopping cart to use in umbraco v4.0.4.2
@bob baty-barr: I'm really interested to know how you used the simplecart.js to create the cart in your site. Can you help me? Can you send me an example of the code you used and where (Template, macro/xslt)?
shopping cart in umbraco
hello folks.,
i am planning to do shopping cart of my own.. i dont want addon packages..
how to begin with shopping cart in umbraco?what are the settings to be set initially?
thanks..
Are you planning to accept credit card payments? Google for "PCI DSS" and "PA DSS" first!
Hi ak,
There are a couple of ways to go about creating a shopping cart.
i have used simplecart.js on a couple different projects recently.. it is pretty fun to work with... in my umbraco set up... i have product nodes, modifier nodes [think size, color, etc.] and the propeties that can be found under them [think small, med, large, blue, red, etc.] i then use xslt to render options, following the simplecart.js 'api' [not really an api, but not sure what else to call it]
then you can use paypal or google checkout to handle the transactions... cart is built on your site, then info is passed to the checkout page in paypal or google...
you can see an example of simplecart.js with umbraco here...
http://www.manualnumbercruncher.com/shopping-cart
hope you find these posts helpful.
thanks for your reply folks.. what umbraco tables to be used here.. i wish to do using usercontrols and xslt
Hi Kevin,
umbraco tables -> would not advise that, doesn't make sense, use your own custom tables to keep track of shopping cart items .Or as Bob suggest, you could use simplecart.js which stores shopping cart items in cookies, and uses some http calls to do the actual checkout to a payment provider such as Paypal or Google checkout.
Cheers,
/Dirk
"If interested, I will share the base classes and xslt for the cart."
@Casey: interesting! Could you share your idea?
@ Biagio Parualo.. thanks.. get me your mail-id. i will contact you
Hi, my email is [email protected] ...thank you very much...
PS: I'm not able to update forum profile because post give a server error.
I reply to my post.
For Casey: Could you share your base classes and xslt?
Thank you
I did a session on this topic at Codegarden 09:
http://our.umbraco.org/wiki/codegarden-2009/codegarden09-sessions/back-room/simple-webshop-in-30-minutes
If I where to program something like this again, I would construct a cart in XML and then store it in a cookie between pageviews/sessions. And then have a bunch of XSLT macros to do all the basket handling, viewing, processing etc.
I'm a bit of an "XSLT purist", don't really like to put stuff in extensions, user controls and such :-)
/SoerenS
But may be possible to save cart in db...
It is also usually SLOWER to save the cart in the db as it requires a round-trip to the database server. Most (if not all) of the umbraco frontend doesn't require access to the database, so it would be a shame to slow down the site with this.
In any way you need to store something in a cookie, if nothing else then the ID of the cart in the DB, as you want the user to keep the basket between sessions.
/SoerenS
how to use xslt here in shopping cart?
Hi to all,
I would to create a very simple paypal shopping cart to use in umbraco v4.0.4.2
@bob baty-barr: I'm really interested to know how you used the simplecart.js to create the cart in your site. Can you help me?
Can you send me an example of the code you used and where (Template, macro/xslt)?
Thank you in advance for your help
Adriano
Hi kevin.
are u from india?
is working on a reply...