Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC Active Desktop


gregy

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

Link to comment
Share on other sites

  • 1 month later...
  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

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?

Link to comment
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).

Link to comment
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
Link to comment
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
Link to comment
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.

Link to comment
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

 

Link to comment
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?

Link to comment
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.

Link to comment
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

 

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

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.

Link to comment
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!

Link to comment
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]

Link to comment
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!

Link to comment
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!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...