Exemplo n.º 1
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'manufacturers');
     $this->registerTask('manufacturer_enabled.enable', 'boolean');
     $this->registerTask('manufacturer_enabled.disable', 'boolean');
 }
Exemplo n.º 2
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'groups');
     $this->registerTask('selected_enable', 'selected_switch');
     $this->registerTask('selected_disable', 'selected_switch');
 }
Exemplo n.º 3
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->registerTask('enabled.enable', 'boolean');
     $this->registerTask('enabled.disable', 'boolean');
     $this->set('suffix', 'shipping');
 }
Exemplo n.º 4
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'productcomments');
     $this->registerTask('productcomment_enabled.enable', 'boolean');
     $this->registerTask('productcomment_enabled.disable', 'boolean');
 }
Exemplo n.º 5
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $app->redirect("index.php?option=com_tienda&view=countries");
     return;
 }
Exemplo n.º 6
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'currencies');
     $this->registerTask('currency_enabled.enable', 'boolean');
     $this->registerTask('currency_enabled.disable', 'boolean');
 }
Exemplo n.º 7
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'eavattributes');
     $this->registerTask('enabled.enable', 'boolean');
     $this->registerTask('enabled.disable', 'boolean');
     $this->registerTask('selected_enable', 'selected_switch');
     $this->registerTask('selected_disable', 'selected_switch');
 }
Exemplo n.º 8
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'pos');
     $this->registerTask('flag_billing', 'flag');
     $this->registerTask('flag_shipping', 'flag');
     $this->registerTask('flag_deleted', 'flag');
     $this->registerTask('deleterequests', 'deleteRequests');
 }
Exemplo n.º 9
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'shippingmethods');
     $this->registerTask('shipping_method_enabled.enable', 'boolean');
     $this->registerTask('shipping_method_enabled.disable', 'boolean');
     $this->registerTask('selected_enable', 'selected_switch');
     $this->registerTask('selected_disable', 'selected_switch');
 }
Exemplo n.º 10
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     if (!Tienda::getInstance()->get('enable_product_compare', '1')) {
         JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_tienda&view=products'), JText::_('COM_TIENDA_PRODUCT_COMPARE_DISABLED'));
         return;
     }
     $this->set('suffix', 'productcompare');
 }
Exemplo n.º 11
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'carts');
     $cart_helper = TiendaHelperBase::getInstance('Carts');
     $items = $cart_helper->getProductsInfo();
     // create the order object
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables');
     $this->_order = JTable::getInstance('Orders', 'TiendaTable');
 }
Exemplo n.º 12
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'subscriptions');
     $this->registerTask('subscription_enabled.enable', 'boolean');
     $this->registerTask('subscription_enabled.disable', 'boolean');
     $this->registerTask('lifetime_enabled.enable', 'boolean');
     $this->registerTask('lifetime_enabled.disable', 'boolean');
     $this->registerTask('update_subscription', 'update');
 }
Exemplo n.º 13
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'categories');
     $this->registerTask('category_enabled.enable', 'boolean');
     $this->registerTask('category_enabled.disable', 'boolean');
     $this->registerTask('selected_enable', 'selected_switch');
     $this->registerTask('selected_disable', 'selected_switch');
     $this->registerTask('saveprev', 'save');
     $this->registerTask('savenext', 'save');
 }
Exemplo n.º 14
0
 /**
  * constructor
  */
 function __construct()
 {
     if (empty(JFactory::getUser()->id)) {
         $url = JRoute::_("index.php?option=com_tienda&view=dashboard");
         Tienda::load("TiendaHelperUser", 'helpers.user');
         $redirect = JRoute::_(TiendaHelperUser::getUserLoginUrl($url), false);
         JFactory::getApplication()->redirect($redirect);
         return;
     }
     parent::__construct();
     $this->set('suffix', 'dashboard');
 }
Exemplo n.º 15
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'products');
     $this->registerTask('product_enabled.enable', 'boolean');
     $this->registerTask('product_enabled.disable', 'boolean');
     $this->registerTask('selected_enable', 'selected_switch');
     $this->registerTask('selected_disable', 'selected_switch');
     $this->registerTask('saveprev', 'save');
     $this->registerTask('savenext', 'save');
     $this->registerTask('prev', 'jump');
     $this->registerTask('next', 'jump');
 }
Exemplo n.º 16
0
 /**
  * constructor
  */
 function __construct()
 {
     if (empty(JFactory::getUser()->id)) {
         $url = JRoute::_("index.php?option=com_tienda&view=addresses");
         Tienda::load("TiendaHelperUser", 'helpers.user');
         $redirect = JRoute::_(TiendaHelperUser::getUserLoginUrl($url), false);
         JFactory::getApplication()->redirect($redirect);
         return;
     }
     parent::__construct();
     $this->set('suffix', 'addresses');
     $this->registerTask('flag_billing', 'flag');
     $this->registerTask('flag_shipping', 'flag');
     $this->registerTask('flag_deleted', 'flag');
 }
Exemplo n.º 17
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'wishlists');
     $user = JFactory::getUser();
     if (empty($user->id)) {
         // redirect to login
         Tienda::load("TiendaHelperRoute", 'helpers.route');
         $router = new TiendaHelperRoute();
         $url = JRoute::_("index.php?option=com_tienda&view=wishlists&Itemid=" . $router->findItemid(array('view' => 'wishlists')), false);
         Tienda::load("TiendaHelperUser", 'helpers.user');
         $redirect = JRoute::_(TiendaHelperUser::getUserLoginUrl($url), false);
         JFactory::getApplication()->redirect($redirect);
         return;
     }
 }
Exemplo n.º 18
0
 /**
  * constructor
  */
 function __construct()
 {
     if (empty(JFactory::getUser()->id)) {
         $url = JRoute::_("index.php?option=com_tienda&view=orders");
         Tienda::load("TiendaHelperUser", 'helpers.user');
         $redirect = JRoute::_(TiendaHelperUser::getUserLoginUrl($url), false);
         JFactory::getApplication()->redirect($redirect);
         return;
     }
     parent::__construct();
     $this->set('suffix', 'subscriptions');
     $this->registerTask('subscription_enabled.enable', 'boolean');
     $this->registerTask('subscription_enabled.disable', 'boolean');
     $this->registerTask('lifetime_enabled.enable', 'boolean');
     $this->registerTask('lifetime_enabled.disable', 'boolean');
     $this->registerTask('update_subscription', 'update');
 }
Exemplo n.º 19
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'orders');
     $this->registerTask('edit', 'view');
     $this->registerTask('prev', 'jump');
     $this->registerTask('next', 'jump');
     $this->registerTask('print', 'view');
     $this->registerTask('new', 'selectUser');
     $this->registerTask('add', 'selectUser');
     $this->registerTask('update_status', 'updateStatus');
     $this->registerTask('resend_email', 'resendEmail');
     // create the order object
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables');
     $this->_order = JTable::getInstance('Orders', 'TiendaTable');
     $this->initial_order_state = Tienda::getInstance()->get('pending_order_state', '1');
     //pending
 }
Exemplo n.º 20
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'addresses');
 }
Exemplo n.º 21
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'tools');
 }
Exemplo n.º 22
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 23
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'manufacturers');
 }
Exemplo n.º 24
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     if (!$this->defines->get('shop_enabled', '1')) {
         JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_tienda&view=products'), JText::_('COM_TIENDA_CHECKOUT_DISABLED'));
         return;
     }
     // get the items and add them to the order
     Tienda::load("TiendaHelperBase", 'helpers._base');
     $cart_helper = TiendaHelperBase::getInstance('Carts');
     $items = $cart_helper->getProductsInfo();
     $task = strtolower(JRequest::getVar('task'));
     if (empty($items) && $task != 'confirmpayment' && $task != 'poscheckout') {
         JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_tienda&view=products'), JText::_('COM_TIENDA_YOUR_CART_IS_EMPTY'));
         return;
     }
     if ($this->defines->get('one_page_checkout', '0')) {
         $this->onepage_checkout = true;
         $this->one_page_checkout_layout = $this->defines->get('one_page_checkout_layout', 'standard');
     }
     $uri = JFactory::getURI();
     $view = JRequest::getVar('view');
     // For now, make this redirect only when the Standard layout is chosen.  Remove this when the new OPC MVC handles all layouts
     // also, do not make this redirect, if POS checkout is in work
     if ($this->onepage_checkout && $this->one_page_checkout_layout == 'standard' && $view != 'opc' && $task != 'poscheckout' && $task != 'confirmpayment') {
         $method = JRequest::getMethod();
         if ($method == 'POST') {
             // Don't redirect if this is POST
         } else {
             $itemid = $this->router->findItemid(array('view' => 'opc'));
             if (empty($itemid)) {
                 $itemid = $this->router->findItemid(array('view' => 'checkout'));
                 if (empty($itemid)) {
                     $itemid = JRequest::getInt('Itemid');
                 }
             }
             JFactory::getApplication()->redirect(JRoute::_("index.php?option=com_tienda&view=opc&Itemid=" . $itemid));
             return;
         }
     }
     if ($this->defines->get('force_ssl_checkout') && $uri->isSSL() == false) {
         $post = JRequest::get('post');
         if (is_array($post) && !empty($post)) {
             // Don't redirect if this is POST
         } else {
             $uri->setScheme('https');
             JFactory::getApplication()->redirect($uri->toString());
             return;
         }
     }
     $this->set('suffix', 'checkout');
     // create the order object
     JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables');
     $this->_order = JTable::getInstance('Orders', 'TiendaTable');
     // set userid
     if (!$this->_order->user_id && !$this->user->guest) {
         $this->_order->user_id = $this->user->id;
     }
     $this->defaultShippingMethod = $this->defines->get('defaultShippingMethod', '2');
     $this->initial_order_state = $this->defines->get('initial_order_state', '15');
     // Default Steps
     $this->steps = array('COM_TIENDA_STEP_SELECTSHIPPINGMETHOD', 'COM_TIENDA_STEP_SELECTPAYMENTMETHOD', 'COM_TIENDA_STEP_REVIEWORDER', 'COM_TIENDA_STEP_CHECKOUTRESULTS');
     $this->current_step = 0;
     JModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/models');
     $countries_model = JModel::getInstance('Countries', 'TiendaModel');
     $this->default_country = $countries_model->getDefault();
     $this->default_country_id = $this->default_country->country_id;
 }
Exemplo n.º 25
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'config');
 }
Exemplo n.º 26
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'reports');
 }
Exemplo n.º 27
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'zonerelations');
 }
Exemplo n.º 28
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'productissues');
 }
Exemplo n.º 29
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'orderpayments');
 }
Exemplo n.º 30
0
 /**
  * constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->set('suffix', 'taxclasses');
 }