Skip to main content

Hide 'cancelled' order on frontend

More
10 years 4 months ago - 10 years 4 months ago #239827 by aran.gibbs
-- 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
Last edit: 10 years 4 months ago by aran.gibbs.

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

More
10 years 4 months ago #239831 by nicolas
Hi,

An easy solution will be to add the line:
Code:
if($row->order_status=='cancelled') continue;
after the line:
Code:
$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.

More
10 years 4 months ago - 10 years 4 months ago #239930 by aran.gibbs
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: 10 years 4 months ago by aran.gibbs.

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

More
7 years 6 months ago - 7 years 6 months ago #305029 by aran.gibbs
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: 7 years 6 months ago by aran.gibbs.

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

More
7 years 6 months ago #305041 by nicolas
Hi,

While that line of code still works in 4.0.3, the line:
Code:
$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:
Code:
foreach($this->rows as &$row) {

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

Time to create page: 0.263 seconds
Powered by Kunena Forum