Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 2 votes

[Contribution] Leapfrog - Dynamic Visitor Tracking


181 replies to this topic

#21 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 10:47

View Postacidvertigo, on Feb 16 2007, 11:28 PM, said:

No, i haven't But my images folder is different from conventional installation

If you have your images folder in a different location to the default installation then follow this procedure.

1. Open 'catalog\admin\includes\functions\leapfrog.php.

2. On line 90 find:

$thumbUrl = DIR_WS_CATALOG . DIR_WS_IMAGES . "/" . $item->products_image;

This normal resolves to something like /www/catalog/images/product_image.jpg. You will need to change this line to point to your images folder.

#22 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 11:15

View PostSandbag, on Feb 17 2007, 11:47 AM, said:

If you have your images folder in a different location to the default installation then follow this procedure.

1. Open 'catalog\admin\includes\functions\leapfrog.php.

2. On line 90 find:

$thumbUrl = DIR_WS_CATALOG . DIR_WS_IMAGES . "/" . $item->products_image;

This normal resolves to something like /www/catalog/images/product_image.jpg. You will need to change this line to point to your images folder.

Yes, i tried it. But nothing. IN all the other contribution that i have DIR_WS_IMAGES is set correctly. :'(

#23 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 11:44

View Postacidvertigo, on Feb 17 2007, 11:15 AM, said:

Yes, i tried it. But nothing. IN all the other contribution that i have DIR_WS_IMAGES is set correctly. :'(

Please can you try this to give me more information. Open your browser and navigate to:

http://www.yourdomain.com/catalog/admin/leapfrog_feed.php?action=newclicks&lastclick=1

When that page appears, view the HTML source. There you will see the XML data Leapfrog uses to animate visitors.

Look for a <thumburl></thumburl> tag and let me know what data string it contains. Some will be blank, but product info pages should contain the location of the image.

#24 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 16:25

View PostSandbag, on Feb 17 2007, 12:44 PM, said:

Please can you try this to give me more information. Open your browser and navigate to:

http://www.yourdomain.com/catalog/admin/leapfrog_feed.php?action=newclicks&lastclick=1

When that page appears, view the HTML source. There you will see the XML data Leapfrog uses to animate visitors.

Look for a <thumburl></thumburl> tag and let me know what data string it contains. Some will be blank, but product info pages should contain the location of the image.

no <thumburl> and no <page url>

But ok for <pagetitle><visitorsid><visitorsname><refererurl><sessionid><visitorname><clicktime><visitorip> :blink:

#25 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 16:29

View Postacidvertigo, on Feb 17 2007, 04:25 PM, said:

no <thumburl> and no <page url>

But ok for <pagetitle><visitorsid><visitorsname><refererurl><sessionid><visitorname><clicktime><visitorip> :blink:

What does your URL for a product page look like? Can you post it please.

#26 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 16:37

View PostSandbag, on Feb 17 2007, 05:29 PM, said:

What does your URL for a product page look like? Can you post it please.

http://www.mydomain.com/public/catalog/def...hp?cPath=27_666

#27 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 16:45

View Postacidvertigo, on Feb 17 2007, 04:37 PM, said:


Thanks. Now can you confirm that when you run the following query on your database you get a category title:

select categories_name from categories_description where categories_id = '27' and language_id = '1'

Replace language_id with the one you use in your store.

Also, when you say 'no <thumburl> and no <page url>' do you mean that the tag does not exist, or the data contained in the tag does not exist?

Edited by Sandbag, 17 February 2007, 16:50.


#28 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 16:49

View PostSandbag, on Feb 17 2007, 05:45 PM, said:

Thanks. Now can you confirm that when you run the following query on your database you get a category title:

select categories_name from categories_description where categories_id = '27' and language_id = '1'

Replace language_id with the one you use in your store.

It works

#29 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 16:58

View Postacidvertigo, on Feb 17 2007, 04:49 PM, said:

It works

Ok. It looks like the script cannot find the URL of the page you are on. To test this, create a blank PHP file and copy the following code into it:

<?php
  echo 'The URL is: ' . getenv('REQUEST_URI');
?>

Then save this file, and open it in a web browser. Do you get the page URL displayed?

#30 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 17:06

View PostSandbag, on Feb 17 2007, 05:58 PM, said:

Ok. It looks like the script cannot find the URL of the page you are on. To test this, create a blank PHP file and copy the following code into it:

<?php
  echo 'The URL is: ' . getenv('REQUEST_URI');
?>

Then save this file, and open it in a web browser. Do you get the page URL displayed?

Shows only "The Url is:" and nothing.

I think that REQUEST_URI doesn't work on IIS server

Edited by acidvertigo, 17 February 2007, 17:09.


#31 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 17:14

View Postacidvertigo, on Feb 17 2007, 05:06 PM, said:

Shows only "The Url is:" and nothing.

I think that REQUEST_URI doesn't work on IIS server

Ok this is the problem. Open 'catalog\includes\functions\leapfrog.php'. Goto line 57 and change:

$wo_last_page_url = addslashes(getenv('REQUEST_URI'));

to

$wo_last_page_url = addslashes(getenv('ORIG_PATH_INFO'));

I think that might work on IIS. Or else $_SERVER['ORIG_PATH_INFO'].

#32 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 17:33

View PostSandbag, on Feb 17 2007, 06:14 PM, said:

Ok this is the problem. Open 'catalog\includes\functions\leapfrog.php'. Goto line 57 and change:

$wo_last_page_url = addslashes(getenv('REQUEST_URI'));

to

$wo_last_page_url = addslashes(getenv('ORIG_PATH_INFO'));

I think that might work on IIS. Or else $_SERVER['ORIG_PATH_INFO'].

My server likes addslashes(getenv('PATH_INFO')); Leapfrog Says "Unable to connect to database"

The page are stored now in mysql database, but without cpath= etc etc.

With addslashes(getenv('ORIG_PATH_INFO')); nothing change

#33 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 17:48

And if i write

$wo_last_page_url = addslashes(getenv('QUERY_STRING'));

i have the cpath (all the query after ? )

How to unify with

$wo_last_page_url = addslashes(getenv('PATH_INFO'));

?

#34 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 17:57

$myurl = getenv('PATH_INFO') . getenv('QUERY_STRING');
$wo_last_page_url = addslashes($myurl);


#35 acidvertigo

  • Community Member
  • 132 posts
  • Real Name:Luca
  • Gender:Male
  • Location:Roma

Posted 17 February 2007, 18:22

View PostSandbag, on Feb 17 2007, 06:57 PM, said:

$myurl = getenv('PATH_INFO') . getenv('QUERY_STRING');
$wo_last_page_url = addslashes($myurl);

Ok now it works and leapfrog now looks wonderfull thank you very much.


p.s. When you come in italy i offer you a pizza

:thumbsup:

#36 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 18:28

View Postacidvertigo, on Feb 17 2007, 06:22 PM, said:

Ok now it works and leapfrog now looks wonderfull thank you very much.
p.s. When you come in italy i offer you a pizza

:thumbsup:

:lol: Finally we did it!

#37 cbx040

  • Community Member
  • 27 posts
  • Real Name:Simon
  • Location:Northamptonshire, UK

Posted 17 February 2007, 18:58

View Postcbx040, on Feb 17 2007, 12:06 AM, said:

Hi,
Thank you for this contribution.
I have uploaded the files successfully and the visits are recorded in the leapfrog table.
But when I want to display the leapfrog and after few moments I get a popup window which states

"Unable to connect to your store database"

The store is running on Freebsd with MYSQL and PHP4, any ideas where to start looking ?

Thanks,

Simon

With help mine is now working
There were two problems

1. Admin access with level contribution
I disabled admin access levels for the leapfrog_feed.php by changing the bottom of /admin/includes/application_top

 if (basename($PHP_SELF) != FILENAME_LOGIN && basename($PHP_SELF) != FILENAME_PASSWORD_FORGOTTEN && basename($PHP_SELF) != FILENAME_CURRENCIES && basename($PHP_SELF) != 'leapfrog_feed.php') { 
  tep_admin_check_login(); 
  }

2. The other problem was to do with my secure SSL
The original url was
https://server.secure.host.net/~user/admin/...g/leapfrog.html

once I changed it to

http://www.mysite.com/admin/leapfrog.php

it started working.
I changed the target url at line 63 of
/admin/leapfrog.php

<tr><td><a href="http://www.mysite.com/admin/includes/leapfrog/leapfrog.html" target="_blank"><?php echo TEXT_LAUNCH; ?></a></td></tr>

Thanks again for this great contribution.

Simon

#38 MarthaD

  • Community Member
  • 93 posts
  • Real Name:Martha Dinkwaller
  • Location:Onratio, Canada

Posted 17 February 2007, 21:21

I tried both the no images fixes on previous page with no louck. Am also curious how one can change the text in the flash file... I would prefer to name it "real Time tracking" instead of leap frog - no offense but for a client i would not like to explain "leapfrog"

#39 MarthaD

  • Community Member
  • 93 posts
  • Real Name:Martha Dinkwaller
  • Location:Onratio, Canada

Posted 17 February 2007, 21:32

Seems i cant edit me own post - so ignore the edit the wording part - got that LOL - just need an images fix for SEO urls and PHP 5....

#40 Sandbag

  • Community Member
  • 107 posts
  • Real Name:Ed
  • Gender:Male
  • Location:London, England

Posted 17 February 2007, 21:33

View PostMarthaD, on Feb 17 2007, 09:21 PM, said:

I tried both the no images fixes on previous page with no louck. Am also curious how one can change the text in the flash file... I would prefer to name it "real Time tracking" instead of leap frog - no offense but for a client i would not like to explain "leapfrog"

Can you try this please. Open your browser and navigate to:

http://www.yourdomain.com/catalog/admin/leapfrog_feed.php?action=newclicks&lastclick=1

When that page appears, view the HTML source. There you will see the XML data Leapfrog uses to animate visitors.

Look for a <thumburl>, and <pageurl> tag and let me know what data string it contains. Some will be blank, but product info pages should contain the location of the image. If that url does not match the actual location of the image then please post that aswell.

With regards to changing the title in the GUI, this would require you to edit the Flex code. Here's how to do it:

1. Open 'flex/Leapfrog.xml'.
2. Around line 106 you will see the code:

<mx:VBox width="80%">
  <mx:Label text="Leapfrog" color="#5e9aff" fontSize="32" fontWeight="bold" fontFamily="Arial"/>
  <mx:Label text="Real-time osCommerce visitor tracking" color="#808080" fontSize="16" fontWeight="bold" fontFamily="Arial"/>
</mx:VBox>

Change the 'text' attributes to say what you want it to.

3. Now you have to recompile the SWF. Instruction on how to do this can be found in the DEVELOPER_README.txt file.

If you need further help with this please PM me.