H.Tabesh Posted September 7, 2009 Share Posted September 7, 2009 hi;what is a usage of hidden field ( Hide this state in order for customer ) in OrderState Class?in doesn't look to works!! My Customers can see the orders [ in My orders ] whiles order state mark as Hidden!! Link to comment Share on other sites More sharing options...
JakobFriis Posted September 27, 2009 Share Posted September 27, 2009 I have the same problem on 1.2.4 Link to comment Share on other sites More sharing options...
first1 Posted September 27, 2009 Share Posted September 27, 2009 they should see the order, but would they see the status changed to the new status (if the new status is marked as hide the state?) Link to comment Share on other sites More sharing options...
first1 Posted September 27, 2009 Share Posted September 27, 2009 Topic Was Moved Link to comment Share on other sites More sharing options...
JakobFriis Posted October 1, 2009 Share Posted October 1, 2009 Setting the order state hidden does not change anything from a normal order state. The user can still see the order being in the hidden state when logged in. This should not be the case i believe. Link to comment Share on other sites More sharing options...
ixotype Posted October 27, 2009 Share Posted October 27, 2009 The "hide order state for customers" means hide the status, not the order. The customer will see the last visible order status for that order. It doesn´t works in 1.2.4 version but is solved in SVN. See it at the bug tracker "http://www.prestashop.com/bug_tracker/view/2992/". This change the function getCustomerOrders in class/order.php If you want to hide the orders (wich status is hidden) in the history customer page. you can do this.In history.php where: if ($orders = Order::getCustomerOrders(intval($cookie->id_customer))) foreach ($orders AS &$order) { $myOrder = new Order(intval($order['id_order'])); if (Validate::isLoadedObject($myOrder)) $order['virtual'] = $myOrder->isVirtual(false); } Write if ($orders = Order::getCustomerOrders(intval($cookie->id_customer))) foreach ($orders AS &$order) { $myOrder = new Order(intval($order['id_order'])); $myOrderState = new OrderState(intval($myOrder->getCurrentState())); if ($myOrderState->hidden){ $delKey=array_search($order,$orders); unset($orders[$delKey]); } if (Validate::isLoadedObject($myOrder)) $order['virtual'] = $myOrder->isVirtual(false); } I think it will work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now