acidvertigo Posted February 17, 2007 Posted February 17, 2007 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 Quote
Sandbag Posted February 17, 2007 Author Posted February 17, 2007 (edited) http://www.mydomain.com/public/catalog/def...hp?cPath=27_666 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 February 17, 2007 by Sandbag Quote Leapfrog - Dynamic Visitor Tracking
acidvertigo Posted February 17, 2007 Posted February 17, 2007 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 Quote
Sandbag Posted February 17, 2007 Author Posted February 17, 2007 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? Quote Leapfrog - Dynamic Visitor Tracking
acidvertigo Posted February 17, 2007 Posted February 17, 2007 (edited) 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 February 17, 2007 by acidvertigo Quote
Sandbag Posted February 17, 2007 Author Posted February 17, 2007 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']. Quote Leapfrog - Dynamic Visitor Tracking
acidvertigo Posted February 17, 2007 Posted February 17, 2007 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 Quote
acidvertigo Posted February 17, 2007 Posted February 17, 2007 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')); ? Quote
Sandbag Posted February 17, 2007 Author Posted February 17, 2007 $myurl = getenv('PATH_INFO') . getenv('QUERY_STRING'); $wo_last_page_url = addslashes($myurl); Quote Leapfrog - Dynamic Visitor Tracking
acidvertigo Posted February 17, 2007 Posted February 17, 2007 $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: Quote
Sandbag Posted February 17, 2007 Author Posted February 17, 2007 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! Quote Leapfrog - Dynamic Visitor Tracking
cbx040 Posted February 17, 2007 Posted February 17, 2007 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 Quote
MarthaD Posted February 17, 2007 Posted February 17, 2007 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" Quote
MarthaD Posted February 17, 2007 Posted February 17, 2007 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.... Quote
Sandbag Posted February 17, 2007 Author Posted February 17, 2007 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. Quote Leapfrog - Dynamic Visitor Tracking
MarthaD Posted February 17, 2007 Posted February 17, 2007 (edited) 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. A semi colon character was expected. Error processing resource 'http://www.mysite.net/admin/leapfrog_feed.php?act... Says source is not available for viewing... Edited February 17, 2007 by MarthaD Quote
cbx040 Posted February 18, 2007 Posted February 18, 2007 A semi colon character was expected. Error processing resource 'http://www.mysite.net/admin/leapfrog_feed.php?act... Says source is not available for viewing... Hi, I had this problem, but I was able to view the source alright in firefox. Regards, Simon Quote
cbx040 Posted February 18, 2007 Posted February 18, 2007 Hi, I had this problem, but I was able to view the source alright in firefox. Regards, Simon I added some tabs and newlines so I could view the xml better in /admin/includes/functions/leapfrog.php I rewrote my function lf_getClicks as /** * Get all visitor clicks past the fromTime */ function lf_getClicks($fromTime) { $query = "select customer_id, customer_name, session_id, ip_address, click_time, page_url, page_title, referer_url from leapfrog where click_time > " . $fromTime; $data_str = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<clicks>\n"; $clicks = array(); $result = tep_db_query($query); while ($row = tep_db_fetch_array($result)) { $data_str .= "\t<click>\n"; $data_str .= "\t\t<pageurl>" . $row['page_url'] . "</pageurl>\n"; $data_str .= "\t\t<pagetitle>" . $row['page_title'] . "</pagetitle>\n"; $data_str .= "\t\t<visitorid>" . $row['customer_id'] . "</visitorid>\n"; $data_str .= "\t\t<visitorname>" . $row['customer_name'] . "</visitorname>\n"; $data_str .= "\t\t<clicktime>" . $row['click_time'] . "</clicktime>\n"; $data_str .= "\t\t<visitorip>" . $row['ip_address'] . "</visitorip>\n"; $data_str .= "\t\t<sessionid>" . $row['session_id'] . "</sessionid>\n"; $data_str .= "\t\t<refererurl>" . $row['referer_url'] . "</refererurl>\n"; // Get the product image if on product item page $pattern = "/p-[0-9]+/"; preg_match($pattern, $row['page_url'], $matches); $productPage = $matches[0]; $productId = substr($productPage, strpos($productPage, "p-")+2); $productId = str_replace (".html", '', $productId); if ($productId == "") { $thumbUrl = ""; } else { $itemQuery = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id='" . $productId . "'"); $item = tep_db_fetch_array($itemQuery); $thumbUrl = DIR_WS_CATALOG . DIR_WS_IMAGES . "" . $item['products_image']; } $data_str .= "\t\t<thumburl>" . $thumbUrl . "</thumburl>\n"; $data_str .= "\t</click>\n"; } $data_str .= '</clicks>'; echo $data_str; } I hope this helps. Simon Quote
MarthaD Posted February 18, 2007 Posted February 18, 2007 Okay - i got it working finally with abra's code - i must have missed something late last night but BIG thanx to all who assisted! However, I seem to have a new issue which I think is from the CSS/dhtml menus i am using.... If i click the product name from the dynamic menu, it now shows up twice in the leapfrog page, but only the second instance shows an image.... If i click a link from say a category listing, it works fine with only one instance being recorded... Quote
azer Posted February 19, 2007 Posted February 19, 2007 as i wrote in pm to the authors - is there any wy to embed or rewrite the html file so that the report run in a normal admin page , not a popup html file ? - is it possible to have the title of the page defined in language file , english is not the unique language on oscommerce shop :-) :blush: Quote MS2
cbx040 Posted February 19, 2007 Posted February 19, 2007 as i wrote in pm to the authors - is there any wy to embed or rewrite the html file so that the report run in a normal admin page , not a popup html file ? - is it possible to have the title of the page defined in language file , english is not the unique language on oscommerce shop :-) :blush: Hi, I changed mine to be part of the admin page with an iframe. I changed /admin/leapfrog.php <!-- body_text //--> <td> <iframe src="http://www.yourwebsite.com/catalog/admin/includes/leapfrog/leapfrog.html" width="640" height="1450" frameborder="0" scrolling="no" title="<?php echo TEXT_LAUNCH; ?>"> <a href="http://www.yourwebsite.com/catalog/admin/includes/leapfrog/leapfrog.html" target="_blank"><?php echo TEXT_LAUNCH; ?></a> </iframe> </td> <!-- body_text_eof //--> Simon Quote
chee Posted February 22, 2007 Posted February 22, 2007 Great contribution!! Is there a way: 1) To change the title instead of showing "LeapFrong - Realtime OSCommerce Visitor tracking"? 2) I got this sometimes on the product showing - HEADING_TITLE, any idea? 3) Is there a way to not showing customer login name when customer login? I am thinking to put this into a public access page to show that my site is really "Active", but not to violate any customer privacy! Showing "Guest" is fine! 4) Suggest also the "purge database" option to be set on the admin page instead of the showing page Thank you! Quote
Sandbag Posted February 22, 2007 Author Posted February 22, 2007 (edited) Hi chee, Let me answer your questions: 1. Change title - this has been requested by more than one person. In future releases I think the title and strapline will be defined in a language file. That way you can change it to whatever you like 2. I think HEADING_TITLE appears when you are on a page that is not a product or category page, although on the default OSC store this is defined somewhere and shows up correctly. If you want to change it for you store goto 'catalog/includes/functions/leapfrog.php' and search for HEADING_TITLE. Its around line 99. Change it to what you want. 3. Yes you can do this. Open 'catalog/includes/function/leapfrog.php'. Find the following around line 45: $wo_full_name = tep_db_input($customer['customers_firstname'] . ' ' . $customer['customers_lastname']); Change it to: $wo_full_name = 'Guest'; Showing IP address might also violate customer privacy so you can change that in the same file. 4. The contribution was not meant to be seen by public so controls were put into GUI. I like the idea of being able to do everything in one place, rather that having to wait for HTML page refreshes to change settings. However a quick Flex edit could remove the button. PM me for more about this. So to conclude, 1, 2 & 3 are possible or will be very soon in version 1.2. 4 is very store specific and not a feature most people would want so won't be in the next version. Ed Great contribution!! Is there a way: 1) To change the title instead of showing "LeapFrong - Realtime OSCommerce Visitor tracking"? 2) I got this sometimes on the product showing - HEADING_TITLE, any idea? 3) Is there a way to not showing customer login name when customer login? I am thinking to put this into a public access page to show that my site is really "Active", but not to violate any customer privacy! Showing "Guest" is fine! 4) Suggest also the "purge database" option to be set on the admin page instead of the showing page Thank you! Edited February 22, 2007 by Sandbag Quote Leapfrog - Dynamic Visitor Tracking
markoven Posted February 23, 2007 Posted February 23, 2007 leapfrog was working good, when I put SSL connection on, i get the message in leapfrog: "Unable to connect to your store database", I tried to change the https to http, that went well, but when i changed the /admin/includes/application_top i'll get a fatal error in my admin-index.php that says: fatal error in line 209 ......application_top.php Please help! Quote
Sandbag Posted February 23, 2007 Author Posted February 23, 2007 Hi everyone. I am ALMOST ready to release Leapfrog V1.2. It has several new features including: Visitor country displayed Length of page view displayed Ability to show/hide spider and robot sessions Now compatible with Ultimate SEO URLs 'out of the box' Improved image handling - fixes problems people had seeing the product images You can see the new version in action in the following locations: Simulated demo - clicks generated artificially Live demo - click around in my dummy shop and see your movements being tracked! Before I release it, I need a couple of people to test it to make sure I haven't missed anything. This is to prevent a duff version being uploaded to the contributions sections. Anyone willing to test the new version, please PM me for a link. Only need one or two testers so if you want a sneak peak make sure you get PMing fast! Thanks, Ed Quote Leapfrog - Dynamic Visitor Tracking
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.