2014-01-18 33 views
0

我必須對訂單頁面進行一些更改,實際上我希望我的更改僅適用於即將到來的訂單,而不適用於已訂購的訂單。爲即將到來的訂單添加條件Magento

So i thinks it should be like set Order id in **if** condition that if(Orderid > '5'){}. 
    But How i dont know exactly what is condition for that. 

請回復感謝

回答

0

你必須找到一個app/design/frontend文件夾下的變化正確的模板。例如,訂單信息頁面由app/design/frontend/base/default/template/sales/order/info.phtml提供。

在這裏,你會發現行:

<?php $_order = $this->getOrder() ?> 

這裏$_order變量定義,這條線在模板中的任意位置後,您可以使用:

<?php if ($_order->getEntityId() > 30):?> 
<h1> HELLO WORLD </h1> 
<?php endif; ?> 

我想知道,如果你知道increment identity id之間的差異。 Increment id是你在與#開始訂單中看到的和entity id是您在URL中如看到的數字:/sales/order/view/order_id/31/

在上面的例子中,我用的entity id

相關問題