Hide 'cancelled' order on frontend

  • Posts: 23
  • Thank you received: 0
7 years 11 months ago #239827

-- HikaShop version -- : 2.6.3

HI,

I'm wondering if it's possible to hide orders with a status of Cancelled on the frontend in the My Account > Orders section?
I think it looks messy to show them there esp. when they are created as part of a failed payment process like hitting cancel & return in Paypal.


Aran

Attachments:
Last edit: 7 years 11 months ago by aran.gibbs.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
7 years 11 months ago #239831

Hi,

An easy solution will be to add the line:

if($row->order_status=='cancelled') continue;
after the line:
$row =& $this->rows[$i];
in the file 'listing' of the view 'order' via the menu Display>Views.

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

  • Posts: 23
  • Thank you received: 0
7 years 11 months ago #239930

Thanks that worked a charm! Feature request would be to have this configurable from the backend so you can choose which statues are displayed to clients and even if the My Orders section shows at all.

Last edit: 7 years 11 months ago by aran.gibbs.

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

  • Posts: 23
  • Thank you received: 0
5 years 1 month ago #305029

Hi,

I've picked up a client whos running hikashop 4.03 and wants to hide canceled order but I can't find the above line add in our suggestion. Does this solution still work on 4.03?

Thanks

Last edit: 5 years 1 month ago by aran.gibbs.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
5 years 1 month ago #305041

Hi,

While that line of code still works in 4.0.3, the line:

$row =& $this->rows[$i];
was removed with the rewrite of the order listing in HikaShop 4.
So now, you would need to add that line of code after the line:
foreach($this->rows as &$row) {

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

Time to create page: 0.064 seconds
Powered by Kunena Forum