Hide Cancelled Order

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
3 years 8 months ago #321720

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19

Hi

I wish to hide cancelled orders in the order lists within the customers CP. I did find a post HERE , adding the code doesn't seem to work. I would appreciate an update/assistance on this please?

Thanks

David B)

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
3 years 8 months ago #321722

Hi,

That solution is for the orders listing, when you click on the "my orders" link of the control panel.
The line

$row =& $this->rows[$i];
doesn't exist anymore in order / listing.php but you can still add the same code after the line:
foreach($this->rows as &$row) {
and it will work all the same.
Now for the "latest orders" area of the control panel, you need to add the line:
if($order->order_status=='cancelled') continue;
after the code:
foreach($this->cpanel_data->cpanel_orders as $order_id => $order) {
in the file user / cpanel_orders.php and it will work.

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

  • Posts: 440
  • Thank you received: 20
  • Hikashop Essential
3 years 8 months ago #321759

Hi Nicolas

can you confirm this is the correct place for the code you provided.

foreach($this->cpanel_data->cpanel_orders as $order_id => $order) {
$order_link = hikashop_completeLink('order&task=show&cid='.$order_id.$url_itemid.$cancel_url)if($order->order_status=='cancelled') continue;

Thanks

David B)

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

  • Posts: 4486
  • Thank you received: 609
  • MODERATOR
3 years 8 months ago #321764

Hello,

From what Nicolas said as result, you have to get this :
...
$cancel_url = '&cancel_url='.base64_encode(hikashop_currentURL());
foreach($this->cpanel_data->cpanel_orders as $order_id => $order) {
if($order->order_status=='cancelled') continue;
$order_link = hikashop_completeLink('order&task=show&cid='.$order_id.$url_itemid.$cancel_url);
?>
...


Hope this will be more clear.
Regards

Last edit: 3 years 8 months ago by Philip.
The following user(s) said Thank You: davec

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

Time to create page: 0.055 seconds
Powered by Kunena Forum