How To: Omit certain orders from cust order list

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #70205

Hello,

I need to omit orders with a certain status from being displayed on the customers order history listing page. I need to omit the "created" orders, I have noticed those are inserted into the database as soon as they click <Purchase> on the hikashop site but have not yet completed the transaction through the payment gateway (e.g. PayPal). Once they complete the transaction through the PayPal payment gateway I get a notification from PayPal and update the order status to something other than "created" and everybody is happy.

However, if they do not complete the payment (leave the page rather than "cancel and return to site"), there is an errant "created" order listed on their order history and nobody is happy. I would like to omit errant "created" order that from their listing.

Thanks,
-Mike

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

  • Posts: 13201
  • Thank you received: 2322
11 years 6 months ago #70298

Hi,

You can edit the view "order / listing" in HikaShop > Display > Views (backend template).
And add the line:

if($row->order_status == 'created' && $row->order_created < time() - 1*86400){ continue; }

After the existing code:
				for($i = 0,$a = count($this->rows);$i<$a;$i++){
					$row =& $this->rows[$i];

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

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #70427

Thanks Xavier,

That got me on the right track and what I needed.

Thanks,
-Mike

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

Time to create page: 0.062 seconds
Powered by Kunena Forum