久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

讓尋呼機(jī)顯示在 magento 列表中

Getting pager to show on magento list(讓尋呼機(jī)顯示在 magento 列表中)
本文介紹了讓尋呼機(jī)顯示在 magento 列表中的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我們目前有一個(gè)報(bào)價(jià)頁(yè)面,其中列出了我們希望向?qū)ず魴C(jī)顯示的所有現(xiàn)有報(bào)價(jià).

We currently have a quote page which lists all existing quotes that we would like to show the pager.

我們?cè)诹斜眄?yè)面中有以下代碼,我們已將調(diào)用添加到尋呼機(jī),但它似乎根本沒(méi)有顯示前端.

We have the following code in the List page which we've added the call to the pager but it doesn't appear to be showing frontend at all.

我還添加了歷史記錄頁(yè)面,該頁(yè)面顯示一個(gè)帶有尋呼機(jī)的列表,作為我們嘗試模擬的工作頁(yè)面的示例.

I've also added the history page which displays a list with a pager as an example of a working page we are trying to emulate.

誰(shuí)能指出我們正確的方向,因?yàn)槲覀兯坪踹z漏了什么

Can anyone point us in the right direction as we appear to be missing something

列表

<?php $_quotation = $this->getQuotations();?>
<?php if($_quotation->getSize()): ?>
<?php echo $this->getPagerHtml(); ?>
<table cellspacing="0" class="data-table" id="my-quotations-table">
    <thead>
        <tr>
            <th class="quote-quote"><?php echo $this->__('Quote #') ?></th>
            <th class="quote-date"><?php echo $this->__('Creation Date') ?></th>
            <th class="quote-valid"><?php echo $this->__('Valid until') ?></th>
            <th class="quote-status"><?php echo $this->__('Status') ?></th>
            <th class="quote-view-link">&nbsp;</th>
        </tr>
    </thead>
    <tbody>
        <?php $_odd = ''; ?>
        <?php foreach ($this->getQuotations() as $_quotation): ?>
            <?php $_quotation->checkExpirationDateAndApply(); ?>
            <tr>
                <td><?php echo $_quotation->getincrement_id() ?></td>
                <td><?php echo $this->formatDate($_quotation->getcreated_time()) ?></td>
                <td><?php echo $this->formatDate($_quotation->getValidEndTime()); ?>
                <td><?php echo $this->__($_quotation->getstatus()); ?></td>
                <td class="a-center"><?php if ($_quotation->isViewableByCustomer()): ?>
                        <a href="<?php echo $this->getViewUrl($_quotation) ?>"><?php echo $this->__('View Quotation') ?></a>
                        <?php endif; ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<script type="text/javascript">decorateTable('my-quotations-table')</script>
<?php echo $this->getPagerHtml(); ?>
<?php else: ?>
    <p><?php echo $this->__('You have no quotes available.') ?></p>
<?php endif ?>

歷史

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php $_orders = $this->getOrders(); ?>
<div class="pager"><?php echo $this->getPagerHtml(); ?></div>
<?php if($_orders->getSize()): ?>
<table class="data-table" id="my-orders-table">
    <col width="1" />
    <col width="1" />
    <col />
    <col width="1" />
    <col width="1" />
    <col width="1" />
    <thead>
        <tr>
            <th><?php echo $this->__('Order #') ?></th>
            <th><?php echo $this->__('Date') ?></th>
            <th><?php echo $this->__('Delivery To') ?></th>
            <th><span class="nobr"><?php echo $this->__('Order Total') ?></span></th>
            <th><span class="nobr"><?php echo $this->__('Order Status') ?></span></th>
            <th>&nbsp;</th>
        </tr>
    </thead>
    <tbody>
        <?php $_odd = ''; ?>
        <?php foreach ($_orders as $_order): ?>
        <tr>
            <td><?php echo $_order->getRealOrderId() ?></td>
            <td><span class="nobr"><?php echo $this->formatDate($_order->getCreatedAtStoreDate()) ?></span></td>
            <td><?php echo $_order->getShippingAddress() ? $this->htmlEscape($_order->getShippingAddress()->getName()) : '&nbsp;' ?></td>
            <td><?php echo $_order->formatPrice($_order->getGrandTotal()) ?></td>
            <td><em><?php echo $_order->getStatusLabel() ?></em></td>
            <td class="a-center">
                <span class="nobr"><a href="<?php echo $this->getViewUrl($_order) ?>"><?php echo $this->__('View Order') ?></a>
                    <?php /*<span class="separator">|</span><a href="<?php echo $this->getTrackUrl($_order) ?>"><?php echo $this->__('Track Order') ?></a>&nbsp;*/ ?>
                    <?php if ($this->helper('sales/reorder')->canReorder($_order)) : ?>
                    <span class="separator">|</span> <a href="<?php echo $this->getReorderUrl($_order) ?>" class="link-reorder"><?php echo $this->__('Reorder') ?></a>
                <?php endif ?>
                </span>
            </td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<script type="text/javascript">decorateTable('my-orders-table');</script>
<?php echo $this->getPagerHtml(); ?>
<?php else: ?>
    <p><?php echo $this->__('You have placed no orders.'); ?></p>
<?php endif ?>

List 的布局塊

<quotation_quote_list>
    <reference name="root">
        <action method="setTemplate"><template>page/3columns-account.phtml</template></action>
    </reference>
    <update handle="customer_account"/>
    <reference name="content">
            <block type="Quotation/Frontend_Grid" name="quotationslist" as="quotationslist" template="Quotation/List.phtml"/>
    </reference>
</quotation_quote_list>

推薦答案

我們可以通過(guò)在我們的塊類中擴(kuò)展 Mage_Catalog_Block_Product_List 類來(lái)實(shí)現(xiàn)帶有 magento 分頁(yè)的自定義模型集合.假設(shè)我想用分頁(yè)顯示用戶博客文章.以下是輕松實(shí)現(xiàn)它的步驟:

We can implement custom model collection with magento pagination by extending Mage_Catalog_Block_Product_List class in our block class. Suppose I want to display users blog posts with pagination. Here is the steps to implement it easily:

  1. 創(chuàng)建一個(gè)塊類 (posts.php) 并在其中添加以下代碼.

  1. Create a block class (posts.php) and add the below code in it.

class Blog_User_Block_Posts extends Mage_Catalog_Block_Product_List
{
    protected function _beforeToHtml()
    {
        $toolbar = $this->getToolbarBlock();
        $collection = $this->_getPostsCollection();
        $toolbar->setCollection($collection);     /*(Add toolbar to collection)*/
        return parent::_beforeToHtml();
    }
}

  • view.phptml文件中添加如下代碼

    <?php echo $this->getToolbarHtml() ?>
    

  • 這篇關(guān)于讓尋呼機(jī)顯示在 magento 列表中的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

    【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

    相關(guān)文檔推薦

    Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個(gè)表)
    How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設(shè)置?)
    Auto populate a select box using an array in PHP(使用 PHP 中的數(shù)組自動(dòng)填充選擇框)
    PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
    json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產(chǎn)生 JSON_ERROR_UTF8)
    MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
    主站蜘蛛池模板: 欧美午夜一区 | 人成精品 | 国产视频黄色 | 91精品国产91久久久久久密臀 | 久久久精品网站 | 欧美高清视频一区 | 最新日韩在线 | 在线a视频网站 | h视频免费观看 | 性欧美精品一区二区三区在线播放 | 欧美日韩国产一区 | 欧美在线观看一区二区 | 免费精品久久久久久中文字幕 | 久久久这里都是精品 | 国产三级一区二区 | 日韩手机在线看片 | 国产精品99久久久久久久vr | 日韩免费av一区二区 | 久久综合一区二区三区 | 中文字幕在线观看国产 | 殴美成人在线视频 | 午夜久久久久 | 亚洲毛片在线 | 五月天婷婷综合 | 欧美精品在线一区二区三区 | 国产精品一卡二卡三卡 | 精品乱码一区二区 | 亚洲人人舔人人 | 国产999精品久久久 精品三级在线观看 | 国产中文视频 | 一区二区三区四区电影视频在线观看 | 91精品国产色综合久久不卡98 | 久久久久国产一区二区三区不卡 | 亚洲一区日韩 | 国产成人叼嘿视频在线观看 | 亚洲精品乱码久久久久v最新版 | 亚州精品天堂中文字幕 | 国产成人综合网 | 亚洲免费成人av | 99国产精品99久久久久久粉嫩 | 丁香五月网久久综合 |