Skip to main content

Hide Cancelled Order

More
6 years 3 months ago #321720 by davec
Hide Cancelled Order was created by davec
-- 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.

More
6 years 3 months ago #321722 by nicolas
Replied by nicolas on topic Hide Cancelled Order
Hi,

That solution is for the orders listing, when you click on the "my orders" link of the control panel.
The line
Code:
$row =& $this->rows[$i];
doesn't exist anymore in order / listing.php but you can still add the same code after the line:
Code:
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:
Code:
if($order->order_status=='cancelled') continue;
after the code:
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.

More
6 years 2 months ago #321759 by davec
Replied by davec on topic Hide Cancelled Order
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.

More
6 years 2 months ago - 6 years 2 months ago #321764 by Philip
Replied by Philip on topic Hide Cancelled Order
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: 6 years 2 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.257 seconds
Powered by Kunena Forum