/** * Register JS files * * @return array */ public function getJSFiles() { $list = parent::getJSFiles(); $list[] = 'button/js/shipping/edit_method.js'; $shippingMarkups = new \XLite\View\ItemsList\Model\Shipping\Markups(); $list = array_merge($list, $shippingMarkups->getJSFiles()); return $list; }
/** * Do action update * * @return void */ protected function doActionUpdate() { $this->getModelForm()->performAction('modify'); $itemsList = new \XLite\View\ItemsList\Model\Shipping\Markups(); $itemsList->processQuick(); $this->setReturnURL($this->buildURL('shipping_rates', '', array('widget' => 'XLite\\View\\Shipping\\EditMethod', 'methodId' => $this->getModelForm()->getModelObject()->getMethodId(), 'shippingZone' => \XLite\Core\Request::getInstance()->shippingZone))); $this->setInternalRedirect(); \XLite\Core\Event::updateShippingMethods(); }
/** * Register JS files * * @return array */ public function getJSFiles() { $list = parent::getJSFiles(); $list[] = 'button/js/shipping/add_method.js'; $list[] = 'shipping/add_method/controller.js'; $onlineCarrierLink = new \XLite\View\Button\Shipping\OnlineCarrier(); $list = array_merge($list, $onlineCarrierLink->getJSFiles()); $shippingTypes = new \XLite\View\Tabs\ShippingType(); $list = array_merge($list, $shippingTypes->getJSFiles()); $shippingMarkups = new \XLite\View\ItemsList\Model\Shipping\Markups(); $list = array_merge($list, $shippingMarkups->getJSFiles()); return $list; }