Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

ShoppingCart plugin

(Page 1 of 2)
> >
Quote Reply
ShoppingCart plugin
Im in the middle of a shopping cart plugin for Links SQL

It uses Link SQL authentication, ie customers wishing to use the cart must signup/login first, this is because the cart details are stored in the sql database.

It works off the links table so as long as you have a Price column, everything else is optional. eg you could have ID, Product, Description, Price, or even the Links SQl default fields as well as price, and the script will do all the work for you.

It uses a cart table to store product id's and user id's....product id's are just the id's of the records in the links table.

Price is obviously required for calculations, but you can use any other fields you want and can display this info on the cart summary page etc.

It will hopefully become clearer when I get the demo up.

This is a failrly big plugin so the price will be about $50.

There will be a admin backend also.

Last edited by:

RedRum: Feb 25, 2002, 8:26 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
For cart data you may want to use the existing session. You can do:

Code:
my $session_id = GT::CGI->param('s') || GT::CGI->cookie('s') || return;
my $session = new GT::Session::File (
directory => $CFG->{admin_root_path} . "/sessions",
id => $session_id
) || return;
$session->data ( $can_store_any_perl_structure );
my $data = $sesion->data;


Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ShoppingCart plugin In reply to
Oh cool. Thanks for the tip - that would be much better.

I didn't explain my first post very well either, regarding features, but I'll just get myself sorted after my latest computer mishap (had to format :( )....and I'll post more info.

Hope this doesn't tread on any toes. I hope GT weren't working on something like this.

Last edited by:

RedRum: Feb 25, 2002, 12:30 PM
Quote Reply
Re: [Alex] ShoppingCart plugin In reply to
Hmm I decided to stick with mysql as it is better for the admin backend which allows admin to review purchases and purge old purchases.
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Is anyone interested in this or not? Unsure

If so, I have the demo ready and a few questions :)

Last edited by:

RedRum: Feb 27, 2002, 8:53 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
I'm interested tell me were I can download and Test it !!!!!!


Thanks in Advance
Bye From Italy

Last edited by:

fabio: Feb 27, 2002, 9:13 AM
Quote Reply
Re: [fabio] ShoppingCart plugin In reply to
Im just about to set up a demo so you can get a good idea of how it works.

I'm just looking for ideas about the checkout page.

Currently you can enter the URL of your third party processor and when the user hits "Checkout >>" they will be sent to the secure payment URL - tags in the URL are substituted with the correct price/product etc..

However I'm wondering if anyone wants anything different?

Last edited by:

RedRum: Feb 27, 2002, 9:39 AM
Quote Reply
Re: [fabio] ShoppingCart plugin In reply to
Here is a demo:

http://www.wiredon.net/lsql/

It is just a default copy of Links SQL but it gives you the idea.

Last edited by:

RedRum: Feb 27, 2002, 10:40 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Oops, if you just experienced errors please try again....I had to restart mod_perl

Last edited by:

RedRum: Feb 27, 2002, 10:54 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Looks good! One thing I noticed is you can enter negative numbers in the quantity. This is often a way to try and sneak things pass the order entry person (the amount paid is lowered, and the order guy often misses it).

Also, I would let the change quantities persist, and not return to 1.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ShoppingCart plugin In reply to
Hi,

Thanks for spotting that.

About the quantities....I had trouble getting them to stay at their chosen value when someone goes back to browse - I couldn't think of a way to get them to stay as they were.

A tip would be good :)
Quote Reply
Re: [Alex] ShoppingCart plugin In reply to
The amount verification is fixed (it was there) but I was calling the wrong JS function resulting in a javascript error Blush
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
You want to make sure it's in the perl code as well, not just in Javascript. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] ShoppingCart plugin In reply to
Have you managed to bypass it?

Last edited by:

RedRum: Feb 27, 2002, 12:37 PM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Hmm slight error with the demo regarding the template compiler - back online soon.
Quote Reply
Re: [Alex] ShoppingCart plugin In reply to
Ok the demo is back online.

Alex:

Error checking is now in the perl code.

Last edited by:

RedRum: Feb 27, 2002, 3:02 PM
Quote Reply
Re: [fabio] ShoppingCart plugin In reply to
Ok, the plugin should be ready very soon (hopefully later today), well the first version at least.

It will be free to download and will give 7 days free use after which the time trial will expire and you will be required to pay the $50 license fee.

I'll post more info later today.

Last edited by:

RedRum: Feb 28, 2002, 2:38 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Some problems:

1) Blank screen in the "registered users" screen (Netscape 4.76 and 4.6) - <http://www.wiredon.net/cgi-bin/lsql/user.cgi>

2) Blank screen upon validating account (Netscape 4.76 and 4.6) - <http://www.wiredon.net/cgi-bin/lsql/user.cgi?validate=1>

3) More intuitive design elements (I didn't know what the red X did until I clicked on it to find that I deleted the item, may be a bit of client-side and server-side checking to confirm whether the person really wants to delete the item or not).

All in all, decent start, keep up the good work.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] ShoppingCart plugin In reply to
Points 1 and 2 .....not sure why - the templates are the default links sql templates. They've not been touched.

Last edited by:

RedRum: Feb 28, 2002, 10:54 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Attached is the first release of the plugin.

This is like an alpha slash beta release you may not want to use it on a live site, although it shouldn't cause any problems.

The installer does loads of tricky stuff so I need to get people to test it first.

I've installed and uninstalled about 100 times but weird things can happen on other servers.

Any feature requests or bug reports are welcome.

The plugin will expire after 7 days (I hope!) but I won't charge for this version as it is still not complete.

Don't bother clicking the "Purchases" link in the plugins menu :)

Last edited by:

RedRum: Feb 28, 2002, 11:56 AM
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Just installed it--works ok on a Cobalt RAQ, if that means anything. Great to be able to sign up users for Reviews 'n stuff when they buy my CD...

Wondering if you've taken a look at the Paypal Instant Payment Notification script https://www.paypal.com/...r?cmd=p/acc/ipn-info?--be great for me when I finally get around to charging for some soft content (ebooks)... probably others would like it too.

I've heard it's fairly simple... but, err, too new for me (have to see what 500 other people have done)...
Quote Reply
Re: [dmoynihan] ShoppingCart plugin In reply to
Oh cool.

Re IPN....good idea!....

You could add something like http://www.yoururl.com/cgi-bin/cart.cgi?do=verify

....as your success URL and then the plugin could do the verification.

I'll add that in.

What should happen if it is valid/invalid?.....redirect to a specified url or..?
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Well, first of all, thanks for the quick reply!

The part about the valid URL... either randomly generated, accessible only by user (your "mylinks" plug-in becomes "mylibrary" ...)--or maybe upon receiving authorization, the script digs up some place where the user can go to get the protected content, like outside the directory tree... am I making sense?

Something simple for an invalid redirect, like "transaction has not gone through"--or is pending, if they "e-checked" it--contact customer service... etc.
Quote Reply
Re: [RedRum] ShoppingCart plugin In reply to
Hi

Is it possible to make this work with Gossamer Mail

Dregs2
Quote Reply
Re: [dregs2] ShoppingCart plugin In reply to
Im sure it would be possible with some changes but I don't have GossamerMail unfortunately.
> >