Jump to content

[SOLVED] Payment statuses and if's?


Recommended Posts

which version of PrestaShop are you using?

Assume you are using PS 1.4x,

1. In /controllers/OrderDetailController.php file, at bottom of preProcess() function, add following lines

$id_order_state = intval($order->getCurrentState());
self:smarty->assign('id_order_state', $id_order_state);




2. Then use in your order-detail.tpl file

{if $order->is_order_state == 2}showThis{else}showThat{/if}



Good luck

Link to comment
Share on other sites

Thanks a lot for your help!

I'm using 1.3.6 and did this:

in order-detail.php add this after line 89

'order_state' => intval($id_order_state),
//add this
'id_order_state' => intval($id_order_state),



then, in order-detail.tpl:

{if $id_order_state == 2}{else}Error{/if}

Link to comment
Share on other sites

You must add this line to get the order state first

$id_order_state = intval($order->getCurrentState());



then you can use you code in the smarty assign statement.

'order_state' => intval($id_order_state),
//add this
'id_order_state' => intval($id_order_state), 

Link to comment
Share on other sites

  • 1 year later...
×
×
  • Create New...