示例#1
0
 /**
  * definierte preisregeln ausgeben
  */
 public function listAction()
 {
     $rules = new OnlineShop_Framework_Impl_Pricing_Rule_List();
     $rules->setOrderKey('prio');
     $rules->setOrder('ASC');
     $json = array();
     foreach ($rules->load() as $rule) {
         /* @var  OnlineShop_Framework_Pricing_IRule $rule */
         if ($rule->getActive()) {
             $icon = 'plugin_onlineshop_pricing_icon_rule_' . $rule->getBehavior();
             $title = 'Verhalten: ' . $rule->getBehavior();
         } else {
             $icon = 'plugin_onlineshop_pricing_icon_rule_disabled';
             $title = 'Deaktiviert';
         }
         $json[] = array('iconCls' => $icon, 'id' => $rule->getId(), 'text' => $rule->getName(), 'qtipCfg' => array('xtype' => 'quicktip', 'title' => $rule->getLabel(), 'text' => $title));
     }
     $this->_helper->json($json);
 }
示例#2
0
文件: list.php 项目: ascertain/NGshop
                    </div>
                </div>
                <div class="form-group col-sm-2">
                    <div class="input-group">
                        <div class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></div>
                        <input type="text" class="form-control date" name="till" placeholder="<?php 
echo $this->translate('online-shop.back-office.order-list.filter-date.from');
?>
" value="<?php 
echo $this->escape($this->getParam('till'));
?>
">
                    </div>
                </div>
                <?php 
$listPricingRule = new OnlineShop_Framework_Impl_Pricing_Rule_List();
$list = $listPricingRule->load();
if (count($list) > 0) {
    ?>
                    <div class="form-group col-sm-4">
                        <div class="input-group">
                            <div class="input-group-addon"><span class="glyphicon glyphicon-tag"></span></div>
                            <select class="form-control" name="pricingRule">
                                <option value=""><?php 
    echo $this->translate('online-shop.back-office.order-list.filter-pricing-rules');
    ?>
</option>
                                <?php 
    foreach ($list as $item) {
        ?>
                                    <option value="<?php 
示例#3
0
 /**
  * @return OnlineShop_Framework_Pricing_IRule[]
  */
 public function getValidRules()
 {
     if (empty($this->rules)) {
         $rules = new OnlineShop_Framework_Impl_Pricing_Rule_List();
         $rules->setCondition('active = 1');
         $rules->setOrderKey('prio');
         $rules->setOrder('ASC');
         $this->rules = $rules->getRules();
     }
     return $this->rules;
 }