Skip to main content

How To: Omit certain orders from cust order list

More
13 years 11 months ago #70205 by mkj101us
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.

More
13 years 11 months ago #70298 by Xavier
Hi,

You can edit the view "order / listing" in HikaShop > Display > Views (backend template).
And add the line:
Code:
if($row->order_status == 'created' && $row->order_created < time() - 1*86400){ continue; }

After the existing code:
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.

More
13 years 11 months ago #70427 by mkj101us
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.153 seconds
Powered by Kunena Forum