Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OSC Active Desktop


gregy

Recommended Posts

  • 3 months later...
  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

Hi

 

I have made another column where i would like to display comments that are made by customer when purchasing.

 

Now at the moment i don't see any comment until i open order. I guess this must be somewhere here, but i'm no programer

<table width="100%" cellpadding="4" cellspacing="1" border="0">

<tr align="center">

<th><strong><?php echo TEXT_ORDER_ID; ?></strong></td>

<th><strong><?php echo TEXT_DATEOFPURCHASE; ?></strong></td>

<th><strong><?php echo TEXT_CLIENTNAME; ?></strong></td>

<th><strong><?php echo TEXT_PRODUCT; ?></strong></td>

<th><strong><?php echo TEXT_PAYMETHOD?></strong></td>

<th><strong><?php echo TEXT_QTY; ?></strong></td>

<th><strong><?php echo TEXT_PRICE; ?></strong></td>

<th><strong><?php echo TEXT_TOTAL; ?></strong></td>

<th><strong><?php echo TEXT_COMMENTS; ?></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'] . " ;");

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

$tax = tep_db_fetch_array($tax_query);

 

?>

 

<tr class="row">

 

<td align="left"> <?php echo $command['orders_id']; ?></td>

<td align="left"> <?php echo formatPurchaseDate($command['date_purchased']); ?></td>

<td align="left">

<a href=" <?php echo '' .'orders.php?selected_box=customers&page=1&oID='. $command['orders_id'] .'&action=edit'?>">

<?php echo $command['customers_name']; ?></a></td>

 

<td align="left"><?php echo $command['products_name'] . '<BR>';

while ($attrib = tep_db_fetch_array($attributes_query)) {

echo " - " . $attrib['products_options'] . " " . $attrib['products_options_values'] . "<br>";

}

?></td>

<td align="left"><?php echo $command['payment_method']; ?></td>

<td align="center"><?php echo $command['products_quantity']; ?></td>

<td align="center"><?php echo $currencies->display_price(($command['final_price']+(($command['final_price']*$command['products_tax'])/100)), tep_get_tax_rate($tax['products_tax_class_id'])); ?></td>

<td align="right"><?php echo $currencies->display_price(($command['products_quantity']*($command['final_price']+(($command['final_price']*$command['products_tax'])/100))), tep_get_tax_rate($tax['products_tax_class_id'])); ?></td>

<td align="right"><?php echo $command['comments']; ?></td>

</tr>

<?php

};

?>

</table>

 

i have already added column comments, and tried something, but obviously it's not working :(

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

it's me back again :)

 

I would like to have two more functions, but since i'm not a programer i'm walking in the dark with my trying to find the right code :(

 

1. Insert comments in a column

2. Insert remaining stock in a column

 

Can anyone help me?

 

Thanxs a lot in advance!

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

i see this looks a bit old... but i like this tool it runs on s single computer and i always have my shop under control..

 

 

but now i like to change this so i cann see one order in one line normaly my customers will order 3-5 items this make it a bit difficlut to see new orders i must scroll always.

how i can change the code so that a order will only show in one line

 

thanks for help

 

from good old germay

 

 

alfred

Link to comment
Share on other sites

  • 11 months later...

hi guys .. any idea, how to change time format to 24hours .. not AM or PM?

 

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;
}

Link to comment
Share on other sites

  • 3 months later...

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