arion128 Posted August 15, 2007 Share Posted August 15, 2007 I have the same error: Fatal error: Call to a member function on a non-object in /.../catalog/admin/whos_online.php on line 797 echo '<td valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo tep_draw_separator('pixel_black.gif', '100%', '1'); [b] 797---> [/b] echo '<div class="smalltext"><b>' . TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency) . '</b></div>'; echo '</td>' . "\n"; ?> Any idea? I have the same problem too. I thnk this code is just getting the sub total price right?? I think commenting the code out by putting // this in front of that line helps solve that problem. But not sure if this is the correct method of solving it. Would like to know the reason for this and if possible a solution. Quote Link to comment Share on other sites More sharing options...
Tommick Posted August 16, 2007 Share Posted August 16, 2007 Latest Version installed, but it displays not IP-Address. Instead of IP-Adress I can see $IP Any Help? Quote Link to comment Share on other sites More sharing options...
svla299 Posted August 18, 2007 Share Posted August 18, 2007 I have the same problem too. I thnk this code is just getting the sub total price right?? I think commenting the code out by putting // this in front of that line helps solve that problem. But not sure if this is the correct method of solving it. Would like to know the reason for this and if possible a solution. The code has to be rewriteen as follows: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } if (sizeof($products) > 0) { $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1')); $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency)); } else { $contents[] = array('text' => ' '); } } good luck! Quote Link to comment Share on other sites More sharing options...
♥valerif Posted August 25, 2007 Share Posted August 25, 2007 The code has to be rewriteen as follows: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } if (sizeof($products) > 0) { $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1')); $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency)); } else { $contents[] = array('text' => ' '); } } good luck! works thanks Quote Link to comment Share on other sites More sharing options...
invasi0n Posted August 25, 2007 Share Posted August 25, 2007 I think the contribution is not working well. I think it should not consider the admin a real customer. Quote Link to comment Share on other sites More sharing options...
invasi0n Posted August 25, 2007 Share Posted August 25, 2007 I think the contribution is not working well. I think it should not consider the admin a real customer. If you don't want the admin to be considered a real customer search for: // Subtract Bots and Me from Real Customers. Only subtract me once as Dupes will remove others $total_cust = $total_sess - $total_bots - ($total_admin > 1? 1 : $total_admin); // $total_cust = $total_sess - $total_dupes - $total_bots - ($total_admin > 1? 1 : $total_admin); and Replace with: // Subtract Bots and Me from Real Customers. Only subtract me once as Dupes will remove others // $total_cust = $total_sess - $total_bots - ($total_admin > 1? 1 : $total_admin); $total_cust = $total_sess - $total_dupes - $total_bots - ($total_admin > 1? 1 : $total_admin); Quote Link to comment Share on other sites More sharing options...
enigmabunny Posted September 2, 2007 Share Posted September 2, 2007 (edited) The code has to be rewriteen as follows: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } if (sizeof($products) > 0) { $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1')); $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency)); } else { $contents[] = array('text' => ' '); } } i dont undertand it, i tried it and followed the instructions, but i get an error: Parse error: syntax error, unexpected $end in /websites/LinuxPackage02/en/ig/ma/enigmabunny.co.uk/public_html/admin/whos_online.php on line 814 Edited September 2, 2007 by enigmabunny Quote Link to comment Share on other sites More sharing options...
Burntheweb Posted September 10, 2007 Share Posted September 10, 2007 Latest Version installed, but it displays not IP-Address.Instead of IP-Adress I can see $IP Any Help? hey tommick! I had the same problem but figure out what was the problem... around line 500 you'll find } echo gethost($whos_online['ip_address']); // previous code before Whos online fix (as per mrcold213 17 July 2007) echo gethostbyaddr($whos_online['ip_address']); if you comment the first line and uncomment the second line (removing of course "previous code before Whos online fix (as per mrcold213 17 July 2007)" you'll have the IP address with server address... if instead you just have echo $whos_online['ip_address']; then you'll obatin the ip addy ;) Quote Link to comment Share on other sites More sharing options...
adauktion Posted September 19, 2007 Share Posted September 19, 2007 i didnt get any basket informations :( i have changed the echo '<div class="smalltext"><b>' . TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency) . '</b></div>'; echo '</td>' . "\n"; to if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } if (sizeof($products) > 0) { $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1')); $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency)); } else { $contents[] = array('text' => ' '); } } same effect Quote Link to comment Share on other sites More sharing options...
cuauhtli Posted September 20, 2007 Share Posted September 20, 2007 Well, in line 784 I replaced: if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } } } } with if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } } if (sizeof($products) > 0) { $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1')); $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency)); } else { $contents[] = array('text' => ' '); } } } But I'm still getting the "show_total() on a non-object" fatal error. I tried this contribution with a MS2 store and It worked great, but I haven't been able to use it on a RC1 store. Maybe that's the problem? Quote Link to comment Share on other sites More sharing options...
Tommick Posted October 3, 2007 Share Posted October 3, 2007 @Burntheweb Perfect Thank u very much!!! :thumbsup: Quote Link to comment Share on other sites More sharing options...
Guest Posted October 16, 2007 Share Posted October 16, 2007 Ok, managed to get rid of the error, fix the IP, but, still not showing anyone with a shopping cart and I have tried it with me having items in my shopping cart but it still does not show... Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted December 2, 2007 Share Posted December 2, 2007 (edited) I have just posted v3.3 of Who's Online. This is based on v3.21 and is a comprehensive update that includes the following fixes: Many fixes for HTML 4.01 DTD conformance Rewrote product/category name display for robustness Added product/category name display for Ultimate SEO URLs Fixed gethostbyname errors Rewrote duplicate counting code I have tested this with both MS2 and RC1, and it appears to work correctly. Please let me know if you encounter any problems. The update can be found at http://addons.oscommerce.com/info/824 --Glen Edited December 2, 2007 by SteveDallas Quote Link to comment Share on other sites More sharing options...
dawnmariegifts Posted December 2, 2007 Share Posted December 2, 2007 (edited) Hi thanks for the update. Just installed v3.3 and all works fine except when I click on an ip address instead of taking me to dns stuff it takes me to my custom not found page! other than that all seems to work just fine. any ideas? Thanks P.S. This is how the link looks when I hover my cursor over an ip address http://www.mysite.com/myadmin/%3C http://www.showmyip.com/?ip=68.207.180.79&get=nmap> old way was: http://www.showmyip.com/?ip=68.207.180.79 so it looks like I need remove the first part but not sure how. Edited December 2, 2007 by dawnmariegifts Quote DawnMarieGifts Link to comment Share on other sites More sharing options...
SteveDallas Posted December 2, 2007 Share Posted December 2, 2007 Hi thanks for the update. Just installed v3.3 and all works fine except when I click on an ip address instead of taking me to dns stuff it takes me to my custom not found page! Sorry about that. Here is the fix: Find this line: echo '<a href="<http://www.showmyip.com/?ip=' . $whos_online['ip_address'] . '&get=nmap>" target="_blank">'; Change to this: echo '<a href="http://www.showmyip.com/?ip=' . $whos_online['ip_address'] . '&get=nmap" target="_blank">'; I'm not sure how I missed that; I don't remember adding the angle brackets during editing. I have re-uploaded the package as v3.3.1. --Glen Quote Link to comment Share on other sites More sharing options...
dawnmariegifts Posted December 2, 2007 Share Posted December 2, 2007 Sorry about that. Here is the fix: Find this line: echo '<a href="<http://www.showmyip.com/?ip=' . $whos_online['ip_address'] . '&get=nmap>" target="_blank">'; Change to this: echo '<a href="http://www.showmyip.com/?ip=' . $whos_online['ip_address'] . '&get=nmap" target="_blank">'; I'm not sure how I missed that; I don't remember adding the angle brackets during editing. I have re-uploaded the package as v3.3.1. --Glen Yup! That did it, great job and; Thanks for your contribution. Quote DawnMarieGifts Link to comment Share on other sites More sharing options...
noahvale Posted December 3, 2007 Share Posted December 3, 2007 I installed the lastest version today. Lots of nice features! But... I get no listing of user's carts. Even the plain stock version did that. Any idea what's wrong? Thanks. Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted December 4, 2007 Share Posted December 4, 2007 I installed the lastest version today. Lots of nice features! But... I get no listing of user's carts. Even the plain stock version did that. Any idea what's wrong? Thanks. It displays carts for me. What osC version are you using? If you click on "Profile Display: All", does it display session IDs (osCsid)? Is there anything non-standard about your setup? I'd like to help you determine whether this is a problem with the module, or something in your setup that is causing the carts not to display. Any information you can provide will help me get it sorted out for you. --Glen Quote Link to comment Share on other sites More sharing options...
noahvale Posted December 4, 2007 Share Posted December 4, 2007 It displays carts for me. What osC version are you using? If you click on "Profile Display: All", does it display session IDs (osCsid)? Is there anything non-standard about your setup? I'd like to help you determine whether this is a problem with the module, or something in your setup that is causing the carts not to display. Any information you can provide will help me get it sorted out for you. --Glen From /includes/application_top.php: 'PROJECT_VERSION', 'osCommerce 2.2-MS2'); When I click on "Profile Display: All" I get this: osCsid: c0b6a1bfac6770145115d3758582f6f3 I have lot's of contribs installed and most of them I have tweaked. I did a lot of work on how invoices and packing slips are handled on my own. But again, the cart contents were shown in detail with the original Who's Shopping. Thanks. Quote Link to comment Share on other sites More sharing options...
ckyshop.co.uk Posted December 5, 2007 Share Posted December 5, 2007 As mentioned earlier in this thread I have terrible problems with the who's online not loading every now and again, column left will load but then sometimes it gets stuck. Is this a common problem and does anyone else have it? Thanks. Quote Thanks for any help/comments. Regards, Lewis Hill Link to comment Share on other sites More sharing options...
SteveDallas Posted December 5, 2007 Share Posted December 5, 2007 (edited) I have posted what I hope will be the last update for a while. I found and corrected the error that caused carts not to display under certain circumstances. I also included the French language file provided by delete13. What happened was that the code was trying to pull the cart information from the database regardless of the setting of STORE_SESSIONS. I believe that the prior contributor did this to resolve what was actually a configuration error in his shop. STORE_SESSIONS is set for users in catalog/includes/configure.php, but whos_online.php pulls it from catalog/admin/includes/configure.php. If they are not the same, you will not see carts in whos_online.php. Version 2.0ec's behavior basically ignored the setting and used the method for STORE_SESSIONS='mysql', no matter how you configured it, so you only saw cart information if catalog/includes/configure.php had STORE_SESSIONS='mysql'. Version 3.3.2 restores the original behavior and follows the setting of STORE_SESSIONS. I hope that makes some sense. To update, simply replace admin/whos_online.php. No other changes were made to the files. --Glen Edited December 5, 2007 by SteveDallas Quote Link to comment Share on other sites More sharing options...
noahvale Posted December 5, 2007 Share Posted December 5, 2007 Great work Glen! Mine now works perfectly. Thanks. Quote Link to comment Share on other sites More sharing options...
SteveDallas Posted December 5, 2007 Share Posted December 5, 2007 As mentioned earlier in this thread I have terrible problems with the who's online not loading every now and again, column left will load but then sometimes it gets stuck. Is this a common problem and does anyone else have it? Thanks. I occasionally see a long delay before the table is completed if no reverse DNS information exists for an address. The table is eventually drawn, though. Could this be your problem? Quote Link to comment Share on other sites More sharing options...
ckyshop.co.uk Posted December 5, 2007 Share Posted December 5, 2007 I occasionally see a long delay before the table is completed if no reverse DNS information exists for an address. The table is eventually drawn, though. Could this be your problem? Could be - any way to disable this and tell for sure? You say yours loads eventually whereas mine sometimes doesn't load at all! Quote Thanks for any help/comments. Regards, Lewis Hill Link to comment Share on other sites More sharing options...
gregy Posted December 5, 2007 Share Posted December 5, 2007 i have the same problem .. and then later it says down below .. "mysql has gone away" ... Quote Link to comment Share on other sites More sharing options...
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.