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

MyFaves to basic shopping cart?

Quote Reply
MyFaves to basic shopping cart?
 
Hi Andy,

Im looking into the idea of using your MyFaves Plugin as a basic shopping cart.

Is it possible write a Global that's called from the myfaves_list.html template?

So far all Im looking to add to the MyFaves.cgi page is a way of looping through the faves_list for showing products/links and also showing pricing info separately from those products (and global to calculate the total price).

What do you think?



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Quote Reply
Re: [Chas-a] MyFaves to basic shopping cart? In reply to
I don't see why it wouldn't be possible. You would need to use the 'SQL' version though, so it would know which links to get prices etc for.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MyFaves to basic shopping cart? In reply to
That's a shame, I feel any obstacle you place in front of a buyer (like having to register) before they enter their CC details will block some sales. Is there no way you can think of to use the link id's (idnumber1%20idnumber2 etc) in the cookie to display duplicate results in a different format eg. Product Link 1 Cost: $1.00 Availability: ships in 24 hours Rating: 5/5 Product Link 2 Cost: $1.50 Availability: ships in 24 hours Rating: 4/5 Item 1: $1.00 Item 2: $1.50 Total: $2.50 If not could you suggest a starting point for writing a Global that can create loop2 using MySQL with MyFaves? thanks fella, its appreciated :)


Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Last edited by:

Chas-a: Feb 10, 2004, 10:31 AM
Quote Reply
Re: [Chas-a] MyFaves to basic shopping cart? In reply to
Actually, thinking about it, you could get away with the cookie version. You could just grab the ID's, work out their prices, and return it on myfaves.cgi. I'm not sure where your knowledge of LinksSQL ends, but if you need this global/mod written, please let me know. It shouldn't be too hard :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] MyFaves to basic shopping cart? In reply to
Using the cookie's np, got it working myself :)

here's the sub for anyone's who's interested:

sub {
# Show pricing info myfaves_price Sub
my ($sth, $db, $ID, $price, $total);
my $chop = $IN->cookie('IDList');
my @sliced = split(/ /, $chop);
my $output=qq~~;
foreach (@sliced) {
$db = $DB->table('Links');
$sth = $db->select ( { ID => $_ }, ['OurPrice']);
my ($price) = $sth->fetchrow_array;
$total += $price;
$output .= qq~$price<br />~;
}
$output .= qq~\$$total~;
return $output;
}



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Quote Reply
Re: [Chas-a] MyFaves to basic shopping cart? In reply to
Glad to hear it :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!