I've just had an idea for another website I'm developing to integrate gallery with it's ordering system.
This site features a lot of photos of products (suprise!) and I'd like to incorporate gallery and the cart module for the browsing and purchasing of items.
I've tinkered with the cart in G2 and it doesn't seem that I can provide a check out URL, or prices for photos. I'm assuming this is still under development, but is the end use of this cart module to be able to integrate with a site like 2checkout or paypal?
Thanks,
Ryan
Posts: 239
The cart module is a framework. A plugin will decide how it functions. We don't currently offer one yet, but someone in the forums has started a paypal one. That might be of use to you.
Posts: 33
instead of having another cart module framework, wouldn't it be possible to integrate some existing cart framework, that already has lots of gateways, to g2 ?
Posts: 8601
that's a cool idea.. a new module to relay 'add-to-cart' requests to some other system? let's see it!
Posts: 9
This sounds like a great idea, and very much like what I am after as well.
A way to specify a url to pass the values to so when someone adds an
item to the cart, it will pass the correct values to the carts page...
and from there on in, the cart can handle the rest.
John
Posts: 2
What is the effort estimate to inegrate a pre-existing shopping cart module like Zen cart ??
Posts: 8601
it's easy to create a G2 module that adds an "add to cart" command for each item that calls some php code.. you can then load up whatever details you need about the selected G2 item and pass that off to Zen cart, then redirect to a view cart page.
if you want to integrate the Zen cart so it fits better in G2 that will take some additional work....
Posts: 9
Easy for harder for others to create a module.
I'm looking into doing exactly what you described, writing a module for a
3rd party cart to add an 'add to cart' command to each item/album which
can then be passed on to the shopping cart.
I am having some trouble finding where to start...
I've looked through the Development Docs, I'm still a bit confused...
does any one have a Gallery API reference laying around somewhere
that I could use ?
Thanks,
John
Posts: 8601
if you found the dev docs in Wiki you'll see an API Documentation link.. click GalleryCore package and then GalleryCoreApi and GalleryModule files will be of most interest. there's also a g2 dev starter kit link there.
but here's why it's easy.. make your own directory under modules and copy modules/cart/module.inc there.. change the classname and id and you've got an installable module that does the basic interaction with G2 that you'll need!
- "add to cart" link for items
- system content block to show some info about cart contents in sidebar
- event handler so if a gallery item is deleted you can remove it from all carts
Now you just need to change those methods (getItemLinks, loadSystemContent, handleEvent) to work with the cart system you'd like to use.
AussieJohn, please start a new topic in the G2 dev forum and we'll continue to provide assistance to get you going...