Forums / All Other Contributions/Addons / Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

Started by reesy on 10 May 2006, 3:25 PM · Views: 53,487

Results 181 to 192 of 192
1 Feb 2010, 8:22 PM
#181
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

Just want to thank "shoulders" for the following. We upgraded to php 5.2 and this little snippet of code did the trick. Otherwise, the info-at-a-glance module was causing a quirk in on the admin/index.php where only one order was showing and the bubbles only appeared in the orders list.

because i have php5 as mentioned earlier i found this.

I have found the solution for Fatal Error in PHP5, in admin/index.php one must change the Line 182:

echo $orders['orders_id'];

to

echo $orders->fields['orders_id'];

16 Feb 2010, 3:14 PM
#182
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,878
Plugin Contributions:
7

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

FYI
there is now a corrected version v1.8 available in the downloads
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_41&products_id=98

minor changes:
moved main code to a function;
corrected code to show the popup on the index page (php 5.2);
corrected broken css in original index.php to align fields correctly;
re-arranged code to make it easier to change preferred display order,

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

14 Mar 2010, 10:40 AM
#183
jandik01 avatar

jandik01

New Zenner

Join Date:
Jun 2005
Posts:
15
Plugin Contributions:
0

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

zen 1.3.8
php 5.2.6
open no selected order without javascritp buble - other orders show good
bug ');" onmouseout="return nd();"> any ideas?

12 Apr 2010, 9:07 PM
#184
balco avatar

balco

Inactive

Join Date:
Jan 2008
Posts:
39
Plugin Contributions:
0

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

Jandik01:

zen 1.3.8
php 5.2.6
open no selected order without javascritp buble - other orders show good
bug ');" onmouseout="return nd();"> any ideas?

I also had the error mentioned above. I realized that my errors were coming from products that had quotation marks in the product title - for example 3" Rope rather than 3 inch Rope. When I got rid of the quotes the error stopped occurring.

Hope this helps!

Ben

13 Apr 2010, 9:34 AM
#185
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

I normally use two single quotes '' instead of one double quote ". Works OK.

25 May 2011, 2:34 AM
#186
danielle avatar

danielle

Totally Zenned

Join Date:
Oct 2004
Posts:
973
Plugin Contributions:
0

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

It sounds like this was fixed in older versions, but in v1.8 it is happening again. The fix below cannot be applied to v1.8 because the javascript has been moved to it's own file, admin/includes/javascript/overlib_min.js. I looked through that file, but the code is totally different and I have no idea what to change to fix the apostrophe/quote problem.

Can anyone help? My client has hundreds of products with quotes in the titles and there is no way she can change them all.

Thanks!

qhome:

FIX FOR MISSING INFO BOX

I'm not sure if anyone ever figured out how to fix the problem with info-at-a-glance not displaying products with ' (apostrophe's) in them, so I went ahead and did it. It is quite simple:

in both admin/index.php & admin/orders.php

FIND:

onmouseover="return overlib(\'' . $cleanComment . '\');"

> 
> replace with:
> 
> ```
onmouseover="return overlib(\\\'' . addslashes(addslashes($cleanComment)) . '\\\');"

It need addslashes twice because it needs 3 slashes to escape the php and javascript levels

Danielle

25 May 2011, 2:14 PM
#187
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

I am not using the latest version so this may or may not help you but this is what I have done:

$replace_quotes=str_replace('"', '&#8221', $cleanComment);
  ?> 
<script language="javascript"><!--  
document.write('<?php echo '<a href="javascript:void(0);" onmouseover="return overlib(\\\'' . $replace_quotes . '\\\');" onmouseout="return nd();"><img src="images/icons/comment2.gif" align="top" border=0></a> '; ?>');


Zen Cart and it's community are the best!!

30 Sep 2011, 8:35 PM
#188
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,878
Plugin Contributions:
7

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

I am not using the latest version so this may or may not help you but this is what I have done:

and it works fine thanks.

I tried three other "clever" ways but none worked.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

17 Feb 2012, 3:15 PM
#189
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

lankeeyankee:

I am not using the latest version so this may or may not help you but this is what I have done:

$replace_quotes=str_replace('"', '”', $cleanComment);
?>

<script language="javascript"><!-- document.write('<?php echo '<a href="javascript:void(0);" onmouseover="return overlib(\\\'' . $replace_quotes . '\\\');" onmouseout="return nd();"><img src="images/icons/comment2.gif" align="top" border=0></a> '; ?>'); ``` In what file do I put this comment?
6 Aug 2013, 2:06 PM
#190
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

We have this mod installed and working flawlessly on 1.5.1. However, when one of our computers auto updated to IE 10 the bubbles stopped popping! All other browsers are fine, but the one computer that uses it the most has a user that insists on IE 10. Anyone else experience this disappearance of the function? The bubbles are there, they just don't show the items when mouse over occurs. Pop up blocker is off. Thanks for any insights.

17 Mar 2016, 7:58 PM
#191
marcopolo avatar

marcopolo

Totally Zenned

Join Date:
May 2008
Location:
United States
Posts:
525
Plugin Contributions:
2

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

I would like to see attributes as well, below is in the readme:

If you want to show more information in the rollover javascript you have to change these 2 lines in the function:

$result_articles = $db->Execute("select products_name, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $order_id . "'");

  while(!$result_articles->EOF){

  $article .= ($result_articles->fields["products_quantity"]) . "x " . ($result_articles->fields["products_name"]) . "<br />";

Here is the all of the code from the functions file:

function info_at_a_glance($order_id) {
global $db;
$article = "";
$num = 1;
$result_articles = $db->Execute("select products_name, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $order_id . "'");
while(!$result_articles->EOF){
$article .= ($result_articles->fields["products_quantity"]) . "x " . ($result_articles->fields["products_name"]) . "<br />";
$num++;
$result_articles->MoveNext();
}
$parsedComment = explode("\r", $article);
$cleanComment = "";
$i=0;
while($i < count($parsedComment)) {
$cleanComment .= trim($parsedComment[$i]);
$i++;
if ($i < count($parsedComment)) $cleanComment .= '<br /> ';
}
?>
<script language="javascript" type="text/javascript"><!--
document.write('<?php echo '<a href="javascript:void(0);" onmouseover="return overlib(\\\'' . addslashes(addslashes($cleanComment)) . '\\\');" onmouseout="return nd();"><img src="images/icons/comment2.gif" align="top" border=0><\/a>'; ?>');
--></script>
<?php
return;
  }
?>

Does anyone know how to include attributes as well in the above code?

marcopolo
Zen Cart 2.2.2 | PHP 8.5.12 | MariaDB 10.11.14

28 May 2016, 6:12 PM
#192
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,878
Plugin Contributions:
7

Re: Info/Orders at a Glance Admin Contribution for 1.2.7 and 1.3.0.

I was looking at upgrading this mod and decided to do it with css tooltip instead.
It needs a function to generate the data, some css in the relevant file <head> and a bit of html.
This example shows the tooltip when hovering on the order amount on the orders page:
Attachment 16371

function

function mv_order_details_popup($order_id) {  global $db;
  
  $result_articles = $db->Execute("select products_name, products_model, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $order_id . "'");
  
  $articles = ''; $num = 1;
  foreach ($result_articles as $row) {
     if ( $num > 1 ) $articles .= "\r";//for line break
     $articles .= htmlspecialchars($row["products_model"] . ' ' . $row["products_name"] . ' x ' . $row["products_quantity"]);
     $num++;
  }
  $parsedComment = explode("\r", $articles);
  $cleanComment = "";
  $i=0;
  while($i < count($parsedComment)) {
   $cleanComment .= trim($parsedComment[$i]);
   $i++;
   if ($i < count($parsedComment)) $cleanComment .= '<br /> ';
  }
  $cleanComment=str_replace('"', '&#8221', $cleanComment);//to escape "
  
  return $cleanComment;
}

css

<style type="text/css">.**order_tooltip **{display: none;position: absolute;background: darkgray;color:black;border: 1px solid #eed;border-radius: 4px;padding: 2**px **4px;text-align:left;}:**hover **+ .**order_tooltip **{display: block;}
</style>

html in orders.php

<td class="dataTableContent hover"><div><?php echo strip_tags($orders->fields['order_total']); ?></div><span class="order_tooltip"><?php echo mv_order_details_popup($orders->fields['orders_id']); //steve added order details to tooltip ?></span></td>

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...