当前位置: 首页>>代码示例>>PHP>>正文


PHP Carrier::loadData方法代码示例

本文整理汇总了PHP中Carrier::loadData方法的典型用法代码示例。如果您正苦于以下问题:PHP Carrier::loadData方法的具体用法?PHP Carrier::loadData怎么用?PHP Carrier::loadData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Carrier的用法示例。


在下文中一共展示了Carrier::loadData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: LoginedAction

 private function LoginedAction()
 {
     global $cookie, $smarty;
     if (!isset($cookie->id_cart)) {
         die('Shpping cart is empty!');
     }
     $cart = new Cart((int) $cookie->id_cart);
     $user = new User((int) $cart->id_user);
     $addresses = $user->getAddresses();
     $carriers = Carrier::loadData();
     $payments = PaymentModule::getHookPayment();
     $smarty->assign(array('cart' => $cart, 'addresses' => $addresses, 'carriers' => $carriers, 'payments' => $payments, 'products' => $cart->getProducts(), 'discount' => $cart->discount, 'total' => $cart->getProductTotal()));
 }
开发者ID:yiuked,项目名称:tmcart,代码行数:13,代码来源:CheckoutView.php

示例2: UIAdminTable

    if ($def_carrier_id = Tools::getRequest('TM_DEFAULT_CARRIER_ID')) {
        Configuration::updateValue('TM_DEFAULT_CARRIER_ID', $def_carrier_id);
    }
    if ($enjoy_freeshipping = Tools::getRequest('ENJOY_FREE_SHIPPING')) {
        Configuration::updateValue('ENJOY_FREE_SHIPPING', $enjoy_freeshipping);
    }
    echo '<div class="conf">更新成功</div>';
}
$table = new UIAdminTable('carrier', 'Carrier', 'id_carrier');
$table->header = array(array('sort' => false, 'isCheckAll' => 'itemsBox[]', 'name' => 'id_carrier'), array('name' => 'id_carrier', 'title' => 'ID', 'filter' => 'string'), array('name' => 'name', 'title' => '配送商', 'filter' => 'string'), array('sort' => false, 'name' => 'image_small', 'isImage' => true, 'title' => '图片'), array('name' => 'description', 'title' => '描述', 'filter' => 'string'), array('name' => 'shipping', 'title' => '运费', 'filter' => 'string'), array('name' => 'active', 'title' => '状态', 'filter' => 'bool'), array('sort' => false, 'title' => '操作', 'class' => 'text-right', 'isAction' => array('edit', 'delete')));
$filter = $table->initFilter();
$orderBy = isset($_GET['orderby']) ? Tools::G('orderby') : 'id_carrier';
$orderWay = isset($_GET['orderway']) ? Tools::G('orderway') : 'desc';
$limit = $cookie->getPost('pagination') ? $cookie->getPost('pagination') : '50';
$p = Tools::G('p') ? Tools::G('p') == 0 ? 1 : Tools::G('p') : 1;
$result = Carrier::loadData($p, $limit, $orderBy, $orderWay, $filter);
if (isset($errors)) {
    UIAdminAlerts::MError($errors);
}
$breadcrumb = new UIAdminBreadcrumb();
$breadcrumb->home();
$breadcrumb->add(array('title' => '物流', 'active' => true));
$bread = $breadcrumb->draw();
$btn_group = array(array('type' => 'a', 'title' => '新物流', 'href' => 'index.php?rule=carrier_edit', 'class' => 'btn-success', 'icon' => 'plus'));
echo UIViewBlock::area(array('bread' => $bread, 'btn_groups' => $btn_group), 'breadcrumb');
echo UIViewBlock::area(array('title' => '物流', 'table' => $table, 'result' => $result, 'limit' => $limit), 'table');
$form = new UIAdminEditForm('post', 'index.php?rule=carrier', 'form-horizontal', 'address-form');
$carriers = array();
foreach ($result['items'] as $car) {
    $carriers[$car['id_carrier']] = $car['name'];
}
开发者ID:yiuked,项目名称:tmcart,代码行数:31,代码来源:carrier.php


注:本文中的Carrier::loadData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。