Modify Orders Page

  • Posts: 26
  • Thank you received: 0
11 years 6 months ago #101292

Hi,
can I modify the List Orders page linked in the Cpanel user?
I would like to add 2 columns: Product name and quantity products...it is possible??
Thanks
Guy

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #101390

Hi,

I think that you'll be able to do that by changing the code of your "listing" file of your "order" view through "Hikashop->Display->Views".

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
11 years 6 months ago #101451

Hi,
Thanks for tour reply!
I understood how to add any columns.....but do you have any suggestions to how insert a sql query to collect data from other tables? because I'm able to get data only from order table.
Thanks!!!
Guy

Please Log in or Create an account to join the conversation.

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
11 years 6 months ago #101454

You can run queries like that:
<?php
$db = JFactory::getDBO();
$db->setQuery('YOUR QUERY');
$data = $db->loadObjectList();
?>

The following user(s) said Thank You: giuseppe

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
11 years 6 months ago #101583

Perfect!
Thanks!!!
Guy

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
11 years 5 months ago #102446

Hi,
I need last suggestion, if is possible:
I have insert a sql Query into the order_listing like this:

$db->setQuery('SELECT order_product_name FROM hikashop_order_product join hikashop_order on hikashop_order_product.order_id=hikashop_order.order_id and hikashop_order.order_id=????????');

but I can not correct link the table order with table order_product in a way that corresponds to each order the exact product name.
If it is not too complicated…my PHP Skills are not very good!
Thanks!!!
Guy

Please Log in or Create an account to join the conversation.

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
11 years 5 months ago #102455

you can find the order_id in the variable:
$row->order_id

The following user(s) said Thank You: giuseppe

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
11 years 5 months ago #102537

Thanks!!
it's OK
Bye
Guy

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
11 years 2 months ago #120709

Hi,
sorry, but I'd like to filter orders in this page so that they are displayed only in status = "completed".
I always have to edit the file "listing" in view "Order"?
Thanks!!
Bye
Guy

Please Log in or Create an account to join the conversation.

  • Posts: 82725
  • Thank you received: 13338
  • MODERATOR
11 years 2 months ago #120711

Yes.
You can just add the line:
if($row->order_status!='confirmed') continue;
after the line:
$row =& $this->rows[$i];
in that order/listing view file.

The following user(s) said Thank You: giuseppe

Please Log in or Create an account to join the conversation.

  • Posts: 26
  • Thank you received: 0
11 years 2 months ago #120714

spectacular!!
you were very fast and very good!
It's all OK!
Many many Thanks
Grazie!!
Guy

Please Log in or Create an account to join the conversation.

Time to create page: 0.087 seconds
Powered by Kunena Forum