コード例 #1
0
ファイル: settings.php プロジェクト: vividweb/vivid_store
 public function view()
 {
     $this->loadFormAssets();
     $this->set("pageSelector", Core::make('helper/form/page_selector'));
     $this->set("countries", Core::make('helper/lists/countries')->getCountries());
     $this->set("states", Core::make('helper/lists/states_provinces')->getStates());
     $this->set("installedPaymentMethods", StorePaymentMethod::getMethods());
     $this->set("orderStatuses", StoreOrderStatus::getAll());
     $productPublishTarget = Config::get('vividstore.productPublishTarget');
     $this->set('productPublishTarget', $productPublishTarget);
 }
コード例 #2
0
ファイル: orders.php プロジェクト: vividweb/vivid_store
 public function view($status = '')
 {
     $orderList = new StoreOrderList();
     if ($this->get('keywords')) {
         $orderList->setSearch($this->get('keywords'));
     }
     if ($status) {
         $orderList->setStatus($status);
     }
     $orderList->setItemsPerPage(20);
     $paginator = $orderList->getPagination();
     $pagination = $paginator->renderDefaultView();
     $this->set('orderList', $paginator->getCurrentPageResults());
     $this->set('pagination', $pagination);
     $this->set('paginator', $paginator);
     $this->set('orderStatuses', StoreOrderStatus::getList());
     $this->requireAsset('css', 'vividStoreDashboard');
     $this->requireAsset('javascript', 'vividStoreFunctions');
     $this->set('statuses', StoreOrderStatus::getAll());
 }
コード例 #3
0
ファイル: settings.php プロジェクト: pvernaglia/vivid_store
 private function saveOrderStatuses($data)
 {
     if (isset($data['osID'])) {
         foreach ($data['osID'] as $key => $id) {
             $orderStatus = StoreOrderStatus::getByID($id);
             $orderStatusSettings = array('osName' => isset($data['osName'][$key]) && $data['osName'][$key] != '' ? $data['osName'][$key] : $orderStatus->getReadableHandle(), 'osInformSite' => isset($data['osInformSite'][$key]) ? 1 : 0, 'osInformCustomer' => isset($data['osInformCustomer'][$key]) ? 1 : 0, 'osSortOrder' => $key);
             $orderStatus->update($orderStatusSettings);
         }
         if (isset($data['osIsStartingStatus'])) {
             StoreOrderStatus::setNewStartingStatus(StoreOrderStatus::getByID($data['osIsStartingStatus'])->getHandle());
         } else {
             $orderStatuses = StoreOrderStatus::getAll();
             StoreOrderStatus::setNewStartingStatus($orderStatuses[0]->getHandle());
         }
     }
 }