Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Listings Manager Add-ons:
Add to Favorites

 

First page Previous page 1 2 Next page Last page  View All


Dataferret
User

Aug 19, 2003, 6:35 AM

Post #1 of 50 (20677 views)
Shortcut
Add to Favorites Can't Post

I read in another post there is a script which allows users to add a listing to a favorites cart (like a shopping cart), but the download for the favorites.cgi script was not in the thread - even though the post said it was.

Whilst I understand the current favorites.cgi script may not be totally bug-free, it would certainly give me a starting code base - since my client has asked for this feature and I would need to code it from scratch otherwise.

Is there any chance you could post the download here so I can look at it and maybe test it out?

Thanks in advance

DataFerret


Benjamin
Staff


Aug 19, 2003, 11:51 AM

Post #2 of 50 (20668 views)
Shortcut
Re: [Dataferret] Add to Favorites [In reply to] Can't Post

Hi DataFerret,

Thanks for your post - it was a good reminder! I seem to keep putting the favourites script on the back burners... I just had word with our Project Manager, and what I'll do is give it a good look over today or tomorrow then post it here. I'll shoot for the end of the day. :-)
Ben
interactivetools.com


dedbob
User

Aug 20, 2003, 12:04 PM

Post #3 of 50 (20642 views)
Shortcut
Re: [Benjamin] Add to Favorites [In reply to] Can't Post

Would this script by any chance, be anything close to what we were discussing in this thread?:

http://www.interactivetools.com/iforum/Products_C2/Realty_Manager_%26_Auto_Manager_F3/Parking_Lot_P13534/

If so... PLEASE post it as soon as possible!

Thanks
Scott

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!

(This post was edited by dedbob on Aug 20, 2003, 12:06 PM)


leeshields
User

Aug 20, 2003, 1:49 PM

Post #4 of 50 (20630 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

If you would like to see it in action, just to tease you

http://www.villassist.com/varm/listings/index.html

Click a property detail, then select add to favourites

It took a bit of massaging to get working, i had to edit a little bit of the cgi script but nothing too tricky

And its still under review visually etc

Seems to work OK though

Lee


PS. please dont send in a form (unless you need a house in spain), a big belgian fella might call you!
__

Lee Shields
Apogee Technology
John R Hornsby
Adelante Properties
Villassist
Paul Withey Estate Agents


(This post was edited by leeshields on Aug 20, 2003, 1:52 PM)


Benjamin
Staff


Aug 20, 2003, 1:52 PM

Post #5 of 50 (20629 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

Hi guys,

Actually, Scott, that was a different script talked about in that post - that seems to be some sort of PHP / MySQL script, whereas this one is written in Perl.

DataFerret: as you probably know, the initial version of the favorites.cgi add on was a custom job for Maurice, one of our clients. I've taken a look through the code and it runs fine, but it was very much written as a custom solution, not intended for widespread use. So, bear in mind that the attached code "is what it is".

I'll post all updates to the script in the forums.
Ben
interactivetools.com
Attachments: favorites_manager.zip (18.5 KB)


dedbob
User

Aug 20, 2003, 2:02 PM

Post #6 of 50 (20623 views)
Shortcut
Re: [Benjamin] Add to Favorites [In reply to] Can't Post

ACK!! This is exactly what I was looking for (minus the feedback form on the template)!

Thanks Lee for showing it to me in action... I'll add this to my site immediately! (Also.. thanks for the warning Tongue )

Thanks!!!
Scott

PS.
Thanks Ben!

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!

(This post was edited by dedbob on Aug 20, 2003, 2:17 PM)


dedbob
User

Aug 20, 2003, 6:45 PM

Post #7 of 50 (20606 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

Ok.. I know this is a custom script and not supported... but has anyone else installed this (other than Lee)? Lee, maybe you can respond if you have any information that could help.

I'm getting nothing but internal server error no matter what I do. I've set permissions, made sure I uploaded in ASCII, checked the path to perl, sendmail, checked all the paths to templates etc... still no workie. I could swear I've done everything right... I install scripts all the time and rarely have a problem that I can't figure out.

If I run it from a shell prompt, I get this error:
DB_Lock : Can't create filelock : File exists

So I search the server... no filelocks to be found.

Anyone have any ideas?

Thanks
Scott

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!

(This post was edited by dedbob on Aug 20, 2003, 6:48 PM)


leeshields
User

Aug 21, 2003, 5:10 AM

Post #8 of 50 (20596 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

You're enjoying the bit I spent ages with

I think the problem is that RM creates a filelock to prevent database corruption or something like that

Favourites also uses one with the same name, i think it conflicts

I opened up the favourites.cgi file, and changed the filelock names, as here:-

my %FavListingDB = (
"datafile" => "fav-listing.dat",
"filelock" => "filelockfav.lock",
"fields" => [qw(num usernum type id name url listdata1 listdata2 listdata3 listdata4 listdata5)],
"backup" => "disabled",
"cgiext" => ".cgi"
);

my %FavUserDB = (
"datafile" => "fav-users.dat",
"filelock" => "filelockfav.lock",
"fields" => [qw(num cookie_id created accessed expires userdata1 userdata2 userdata3 userdata4 userdata5)],
"backup" => "disabled",
"cgiext" => ".cgi"
);

If you aren't using the form you shouldn't need to alter anything else, if you do but chage it, you need to remove the sendmail field check part in the cgi

Also remember to target the window name in your html, or you will get windows all over, you also might want to put some java 'bring window to front' code, so as they add a favourite it pops to the front.

Have fun

Lee
__

Lee Shields
Apogee Technology
John R Hornsby
Adelante Properties
Villassist
Paul Withey Estate Agents


dedbob
User

Aug 21, 2003, 5:28 AM

Post #9 of 50 (20595 views)
Shortcut
Re: [leeshields] Add to Favorites [In reply to] Can't Post

Wouldn't you know... a 2 second fix. I just changed the name of the lockfile like you said and it worked immediately.

Ben... you may want to update that script with a new lockfile name... it could save many people hours of frustration Wink

Thanks Lee!!!
Scott

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!

(This post was edited by dedbob on Aug 21, 2003, 5:32 AM)


Dataferret
User

Aug 22, 2003, 7:41 AM

Post #10 of 50 (20563 views)
Shortcut
Re: [Benjamin] Add to Favorites [In reply to] Can't Post

Hi Ben

Thanks for posting the script. I will look through it and try to code up a full add-on app for RM which I will then post back to you so others can download it.

I have been successful creating a download manager which is a standalone application (add-on), which acts like a shopping cart with PayPal integration. Currently it does not interact with RM at all because it uses a mysql database to store the user info, password, downloads and images so I am hopeful this script you posted will provide the solution to interact with the RM database.

One really neat feature of my Download Manager is that once a user clicks to purchase the download and has paid via PayPal, they are sent a to URL which is dynamically generated and exists only for the time the download takes place - to avoid users trying to leech files or hack the downloads section without paying.

I have also created a basic "website wrapper" for RM sites which uses the same templatecell system but stores the links in the mysql database. I still have to create a way to embed the content without using SSI, but it should be helpful for lots of people. I also need to create some kind of GUI for the admin to interact with the mysql database easily.

These are pet projects I set myself in my quest to learn Perl and I will make them available if I ever finish them.

Meantime, keep up the good work :)

Cheers

DF


Deven
User

Aug 27, 2003, 3:54 PM

Post #11 of 50 (20507 views)
Shortcut
Re: [Dataferret] Add to Favorites [In reply to] Can't Post

Just want to add my 2 cents worth. The Favorites script is great. I ran into the same problem with the filelock name, however Ben was great at helping me with this. This is just what serveral of my customers need. As far as customizing, I know how to pass listing fields, but does anyone know how to add additional form fields, i.e.- Address, City, State and have the script pass these as well to the fav_email.txt ? I saw the $userdata1$ - $userdata5$ fields, but not sure how to add these to the fav_view.html form and get them to pass this data?



<p>Your contact information:
<form name="f1" method="get" action="$cgiurl$">
<p><input type="text" name="name" size="20"> Name </p>
<p><input type="text" name="company" size="20"> Company </p>
<p><input type="text" name="telephone" size="20"> Phone </p>
<p><input type="text" name="email" size="20"> Email </p>
<input type="hidden" name="do" value="mail">
<input type="hidden" name="usernum" value="$usernum$">
<p><input type="submit" name="to_friend" value="Send to a friend">
<input type="text" name="to" value="" size="20"> Friend's email adress
<p><input type="submit" name="to_admin" value="Send to Administrator"></p>
</form>




This is the current form. How can I add additional fields and pass these to my fav_email?

I realize this isn't intended for public release, but any help would be appreciated. Thanks for everyone's support............Deven


Deven
User

Aug 30, 2003, 1:32 PM

Post #12 of 50 (20459 views)
Shortcut
Re: [Deven] Add to Favorites [In reply to] Can't Post

Thought I would post this for others looking to do the same. If you want to add additional fields that the customer fills to be sent in the Email you can add additional lines just below the ###Send Mail comment in "favorites.cgi" Here's an example that works for me.



This adds an address field to pass with error checking, i.e.-field requires an entry.

(!$in{'address'}) { $error .= "Your Address<BR>\n"; }




This adds the field without checking for whether it's populated or not.

if (!$in{'address'}) {; }





Be sure to add your fields to your form...i.e.:

<p><input type="text" name="2_address" size="20"> Address </p>



Have fun, DevenSmile



dedbob
User

Aug 30, 2003, 1:35 PM

Post #13 of 50 (20458 views)
Shortcut
Re: [Deven] Add to Favorites [In reply to] Can't Post

Not a problem to do this... all you have to do is go down to the email portion of the favorites.cgi script and add a line like this:

Line 278 already in the script:
if (!$in{'telephone'}) { $error .= "Telephone<BR>\n"; }

Insert a line (the field you are wanting to add) just below it like this:
if (!$in{'bob'}) { $error .= "bob<BR>\n";


The next line should be this: (already in the script)
if ($in{'to_admin'}) {

So totall, the 3 lines should look like this:
if (!$in{'telephone'}) { $error .= "Telephone<BR>\n"; }
if (!$in{'bob'}) { $error .= "bob<BR>\n"; }
if ($in{'to_admin'}) {

Then.. all you have to do is add that field to your fav_view.html file like this:
<p><input type="text" name="bob"> bob </p>

When you send the form, it will send you the bob field Smile . Of course you won't use "bob", you'll insert your proper field name... I only used "bob" as an example.

If this doesn't help to get it working, let me know and I'll do what I can to help you out. I have this working as a test on my collector cars site. You can check it if you want:
http://www.collectorcarsforsale.com/collectorcars/listings/bob.html . This page doesn't call any of the actual fields from the database because I don't want anyone actually trying to use it and think it's broken. I only added this for testing purposes.

I added this feature to my Corvette site without the email portion of the script, and it looks pretty darn slick! I have it showing the photos per vehicle in a popup window and everything. This is a fantastic addition to my site (imho). Check it out if you want (use the link in my signature).

Thanks!
Scott

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!


dedbob
User

Aug 30, 2003, 1:37 PM

Post #14 of 50 (20456 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

HAHA we were posting the reply at the same time Tongue

Oh well.. maybe the extra detail can help someone.

Scott

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!


Deven
User

Aug 30, 2003, 1:46 PM

Post #15 of 50 (20454 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

Thanks Scott,

I must have posted right before yours. We are getting ready to take our site "live". It's a Kia Dealership in Ohio. When the customer finds the Auto they want, we have a button for an online quote which will take them to the form page, where the Model, Type, Year, and Stock # of the car will be right there in front of them. They Just fill out the form included with the Favorites script (motified to look like our site of course) and hit the submit button. A salesperson gets the email with the customer's info and the car they want, and is quoted an "Internet Price" within 24 hours!

Since putting this together, I have 3 Realtor sites running RM that I plan on adding this script to. I believe it's a great add-on that IT should incorporate in these programs. Thanks for the help.


anr
Novice

Dec 7, 2003, 8:01 PM

Post #16 of 50 (19961 views)
Shortcut
Re: [Deven] Add to Favorites [In reply to] Can't Post

So I am looking at this code, and mind you I do not have the software as I am still evaluating its usability for my needs. Anyway, I notice in the favorite code there is a user login. What exactly does this encompas? Is this strictly through a cookie, or could someone login with their number from different computers and retrieve the same set of favorites?

Also, what happens when a listing is deleted from the database, is it deleted from the favorites?

Thanks!


Deven
User

Dec 8, 2003, 9:46 AM

Post #17 of 50 (19943 views)
Shortcut
Re: [anr] Add to Favorites [In reply to] Can't Post

Hi Anr,

We added this script as a way a customer can click a button to get more information. With this script, when they click the "More Info" or "Favorites" button, it opens a new form page with the listing fields we wanted already attached. Now the customer just fills in their contact information and hits the submit button and the page is sent to our sales dept via email. In the past we had to have the customer fill in the listing or stock #, advertised price, etc.. This script will parse this info for you. I guess someone could use it as a shopping cart, but it would require additional coding for this fuctionality. You would probably be better to find a seperate shopping cart program (AgoraCart.com is free and easy to set up)As far as a login, it's not needed as I believe it uses the "get" method and passes the info via the URL. Hope this helps. Smile Deven


Deven
User

Dec 8, 2003, 9:56 AM

Post #18 of 50 (19941 views)
Shortcut
Re: [anr] Add to Favorites [In reply to] Can't Post

As far as the deletion of the listing, when our sales gets the email, the link to the listing is included in the email. If someone would delete the listing, then the link would be dead or replaced by a new listing. In order to prevent these kind of problems, we include the stock# and MLS# in our email to our sales dept, so even if the listing was somehow deleted, or our site was down, we have enough information to contact our customer.


davo
Novice

Feb 29, 2004, 4:24 PM

Post #19 of 50 (19417 views)
Shortcut
Re: [Deven] Add to Favorites [In reply to] Can't Post

Hi,

I have been working on the favorites script and continue to receive an "500 Internal Server Error" message after my install.

I have installed my files on my server as follows,

My favorites.cgi and fav-db.cgi files are stored in the directory:

cgi-bin/listman/exec/

Meanwhile my fav_email.txt, fav_thankyou.html and fav_view.html files are stored in the directory:

cgi-bin/listman/templates/_auto/

I have followed the advice given in the IT forum eg.changing filelock name, as well as checking file permissions, paths to perl, sendmail, etc...

I think that the problems may be due to security restrictions on my server...i.e I can't read files in the cgi-bin in my browser. However after shifting my templates outside of the cgi-bin, the error remains.

Do anyone have ideas where I may be going wrong?



Deven
User

Feb 29, 2004, 6:13 PM

Post #20 of 50 (19410 views)
Shortcut
Re: [davo] Add to Favorites [In reply to] Can't Post

Hi Davo,

I just checked my program and it appears my file locations are the same as yours. Make sure you have your permissions (CHMOD) set to 755 on these 2 files:

fav-db.cgi

favorites.cgi

If they are ok, you might want to summit a trouble ticket to IT and let them have a look. Good luck. I hope you get it working. It's a nice addition to Listing Manager.

Deven.


dedbob
User

Mar 1, 2004, 1:30 AM

Post #21 of 50 (19374 views)
Shortcut
Re: [davo] Add to Favorites [In reply to] Can't Post

AH! this jar'd my memory. My old hosting company did not allow me to use the $BIN function because it required a specific perl function/module that was not allowed/on the server. This is what I changed to make it work:

Change this line:
use FindBin qw($Bin); # current directory
to:
#use FindBin qw($Bin); # current directory
(you're basically commenting out that line)


Then change this line:
$Global{'cgidir'} = "$Bin";
to point to the absolute path of your exec directory. Here is mine:
$Global{'cgidir'} = "/home/corvette/public_html/cgi-bin/lmanager/exec/";


Here is my entire section so that you can compare it to yours:
#use strict;
#use vars qw(%Global %setup %ListingDB %UserDB %SetupDB %TemplateCell %in %out $admin);
#use FindBin qw($Bin); # current directory


$Global{'progVer'} = "1.0";
$Global{'cgidir'} = "/home/corvette/public_html/cgi-bin/lmanager/exec/";
$Global{'datadir'} = "../data"; # directory of database files (relative to cgidir)
$Global{'templatedir'} = "../templates/_auto"; # directory of templates (relative to cgidir)
$Global{'cgiurl'} = "favorites.cgi"; # name of this script


As far as I can remember, this mod only has to be done in the favorites.cgi file and not the fav-db.cgi file.

10 bucks says it will work.

Thanks!
Scott


Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!

(This post was edited by dedbob on Mar 1, 2004, 1:35 AM)


davo
Novice

Mar 1, 2004, 6:19 AM

Post #22 of 50 (19360 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

Thanks for your feedback Scott and Deven.

You are one fantastic guy Scott!

Your instructions pointed me in the right direction and I
was finally able to get the script working.

In my particular case I started of by changing the line:

$Global{'cgidir'} = "$Bin";

to point to the absolute path of my exec directory:

i.e $Global{'cgidir'} = "/home/webteico/public_html/cgi-bin/listman/exec";


*Important Note For Other Users*
---------------------------------------------------------

In order for the script to work I also had to change line 57 of the code to reflect this change:

So in my particular case, instead of the line:

require "$Bin/fav-db.cgi"; # load database library

I have in its place the line:

require "/home/webteico/public_html/cgi-bin/listman/exec/fav-db.cgi"; # load database library

---------------------------------------------------------

Cheers,
Tevita


(This post was edited by davo on Mar 1, 2004, 7:16 AM)


Jimbob
User

Mar 16, 2004, 6:21 AM

Post #23 of 50 (19183 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

Hey Scott

Love what you've done to your site - very, very impressive.

I'm currently adding the favourites script to a client site I'm working on and am trying to implement it in the same way you've done (having thumbnail image show up etc), but can't seem to get the image url to parse properly.

The code from the 'add to favourites' page is this:

<a href="javascript:popupFavourites('/listman/exec/favorites.cgi?do=add&type=rm&id=$listing_num$&name=$lfield1_ue$&url=$listing_url$/$listing_file$&listdata1=$lfield5_ue$&listdata2=$lfield25_ue$&listdata3=$lfield30_ue$&listdata4=$thumbnail$')">Add $lfield1$ to your notebook</a>

All works apart from the thumbnail portion.

The code I'm using on fav_view.html is this:

<!-- templatecell : entry -->
<tr>
<td width="110" align="left"><img src="/listman/listings/images/$listdata4$" width="100" heigth="75" border="0" class="pic" alt="$name$"></td>
<td align="left"><a href="$url$" target="_blank">$name$</a><br />
<b>Price:</b> $listdata1$<br />
<b>Region:</b> $listdata2$<br />
<b>MFH ref:</b> $listdata3$<br />
<a href="$cgiurl$?do=delete&listnum=$num$">[remove]</a></td>
</tr>
<!-- /templatecell : entry -->

Any ideas what I'm doing wrong?

Any help would be greatly appreciated!

Jim Smile
--
My-French-House.com
Selling French property to the english speaking world.


dedbob
User

Mar 16, 2004, 6:58 PM

Post #24 of 50 (19162 views)
Shortcut
Re: [Jimbob] Add to Favorites [In reply to] Can't Post

Thanks for the compliments on my site Smile

Getting the thumbnail to work was not as easy as I had originally thought so what I had to do was hard code the link to the actual thumbnail itself:

<a href="http://www.corvettetraderonline.com/cgi-bin/lmanager/exec/favorites.cgi?do=add&type=rm&id=$listing_num$&name=$lfield10_ue$%20$lfield1_ue$&url=$listing_url$/$listing_file$&listdata1=$lfield65$&listdata2=$lfield11$&listdata3=$listing_num$_1_t.jpg" target="favorites" onClick="MM_openBrWindow('','favorites','scrollbars=yes,resizable=yes,width=500,height=400')"><b>Add To Favorites</b></a>

$listing_num$_1_t.jpg will automatically show the first thumbnail that is posted with the ad. The only problem that I have with this is if there is no image posted, then there will of course, be a broken image in the favorites list. Because of this, I had to make a default image and if someone doesn't post one, I post the default one.

Then for the fav_view.html, I linked it like this:
<a href="$url$" target="_blank"><img src="http://www.corvettetraderonline.com/corvettes/listings/images/$listdata3$" width="100" border="0"></a>

Hope this helps.

Thanks,
Scott

Need ImageMagick? GD.pm? You need to GetStacked!
Listings Manager friendly Cheap Web Hosting only $5.95 a month!

(This post was edited by dedbob on Mar 16, 2004, 7:00 PM)


Jimbob
User

Mar 18, 2004, 2:16 AM

Post #25 of 50 (19092 views)
Shortcut
Re: [dedbob] Add to Favorites [In reply to] Can't Post

Thanks a lot Scott! I've got it working now.

If anyone wants to have a look at my customisation of Realty Manager, please have a look at http://www.my-french-house.com/search/

Cheers

Jim
--
My-French-House.com
Selling French property to the english speaking world.

First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4