Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC Active Desktop


gregy

Recommended Posts

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

There is no need to alter any table structures. No additional installation instructions other than just copying the files into their respective directories.

 

Mike...shoot me off a copy of your products table structure...maybe I can locate the problem for you.

 

Has anybody else had any problems w/ this latest update, as I mentioned, it's working fine for me on 3 different stores.

 

Greg

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

Link to comment
Share on other sites

There is no need to alter any table structures. No additional installation instructions other than just copying the files into their respective directories.

 

Mike...shoot me off a copy of your products table structure...maybe I can locate the problem for you.

 

Has anybody else had any problems w/ this latest update, as I mentioned, it's working fine for me on 3 different stores.

 

Greg

 

i also receive

 

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]

 

oscdesktop was working perfectly in previous version .. one one is not :(

Link to comment
Share on other sites

i also receive

 

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]

 

oscdesktop was working perfectly in previous version .. one one is not :(

 

OK...I'll look into it right now.

 

Thanks

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

Link to comment
Share on other sites

I just installed a fresh copy of a stock ms2 installation.

 

works just fine.

 

Alright peeps....now I'm really stumped!!

 

Try changing this:

$tax_query = tep_db_query("select products_id, p.products_tax_class_id from " . TABLE_PRODUCTS." p where p.products_id = " . $command['orders_products_id'] . "; ");

 

 

To This:

$tax_query = tep_db_query("select p.products_id, p.products_tax_class_id from " . TABLE_PRODUCTS." p where p.products_id = " . $command['orders_products_id'] . " ;");

 

It's really wierd that the both of you are getting the same error on the same product id number...that's what really confuses the hell out of me!!

 

Let me know if that little change helps at all. Both sets of code work fine for me

 

Thanks,

Greg :o

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

Link to comment
Share on other sites

I just installed a fresh copy of a stock ms2 installation.

 

works just fine.

 

Alright peeps....now I'm really stumped!!

 

Try changing this:

$tax_query = tep_db_query("select products_id, p.products_tax_class_id from " . TABLE_PRODUCTS." p where p.products_id = " . $command['orders_products_id'] . "; ");

To This:

$tax_query = tep_db_query("select p.products_id, p.products_tax_class_id from " . TABLE_PRODUCTS." p where p.products_id = " . $command['orders_products_id'] . " ;");

 

It's really wierd that the both of you are getting the same error on the same product id number...that's what really confuses the hell out of me!!

 

Let me know if that little change helps at all. Both sets of code work fine for me

 

Thanks,

Greg :o

 

mickey .. i receive the same error just another product number .. i just copied error from above .. :-"

 

i'll try this modification ...

Link to comment
Share on other sites

If you are like me then you hate looking at dates that aren't formatted like dd/mm/yyyy and times that are in military format. If, in fact, you are like me then add this function at around line 19 in osc_active_desktop.php:

function formatPurchaseDate($var) {
 $date = substr($var, 0, 10);
 $time = substr($var, -8, 8);

 $new_date = substr($date, -5, 2) . '/' . substr($date, -2, 2) . '/' . substr($date, 0, 4);

 $time_left = substr($time, 0, 2);
 $time_right = substr($time, -5, 2);

 if (substr($time_left, -2, 1) == 0) {
   $time_left = substr_replace($time_left, ' ', -2, 1);
 }

 if ($time_left == 12) {
   $sign = "PM";
 } elseif ($time_left > 12) {
   $time_left -= 12;
   $sign = "PM";
 } else {
   $sign = "AM";
 }

 $new_time = $time_left . ':' . $time_right . ' ' . $sign;
 $date_time = $new_date . ' ' . $new_time;
 return $date_time;	
}

 

And then find <?php echo $command['date_purchased']; ?>

and replace with

<?php echo formatPurchaseDate($command['date_purchased']); ?>

 

The above occurs twice - one for pending orders and one for processing orders.

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

Link to comment
Share on other sites

If you are like me then you hate looking at dates that aren't formatted like dd/mm/yyyy and times that are in military format.  If, in fact, you are like me then add this function at around line 19 in osc_active_desktop.php:

function formatPurchaseDate($var) {
?$date = substr($var, 0, 10);
?$time = substr($var, -8, 8);

?$new_date = substr($date, -5, 2) . '/' . substr($date, -2, 2) . '/' . substr($date, 0, 4);

?$time_left = substr($time, 0, 2);
?$time_right = substr($time, -5, 2);

?if (substr($time_left, -2, 1) == 0) {
? ?$time_left = substr_replace($time_left, ' ', -2, 1);
?}

?if ($time_left == 12) {
? ?$sign = "PM";
?} elseif ($time_left > 12) {
? ?$time_left -= 12;
? ?$sign = "PM";
?} else {
? ?$sign = "AM";
?}

?$new_time = $time_left . ':' . $time_right . ' ' . $sign;
?$date_time = $new_date . ' ' . $new_time;
?return $date_time;	
}

 

And then find <?php echo $command['date_purchased']; ?>

and replace with

<?php echo formatPurchaseDate($command['date_purchased']); ?>

 

The above occurs twice - one for pending orders and one for processing orders.

 

are you sure that above code is in osc_active_desktop.php? .. i don't find it ..

Link to comment
Share on other sites

not sure what you are asking...the function isn't in osc_active_desktop.php because you have to add it there first

 

<?php echo $command['date_purchased']; ?>

is found at around line 180

 

and

<?php echo $command2['date_purchased']; ?>

is found at around line 257

 

paste the function at the top of the page at around line 19 and then change

<?php echo $command['date_purchased']; ?>

to

<?php echo formatPurchaseDate($command['date_purchased']); ?>

 

and chanage

<?php echo $command2['date_purchased']; ?>

to

<?php echo formatPurchaseDate($command2['date_purchased']); ?>

Edited by heliosquare

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

Link to comment
Share on other sites

not sure what you are asking...the function isn't in osc_active_desktop.php because you have to add it there first

 

<?php echo $command['date_purchased']; ?>

is found at around line 180

 

and

<?php echo $command2['date_purchased']; ?>

is found at around line 257

 

paste the function at the top of the page at around line 19 and then change

<?php echo $command['date_purchased']; ?>

to

<?php echo formatPurchaseDate($command['date_purchased']); ?>

 

and chanage

<?php echo $command2['date_purchased']; ?>

to

<?php echo formatPurchaseDate($command2['date_purchased']); ?>

 

worked :)

 

how bout changing format from 03/17/2005 1:33AM into 17.03.2005 12:33

 

you know .. like european format

 

thanx

Link to comment
Share on other sites

worked :)

 

how bout changing format from 03/17/2005 1:33AM into 17.03.2005 12:33

 

you know .. like european format

 

thanx

 

just change the function like this:

function formatPurchaseDate($var) {
   $date = substr($var, 0, 10);
$time = substr($var, -8, 8);

$new_date = substr($date, -2, 2) . '.' . substr($date, -5, 2) . '.' . substr($date, 0, 4);

$time_left = substr($time, 0, 2);
   $time_right = substr($time, -5, 2);
   
if (substr($time_left, -2, 1) == 0) {
     $time_left = substr_replace($time_left, ' ', -2, 1);
   }

   if ($time_left == 12) {
     $sign = "PM";
   } elseif ($time_left > 12) {
     $time_left -= 12;
     $sign = "PM";
   } else {
     $sign = "AM";
   }

   $new_time = $time_left . ':' . $time_right . ' ' . $sign;
$date_time = $new_date . ' ' . $new_time;
   return $date_time;
 }

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

Link to comment
Share on other sites

  • 3 months later...

Hi!

 

is it possible to include sort of this code

 

// TICKET SYSTEM

$ticket_contents = '';
 $ticket_status_query = tep_db_query("select ticket_status_name, ticket_status_id from " . TABLE_TICKET_STATUS . " where ticket_language_id = '" . $languages_id . "'");
 while ($ticket_status = tep_db_fetch_array($ticket_status_query)) {
   $ticket_ticket_query = tep_db_query("select count(*) as count from " . TABLE_TICKET_TICKET . " where ticket_status_id = '" . $ticket_status['ticket_status_id'] . "'");
   $ticket_ticket = tep_db_fetch_array($ticket_ticket_query);
     $ticket_contents .= '<a href="' . tep_href_link(FILENAME_TICKET_VIEW, 'selected_box=ticket&status=' . $ticket_status['ticket_status_id']) . '">' . $ticket_status['ticket_status_name'] . '</a>: ' . $ticket_ticket['count'] . '<br>';
   }
   $ticket_contents = substr($ticket_contents, 0, -4);

 $heading = array();
 $contents = array();

 $heading[] = array('params' => 'class="menuBoxHeading"',
                    'text'  => BOX_TITLE_TICKET);
                    
 $contents[] = array('params' => 'class="infoBox"',
                     'text'  => $ticket_contents);
$box = new box;
 echo $box->menuBox($heading, $contents);

 echo '<br>';

// TICKET SYSTEM ENDE

 

into active desktop .. so it shows if there are any support tickets waitting?

 

OSC Supportticket system http://www.oscommerce.com/community/contributions,3085

Link to comment
Share on other sites

  • 1 year later...

Hi,

 

With the member approval contribution installed, can somebody show me how to include the number of customers awaiting approval in the Active Desktop display?

 

The member approval contribution added a field to the TABLE_CUSTOMERS which is member_level

 

I am thinking that I need to create some extra lines with something like,

 

	$whos_waiting_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS . " where member_level = '0');

I know very little about php so I'd really appreciate the help.

Edited by Antonimo
Link to comment
Share on other sites

  • 4 weeks later...

I think this is a great cean contrib. I am building a pizza parlor and need to have the "price" column changed to delivery method. I have changed the heading no issue. I have tried to put in a line of code like this:

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']))
but am completely stumpped. I do have the display shipping method on invoice installed and tried to use that as a foundation. No luck

 

 

I am not a coder and if anyone can assist me with this I would appreciate it.

Jeff

 

Contributions I use: DynaMenus - Light Box - Best Sellers Content Box - Related Products 3.2 - UPS XML - Secure Admin Login - Vendor Locator - Graphical Borders.

Link to comment
Share on other sites

This is a good contribution for those who may need it but why would anyone want their active desktop as this orders page?

 

The fact the .php page is now created doesn't mean it has to be used as an active desktop - it would work much better if this had a 'switch' facility to switch between your normal active desktop setting and the osc_active_desktop.....

 

..... I have created a short cut on IE to go straight to that URL as it makes better sense but as it requires the username/password it ruins that possibility for a quick view of the osC site operations.

 

Either way, using this with admin access with levels would be a mess unless of course it was added to the catalog directory and the stock: osc_active_desktop URL was changed to something that no-one but the store owner would know of.

 

Any views on this??

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

we use this every single day ... simply called to desktop .. with other things that we need, arranged on desktop .. and your order is just a click away .. otherwise we would need little more clicks to see all stuff that we now have together on desktop ..

 

can't imagine not to have it anymore, after a year of using it ...

Link to comment
Share on other sites

..... I have created a short cut on IE to go straight to that URL as it makes better sense but as it requires the username/password it ruins that possibility for a quick view of the osC site operations.

 

Any views on this??

 

You can include the username and paswword in the url, although it is a little unsafe.

 

However, the technique is:

http://user:[email protected]/

 

By the way, I took the idea behind this principle and created another active desktop element displaying customers waiting approval (I have member approval contribution installed) - this is very useful for quickly approving (or not) a customer who has applied for membership, especially as the refresh rate is every minute.

 

You could use the active desktop element to display anything from your admin that interests you.

 

Regards,

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...