Exemple #1
0
 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);
 }
Exemple #2
0
 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());
 }
Exemple #3
0
 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());
         }
     }
 }