Jump to content
Sign in to follow this  
gregy

OSC Active Desktop

Recommended Posts

Hi!

 

Any idea how to change this code

<?php
/*
 $Id: osc_active_desktop V 2.0 2003/03/07 23:03:52 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
 Developped by Gyakutsuki 
*/

// store this file in your admin directory to get the correct paths
 require('includes/application_top.php');
 
// make a connection to the database... now
 tep_db_connect() or die('Unable to connect to database server!');
 $command_query = tep_db_query("select o.orders_id, date_purchased, customers_name, products_name, payment_method, products_quantity, final_price, op.orders_products_id from orders o, orders_products op WHERE o.orders_id = op.orders_id and orders_status='1' ORDER BY date_purchased DESC");
 $whos_online_query = tep_db_query("select DISTINCTROW customer_id from " . TABLE_WHOS_ONLINE);
 $customers_query = tep_db_query("select DISTINCTROW customers_id from " . TABLE_CUSTOMERS);

?>

<html> 
<head> 
<title><?php echo TEXT_ORDERS; ?></title> 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"> 
<META HTTP-EQUIV=Refresh CONTENT="<?php echo REFRESH_RATE;?>"> 
<link rel="stylesheet" type="text/css"  href="../stylesheet.css"> 
   <script> 
<!-- 
function imp(){ 
 if (!window.print){ 
 alert("<?php echo TEXT_NS_ALERT; ?>") 
 return 
 } 
 window.print() 
} 
//--> 
</script> 

</head> 
<body> 

<table border="0" width="100%" cellspacing="0" cellpadding="0"> 
      <tr> 
          <td align="left" width="62%"> 
              <font size="2" face="Verdana"><b><?php echo TEXT_DESKTOP; // echo STORE_NAME; ?></b></font> 
          </td> 
          <td align="right" width="28%"> 
              <a href="<?php echo '';?>"><font size="1" face="Verdana" color="#000000">
              <b><?php echo TEXT_ADMIN; ?></b></font></a>  |  
              <a href="<?php echo ''. HTTP_SERVER; ?>"><font size="1" face="Verdana" color="#000000"><b><?php echo TEXT_CATALOG; ?></b></font></a>  |  
              <a href="javascript:imp()" target="_self"><font size="1" face="Verdana" color="#000000"><b><?php echo TEXT_PRINT; ?></b></font></a>   
          </td> 
          <td align="right" width="10%">  
          </td> 
      </tr> 
      <tr> 
          <td align="left"  colspan="2"> 
<!--             <div align="right"> <font size="1" face="Verdana"><?php echo strftime(DATE_FORMAT_LONG); ?></font> </div> -->
 </td>  
          <td align="left" width="10%"></td> 
      </tr> 
      <tr> 
          <td align="left" colspan="2"> 
              <font size="1" face="Verdana" color="#000000"><?php echo TEXT_NBR_CLIENTS_ONLINE; ?> <?php echo (tep_db_num_rows($whos_online_query)) . ' ' . TEXT_CLIENTS; ?></font> 
              <a href="<?php echo '' . 'whos_online.php?selected_box=tools'?>"> 
              <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> 
              </a> 
          </td> 
          <td align="left" width="10%"></td> 
      </tr> 
      <tr> 
          <td align="left" colspan="2"> 
              <font size="1" face="Verdana" color="#000000"><?php echo TEXT_NBR_CLIENTS_REG; ?> <?php echo (tep_db_num_rows($customers_query)). ' ' . TEXT_CLIENTS; ?></font> 
              <a href="<?php echo ''. 'customers.php?selected_box=customers'?>"> 
              <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> 
              </a> 
          </td> 
          <td align="left" width="10%"></td> 
      </tr> 
      <tr> 
          <td align="left" colspan="2"> 
              <font size="1" face="Verdana" color="#000000"><?php echo TEXT_NBR_ORDERS; ?> <?php echo (tep_db_num_rows($command_query)). ' ' . TEXT_ORDERS; ?></font> 
              <a href="<?php echo '' .'orders.php'?>"> 
              <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> 
              </a> 
          </td> 
          <td align="left" width="10%"></td> 
      </tr> 
      <tr> 
<!--           <td align="left" colspan="2"> 
         <font size="1" face="Verdana" color="#000000">User Tracking</font> 
              <a href="<?php echo '' . 'user_tracking.php'?>"> 
              <img border="0" src="<?php echo '../images/arrow_green.gif" width="13" height="13"'?>> 
              </a> 
          </td> 
-->     
          <td align="left" width="10%"></td> 
      </tr>       
      
</table>
<table border="0"> 
 <tr class="infoBoxContents" align="center">
   <td><strong><?php echo TEXT_ORDER_ID; ?></strong></td>
   <td><strong><?php echo TEXT_DATEOFPURCHASE; ?></strong></td> 
   <td><strong><?php echo TEXT_CLIENTNAME; ?></strong></td> 
   <td><strong><?php echo TEXT_PRODUCT; ?></strong></td> 
   <td><strong><?php echo TEXT_PAYMETHOD?></strong></td> 
   <td><strong><?php echo TEXT_QTY; ?></strong></td> 
   <td><strong><?php echo TEXT_PRICE; ?></strong></td> 
   <td><strong><?php echo TEXT_TOTAL; ?></strong></td> 
 </tr> 
<?php 
   
 while ($command = tep_db_fetch_array($command_query)) { 
   $attributes_query = tep_db_query("select products_options, products_options_values from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES." oa where orders_id = " . $command['orders_id'] . " and orders_products_id = " . $command['orders_products_id'] . ";");

?> 

 <tr class="moduleRowOver"> 

   <td align="left"><font face="verdana" size="2"> <?php echo $command['orders_id']; ?></font></td> 
   <td align="left"><font face="verdana" size="2"> <?php echo $command['date_purchased']; ?></font></td> 
   <td align="left"><font face="verdana" size="2">
   <a href=" <?php echo '' .'orders.php?selected_box=customers&page=1&oID='. $command['orders_id'] .'&action=edit'?>">  
   <?php echo $command['customers_name']; ?></a></font></td> 
   <td align="left"><font face="verdana" size="2"><?php echo $command['products_name'] . '<BR>';
     while ($attrib = tep_db_fetch_array($attributes_query)) { 
       echo " - " . $attrib['products_options'] . " " . $attrib['products_options_values'] . "<br>"; 
     } 
    ?></font></td> 
   <td align="left"><font face="verdana" size="2"><?php echo $command['payment_method']; ?></font></td> 
   <td align="center"><font face="verdana" size="2"><?php echo $command['products_quantity']; ?></font></td> 
   <td align="right"><font face="verdana" size="2"><?php echo $command['final_price']; ?></font></td> 
   <td align="right"><font face="verdana" size="2"><?php echo $command['products_quantity']*$command['final_price']; ?></font></td> 
 </tr> 
<?php 
 }; 
?> 
</table>

</body> 
</html>

 

to display prices with tax incl. It's a great contribution.

 

thanx

Share this post


Link to post
Share on other sites

is it only with me or is more common probelm .. osc active desktop is not displaying online visitors .. while infobox on main page says i.e. 22 visitors osc active desktop says 1 ..

 

hmm .. any idea?

Share this post


Link to post
Share on other sites
is it only with me or is more common probelm .. osc active desktop is not displaying online visitors .. while infobox on main page says i.e. 22 visitors osc active desktop says 1 ..

 

hmm .. any idea?

 

It uses the number of actually signed-in customers, and not the number of any customer online (i.e. whether they are signed in or not).

Share this post


Link to post
Share on other sites

can this be modified to visitors .. not signed customers?

Share this post


Link to post
Share on other sites
can this be modified to visitors .. not signed customers?

 

Yeah it sure can. I was in the process of modifying the Active Desktop , but I havent had time to finish modifying it.

 

What I hate about it is that it treats each product as if it is a separate order.

I would much prefer it to list the customer once, and then list the products underneath the customers details.

 

Look in the first few lines of the osc_active_desktop.php file, and there should be a line which starts with " $whos_online_query = ............"

 

Try changing that line to " $whos_online_query = tep_db_query("select customer_id from " . TABLE_WHOS_ONLINE);"

 

Hopefully that will be it (I cant remember if it required anymore changes).

Let me know if it doesnt work.

 

Cheers,

Chris :)

Edited by The_Bear

Share this post


Link to post
Share on other sites
Yeah it sure can. I was in the process of modifying the Active Desktop, but I havent had time to finish modifying it.

 

What I hate about it is that it treats each product as if it is a separate order.

I would much prefer it to list the customer once, and then list the products underneath the customers details.

 

Look in the first few lines of the osc_active_desktop.php file, and there should be a line which starts with "? $whos_online_query = ............"

 

Try changing that line to "? $whos_online_query = tep_db_query("select customer_id from " . TABLE_WHOS_ONLINE);"

 

Hopefully that will be it (I cant remember if it required anymore changes).

Let me know if it doesnt work.

 

Cheers,

Chris :)

 

it works .. thank you ... if you will work on new version it would be great .. i also hate this each product ...

Edited by w2vy

Share this post


Link to post
Share on other sites

I wouldn't have ithought it would be that difficult to change it, after all Active Desktop it basically just an autorefresh header with a few links and a list of orders. You could design your own page to list the orders the way you want them and add the autorefresh header.

Share this post


Link to post
Share on other sites

thanx a lot .. already set on desktop :)

 

looking forward of ToDo things ;)

Share this post


Link to post
Share on other sites
thanx a lot .. already set on desktop :)

 

looking forward of ToDo things ;)

 

Glad you like it mate. I've been hacking OSC for over 24 hours non-stop but it's my frist 24 hrs with it ;)

 

/me concentrates on the phpbb/osc marriage thus escaping his todo list...

 

A.

Share this post


Link to post
Share on other sites

Hello,

 

Thank to continue my first development. I have just a comment after version 2.

 

If you use in admin osc active desktop with admin access level, the contribution does'nt work. I

 

It's for that, i put the osc active desktop in a sub directories catalog. After you can insert an .htaccess for the security.



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites
Hello,

 

Thank to continue my first development. I have just a comment after version 2.

 

If you use in admin osc active desktop with admin access level, the contribution does'nt work. I

 

It's for that, i put the osc active desktop in a  sub directories catalog. After you can insert an .htaccess for the security.

 

 

hmm .. strange .. all of sudden it doesn't work one or another way? .. how about other users .. does it works for you?

Share this post


Link to post
Share on other sites
Hello,

 

Thank to continue my first development. I have just a comment after version 2.

 

If you use in admin osc active desktop with admin access level, the contribution does'nt work. I

 

It's for that, i put the osc active desktop in a  sub directories catalog. After you can insert an .htaccess for the security.

 

Hey no problem, thanks for coming up with the mod in the first place :)

 

Not sure what you mean about the access level though. I'm simply using an .htaccess file for it and tell Windoze to use my user/pass and it works fine. I imagine it would be the same with any other form of auth used?

 

A.

Share this post


Link to post
Share on other sites

I am agree with .htaccess. There is no problem.

 

Admin acces level allow a right on one or several files. But if you try to access the admin directory with http.../admin/osc_active_desktop. There is a problem. If you know the solution, i would know it.



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

Share this post


Link to post
Share on other sites
I am agree with .htaccess. There is no problem.

 

Admin acces level allow a right on one or several files. But if you try to access the admin directory with http.../admin/osc_active_desktop. There is a problem. If you know the solution, i would know it.

 

 

is it possible that it stops to show orders when certain number of orders is already displayed??? .. i'm stucked ... i't not showing more orders ... if i edit last order via phpmyadmin (i.e. just a letter in name) to see refreshment, it works .. but not showing last 10 orders .. hmm

 

STUPID ME .. all orders shown have status "In Progress" .. those that should be displayed are already set to delivery status :thumbsup:

Edited by gregy

Share this post


Link to post
Share on other sites

Question: Are there any potential security risks involved in using this contribution?


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites
Question: Are there any potential security risks involved in using this contribution?

 

just be sure to put it in the locked directory i.e. /admin

Share this post


Link to post
Share on other sites

any idea how to display prices with tax in active desktop?

 

thanx

Share this post


Link to post
Share on other sites

one more .. why is horizontal slider at the bottom alyways displayed .. even if page fits into display .. ?

 

thanx

Share this post


Link to post
Share on other sites

Could someone show me how to integrate another contrib into this one or how to execute another file from this file whenever it refreshes.

 

I have this contrib (and it is great) and I also have the Auto Update Exchange Rates file on my site. I want to have Active Desktop make a call to (execute) update_currencies.php

 

I have tried to do it myself but I can't get it to work.

 

Thanx, Dave.

Share this post


Link to post
Share on other sites

Hey all,

 

I just updated this package with a few goodies:

 

Changes:

- Products now display currency symbols

- Currency decimals automatically set at your OSC defaults

- Product prices now include tax

- Broke out orders into 2 categories, "Pending" and "In Process" to give you a better handle on what all you have in the works

- Added some nice graphics to make it visually more appealing

- Screenshot enclosed

 

 

Haven't been able to develop a work-around for those w/ the admin access level contribution installed though.

 

Hope ya like it.

 

You can download it here:

http://www.oscommerce.com/community/contributions,1925


I only do what my Rice Krispies tell me to do!

Share this post


Link to post
Share on other sites

I get the following error when using this contribution on two different stores and was wondering if anyone else has seen this:

 

Total 1064 - You have an error in your SQL syntax near '; ' at line 1

 

select products_id, products_tax_class_id from products p where p.products_id = 34;

 

[TEP STOP]

Share this post


Link to post
Share on other sites
I get the following error when using this contribution on two different stores and was wondering if anyone else has seen this:

 

Have you altered your products table structure at all? I have this running on 3 different shops with no problems.

 

Greg


I only do what my Rice Krispies tell me to do!

Share this post


Link to post
Share on other sites

hi

 

there is no instructions on altering product tabel structure .. and previous version was working OK.

 

bytheway .. congratulations on update .. what i read in readme.txt!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×