Пример #1
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $zoneHelper = new zoneHelper();
     // Check whether view is accessible to user
     if (!$zoneHelper->isUserAccessible()) {
         return;
     }
     $app = JFactory::getApplication();
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = $app->getParams('com_quick2cart');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         throw new Exception(implode("\n", $errors));
     }
     // Get user store list
     $storeHelper = new storeHelper();
     // Get all stores.
     $user = JFactory::getUser();
     $this->userStores = $storeHelper->getUserStore($user->id);
     // Get toolbar path
     $comquick2cartHelper = new comquick2cartHelper();
     $this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
     // Publish states
     $this->publish_states = array('' => JText::_('JOPTION_SELECT_PUBLISHED'), '1' => JText::_('JPUBLISHED'), '0' => JText::_('JUNPUBLISHED'));
     // Setup TJ toolbar
     $this->addTJtoolbar();
     $this->_prepareDocument();
     parent::display($tpl);
 }
Пример #2
0
 function onDisplayField(&$field, &$item)
 {
     // print_r($item->id);die;
     // execute the code only if the field type match the plugin type
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     $field->label = JText::_($field->label);
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart', JPATH_ADMINISTRATOR);
     // for copying the the item title to q2c Item Name
     JRequest::setVar("qtc_article_name", $item->title);
     JHtml::_('behavior.modal', 'a.modal');
     $html = '';
     $client = "com_flexicontent";
     $input = JFactory::getApplication()->input;
     $pid = $item->id;
     // CHECK for view override
     $comquick2cartHelper = new comquick2cartHelper();
     $path = $comquick2cartHelper->getViewpath('attributes', '', "ADMIN", "SITE");
     ob_start();
     include $path;
     $field->html = ob_get_contents();
     ob_end_clean();
 }
Пример #3
0
 function getInput()
 {
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart', JPATH_ADMINISTRATOR);
     $fieldName = $this->fieldname;
     JHtml::_('behavior.modal', 'a.modal');
     $html = '';
     $client = "com_content";
     $jinput = JFactory::getApplication()->input;
     // $pid=$jinput->get('id');
     $isAdmin = JFactory::getApplication()->isAdmin();
     if (!$isAdmin) {
         $pid = $jinput->get('a_id');
     } else {
         $pid = $jinput->get('id');
     }
     // CHECK for view override
     $comquick2cartHelper = new comquick2cartHelper();
     $path = $comquick2cartHelper->getViewpath('attributes', '', "ADMIN", "SITE");
     ob_start();
     include $path;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
Пример #4
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = JComponentHelper::getParams('com_quick2cart');
     // Check for errors.
     $errors = $this->get('Errors');
     if (count($errors)) {
         throw new Exception(implode("\n", $errors));
     }
     // Creating status filter.
     $statuses = array();
     $statuses[] = JHtml::_('select.option', '', JText::_('COM_QUICK2CART_SELONE'));
     $statuses[] = JHtml::_('select.option', 1, JText::_('COM_QUICK2CART_PUBLISH'));
     $statuses[] = JHtml::_('select.option', 0, JText::_('COM_QUICK2CART_UNPUBLISH'));
     $this->statuses = $statuses;
     // Get itemid
     $comquick2cartHelper = new comquick2cartHelper();
     $this->createstore_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=vendor&layout=createstore');
     // Get toolbar path
     $this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
     // Get other vars
     $storeHelper = new storeHelper();
     $this->allowToCreateStore = $storeHelper->isAllowedToCreateNewStore();
     // Setup toolbar
     $this->addTJtoolbar();
     $this->_prepareDocument();
     parent::display($tpl);
 }
Пример #5
0
    /**
     * Display the view
     *
     * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
     *
     * @return  void
     */
    public function display($tpl = null)
    {
        $app = JFactory::getApplication();
        $user = JFactory::getUser();
        if (!$user->id) {
            ?>
			<div class="<?php 
            echo Q2C_WRAPPER_CLASS;
            ?>
 my-coupons">
				<div class="well" >
					<div class="alert alert-error">
						<span><?php 
            echo JText::_('QTC_LOGIN');
            ?>
</span>
					</div>
				</div>
			</div>

			<?php 
            return false;
        }
        $zoneHelper = new zoneHelper();
        // Check whether view is accessible to user
        if (!$zoneHelper->isUserAccessible()) {
            return;
        }
        $this->state = $this->get('State');
        $this->items = $this->get('Items');
        $this->pagination = $this->get('Pagination');
        $this->params = $app->getParams('com_quick2cart');
        // Check for errors.
        if (count($errors = $this->get('Errors'))) {
            throw new Exception(implode("\n", $errors));
        }
        $this->publish_states = array('' => JText::_('JOPTION_SELECT_PUBLISHED'), '1' => JText::_('JPUBLISHED'), '0' => JText::_('JUNPUBLISHED'));
        // Get toolbar path
        $comquick2cartHelper = new comquick2cartHelper();
        $this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
        // get store id (list))from model and pass to  getManagecoupon()
        $this->store_role_list = $store_role_list = $comquick2cartHelper->getStoreIds();
        if ($this->store_role_list) {
            $this->store_id = $store_id = !empty($change_storeto) ? $change_storeto : $store_role_list[0]['store_id'];
            $this->selected_store = $store_id;
            if ($this->store_id) {
                //$this->authorized_store_id= storeid of user
                $this->authorized_store_id = $authorized_store_id = $comquick2cartHelper->createCouponAuthority($store_id);
            }
        }
        // Setup TJ toolbar
        $this->addTJtoolbar();
        $this->_prepareDocument();
        parent::display($tpl);
    }
Пример #6
0
 function fetchElement($name, $value, $node, $control_name)
 {
     $input = JFactory::getApplication()->input;
     $option = $input->get('option', '');
     if ($option != 'com_k2') {
         return;
     }
     jimport('joomla.filesystem.file');
     if (!JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
         return true;
     }
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart', JPATH_ADMINISTRATOR);
     JHtml::_('behavior.modal', 'a.modal');
     $html = '';
     $client = "com_k2";
     $pid = JRequest::getInt('cid');
     // if($pid) {
     /* prefill k2 title */
     $db = JFactory::getDBO();
     $q = "SELECT `title` FROM `#__k2_items` WHERE `id` =" . (int) $pid;
     $db->setQuery($q);
     $k2item = $db->loadResult();
     $jinput = JFactory::getApplication()->input;
     $jinput->set('qtc_article_name', $k2item);
     /* prefill k2 title */
     if (!class_exists('comquick2cartHelper')) {
         // Require_once $path;
         $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
         JLoader::register('comquick2cartHelper', $path);
         JLoader::load('comquick2cartHelper');
     }
     $comquick2cartHelper = new comquick2cartHelper();
     $path = $comquick2cartHelper->getViewpath('attributes', '', "ADMIN", "SITE");
     ob_start();
     include $path;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
Пример #7
0
<?php

// No direct access to this file
defined('_JEXEC') or die;
$lang = JFactory::getLanguage();
$lang->load('com_quick2cart', JPATH_ADMINISTRATOR);
JHTML::_('behavior.modal', 'a.modal');
$html = '';
$client = "com_zoo";
$jinput = JFactory::getApplication()->input;
$itemid = $jinput->get('cid', array(), "ARRAY");
$pid = $itemid[0];
// load helper file if not exist
if (!class_exists('comquick2cartHelper')) {
    // require_once $path;
    $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
    JLoader::register('comquick2cartHelper', $path);
    JLoader::load('comquick2cartHelper');
}
$comquick2cartHelper = new comquick2cartHelper();
$path = $comquick2cartHelper->getViewpath('attributes', '', "ADMIN", "SITE");
ob_start();
include $path;
$html = ob_get_contents();
ob_end_clean();
echo $html;
Пример #8
0
if (!empty($mediaDetail)) {
    $mediaDetail[] = $mediaDetail[0];
}
for ($m = 1; $m <= $mediaCount + 1 && $m < $eProdMaxFileLimit + 1; $m++) {
    $attribute_container_id = "qtc_mediaContainer" . $m;
    ?>
				<div id=<?php 
    echo $attribute_container_id;
    ?>
 class="qtc_mediaContainer ">
					<div class="com_qtc_media_repeat_block well well-small span10">

						<?php 
    // CHECK for view override
    $comquick2cartHelper = new comquick2cartHelper();
    $att_list_path = $comquick2cartHelper->getViewpath('product', 'media', "SITE", "SITE");
    ob_start();
    include $att_list_path;
    $html_attri = ob_get_contents();
    ob_end_clean();
    echo $html_attri;
    ?>

					</div>
					<?php 
    ?>
					<div class='span1'>
						<button class='btn btn-mini' type='button' id='remove<?php 
    echo $m;
    ?>
'
Пример #9
0
 /**
  * public function to build Invoice HTML & send it to buyer
  *
  * @param   INTEGER  $order_id   order_id
  * @param   STRING   $status     status
  * @param   STRING   $comment    comment
  * @param   INTEGER  $send_mail  send_mail
  * @param   INTEGER  $store_id   store_id
  *
  * @return  boolean
  */
 public function sendInvoice($order_id, $status, $comment = '', $send_mail = 1, $store_id = 0)
 {
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $params = JComponentHelper::getParams('com_quick2cart');
     $comquick2cartHelper = new comquick2cartHelper();
     // Load language file as require from backend add product.
     JFactory::getLanguage()->load('com_quick2cart', JPATH_SITE);
     // START Q2C Sample development
     $query = "SELECT o.* FROM #__kart_orders as o WHERE o.id =" . $order_id;
     $db->setQuery($query);
     $orderobj = $db->loadObject();
     // $adminemails = comquick2cartHelper::adminMails();
     $query = "SELECT ou.user_id,ou.user_email,ou.firstname FROM #__kart_users as ou WHERE ou.address_type='BT' AND ou.order_id = " . $order_id;
     $db->setQuery($query);
     $orderuser = $db->loadObjectList();
     // Change for backward compatiblity for user info not saving order id against it
     if (empty($orderuser)) {
         $query = "SELECT ou.user_id,ou.user_email,ou.firstname\n\t\tFROM #__kart_users as ou\n\t\tWHERE ou.address_type='BT' AND ou.order_id IS NULL AND ou.user_id = (SELECT o.user_info_id FROM #__kart_orders as o WHERE o.id =" . $order_id . ")";
         $db->setQuery($query);
         $orderuser = $db->loadObjectList();
     }
     $orderuser = $orderuser[0];
     $jinput = JFactory::getApplication()->input;
     $jinput->set('orderid', $order_id);
     $order = $order_bk = $comquick2cartHelper->getorderinfo($order_id);
     $this->orderinfo = $order['order_info'];
     $this->orderitems = $order['items'];
     $this->orders_site = 1;
     $this->orders_email = 1;
     $this->order_authorized = 1;
     if ($this->orderinfo[0]->address_type == 'BT') {
         $billemail = $this->orderinfo[0]->user_email;
     } elseif ($this->orderinfo[1]->address_type == 'BT') {
         $billemail = $this->orderinfo[1]->user_email;
     }
     $fullorder_id = $order['order_info'][0]->prefix . $order_id;
     if (!JFactory::getUser()->id && $params->get('guest')) {
         $jinput->set('email', md5($billemail));
         $this->calledFromOnePageCkout = 1;
     }
     // Check for view override
     $view = $comquick2cartHelper->getViewpath('orders', 'invoice');
     ob_start();
     include $view;
     $invoicehtml = ob_get_contents();
     ob_end_clean();
     $fullorder_id = $orderobj->prefix . $order_id;
     if (!empty($store_id)) {
         $productStatus = $comquick2cartHelper->getProductStatus($order_id);
         $body = JText::sprintf('QTC_STORE_PRODUCT_STATUS_CHANGE_BODY', $productStatus);
     } else {
         $body = JText::_('COM_QUICK2CART_INVOICE_BODY');
     }
     $site = $mainframe->getCfg('sitename');
     if ($comment) {
         $comment = str_replace('{COMMENT}', $comment, JText::_('QTC_COMMENT_TEXT'));
         $find = array('{ORDERNO}', '{STATUS}', '{SITENAME}', '{NAME}', '{COMMENTTEXT}');
         $replace = array($fullorder_id, JText::_('QTC_CONFR'), $site, $orderuser->firstname, $comment);
     } else {
         $find = array('{ORDERNO}', '{STATUS}', '{SITENAME}', '{NAME}', '{COMMENTTEXT}');
         $replace = array($fullorder_id, JText::_('QTC_CONFR'), $site, $orderuser->firstname, '');
     }
     $body = str_replace($find, $replace, $body);
     $guest_email = '';
     if (!$orderuser->user_id && $params->get('guest')) {
         $guest_email = "&email=" . md5($orderuser->user_email);
     }
     $Itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=orders');
     $tempLink = JRoute::_('index.php?option=com_quick2cart&view=orders&layout=order' . $guest_email . '&orderid=' . $order_id . '&Itemid=' . $Itemid);
     $link = JUri::root() . substr($tempLink, strlen(JUri::base(true)) + 1);
     $order_link = '<a href="' . $link . '">' . JText::_('QTC_ORDER_GUEST_LINK') . '</a>';
     $body = str_replace('{LINK}', $order_link, $body);
     $body = nl2br($body);
     // GETTING BODY AND MAIL SUBJECT
     if (!empty($invoicehtml)) {
         $body = $body . '<div>' . JText::_('QTC_ORDER_INVOICE_IN_MAIL') . '</div>';
         $body = $body . $invoicehtml;
         $subject = JText::sprintf('QTC_INVOICE_MAIL_SUB', $site, $fullorder_id);
     } else {
         $subject = JText::sprintf('QTC_STATUS_CHANGE_SUBJECT', $fullorder_id);
     }
     // Call the plugin and get the result
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('system');
     $result = $dispatcher->trigger('OnBeforeq2cOrderUpdateEmail', array($orderobj, $subject, $body));
     if (!empty($result[0])) {
         $subject = $result[0][0];
         $body = $result[0][1];
     }
     //print $body; die;
     // Send mail
     $comquick2cartHelper->sendmail($orderuser->user_email, $subject, $body, $params->get('sale_mail'));
 }
Пример #10
0
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @author      Techjoomla <*****@*****.**> - http://techjoomla.com
 */
// no direct access
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.modal');
$comquick2cartHelper = new comquick2cartHelper();
?>

<div class="<?php 
echo Q2C_WRAPPER_CLASS;
?>
">
	<form id="adminForm" name="adminForm"   method="post" class="form-validate" enctype="multipart/form-data">
		<?php 
$actionViewName = 'shipprofile';
$actionControllerName = 'shipprofile';
$formName = 'adminForm';
// Check for view override
$att_list_path = $comquick2cartHelper->getViewpath('shipprofileform', 'shipprofiledata', "ADMINISTRATOR", "SITE");
ob_start();
include $att_list_path;
$item_options = ob_get_contents();
ob_end_clean();
echo $item_options;
?>
	</form>

</div>
Пример #11
0
    array_unshift($this->allAttribues, $this->allAttribues[0]);
    //$this->allAttribues[] = $this->allAttribues[0];
}
for ($i = 1; $i <= $count; $i++) {
    $attribute_container_id = "qtc_container" . $i;
    ?>
				<div id=<?php 
    echo $attribute_container_id;
    ?>
 class="qtc_container">
					<div class="com_qtc_repeating_block well well-small span10">

						<?php 
    // CHECK for view override
    $comquick2cartHelper = new comquick2cartHelper();
    $att_list_path = $comquick2cartHelper->getViewpath('products', 'attribute2', "ADMINISTRATOR", "ADMINISTRATOR");
    ob_start();
    include $att_list_path;
    $html_attri = ob_get_contents();
    ob_end_clean();
    echo $html_attri;
    ?>

					</div>
					<?php 
    ?>
					<div class='com_qtc_remove_button pull-left'>
						<button class='btn btn-mini' type='button' id='remove<?php 
    echo $i;
    ?>
'
Пример #12
0
				<!-- START ::for store info  -->
				<?php 
if (!empty($this->storeDetailInfo)) {
    $sinfo = $this->storeDetailInfo;
}
?>

				<legend align="center">
					<?php 
echo JText::sprintf('QTC_WECOME_TO_STORE', $sinfo['title']);
?>
				</legend>

				<?php 
if (empty($this->change_prod_cat)) {
    $view = $comquick2cartHelper->getViewpath('vendor', 'storeinfo');
    ob_start();
    include $view;
    $html = ob_get_contents();
    ob_end_clean();
    echo $html;
}
?>
				<!-- END ::for store info  -->

				<?php 
// featured prod and top seller should be shown only if categoty is not selected
if (empty($this->change_prod_cat)) {
    ?>
					<!-- START ::for featured product  -->
					<?php 
Пример #13
0
        require_once $att_list_path;
        $html_attri = ob_get_contents();
        ob_end_clean();
        echo $html_attri;
        ?>
				</div>

				<div class="">
						<label ><strong><?php 
        echo JText::_('QTC_CCK_MEDIA_LIST_DETAILS');
        ?>
</strong></label>
				<?php 
        // CHECK for medialist override
        $comquick2cartHelper = new comquick2cartHelper();
        $att_list_path = $comquick2cartHelper->getViewpath('attributes', 'media_list', "SITE", "SITE");
        $html_attri = '';
        ob_start();
        require_once $att_list_path;
        $html_attri = ob_get_contents();
        ob_end_clean();
        echo $html_attri;
        ?>
				</div>
				<?php 
    }
    ?>
		</div>
		<?php 
}
?>
Пример #14
0
 function display($tpl = null)
 {
     $comquick2cartHelper = new comquick2cartHelper();
     $app = JFactory::getApplication();
     $this->params = $app->getParams('com_quick2cart');
     $zoneHelper = new zoneHelper();
     // Check whether view is accessible to user
     if (!$zoneHelper->isUserAccessible()) {
         return;
     }
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $option = 'com_quick2cart';
     $nameSpace = 'com_quick2cart.shipping';
     $task = $jinput->get('task');
     $view = $jinput->get('view', '');
     $layout = $jinput->get('layout', 'default');
     // Get other vars
     $this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
     if ($layout == 'default') {
         // Display list of pluigns
         $filter_order = $mainframe->getUserStateFromRequest($nameSpace . 'filter_order', 'filter_order', 'tbl.id', 'cmd');
         $filter_order_Dir = $mainframe->getUserStateFromRequest($nameSpace . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
         $filter_orderstate = $mainframe->getUserStateFromRequest($nameSpace . 'filter_orderstate', 'filter_orderstate', '', 'string');
         $filter_name = $mainframe->getUserStateFromRequest($nameSpace . 'filter_name', 'filter_name', 'tbl.name', 'cmd');
         $search = $mainframe->getUserStateFromRequest($nameSpace . 'search', 'search', '', 'string');
         if (strpos($search, '"') !== false) {
             $search = str_replace(array('=', '<'), '', $search);
         }
         $search = JString::strtolower($search);
         $model = $this->getModel('shipping');
         // Get data from the model
         $items = $this->get('Items');
         $total = $model->getTotal();
         $pagination = $model->getPagination();
         if (count($items) == 1) {
             // If there is only one plug then redirct to that shipping view
             $extension_id = $items[0]->extension_id;
             $this->form = '';
             if ($extension_id) {
                 $this->form = $this->getShipPluginForm($extension_id);
                 $plugConfigLink = "index.php?option=com_quick2cart&task=shipping.getShipView&extension_id=" . $extension_id;
                 $CpItemid = $comquick2cartHelper->getItemId('index.php?option=com_quick2cart&view=vendor&layout=cp');
                 $redirect = JRoute::_($plugConfigLink . '&Itemid=' . $itemid, false);
                 $app->redirect($redirect);
             }
         }
         // table ordering
         $lists['order_Dir'] = $filter_order_Dir;
         $lists['order'] = $filter_order;
         $lists['filter_name'] = $filter_name;
         // search filter
         $lists['search'] = $search;
         $this->assignRef('lists', $lists);
         $this->assignRef('items', $items);
         $this->assignRef('pagination', $pagination);
     } elseif ($layout == 'list') {
         $this->form = '';
         $extension_id = $jinput->get('extension_id');
         if ($extension_id) {
             $this->form = $this->getShipPluginForm($extension_id);
         }
     }
     //JToolBarHelper::title(JText::_('COM_QUICK2CART_SHIPM_SHIPPING_METHODS','quick2cart-logo');
     //JToolBarHelper::title(JText::_('COM_QUICK2CART_SHIPM_SHIPPING_METHODS'));
     parent::display($tpl);
 }
Пример #15
0
    //$this->allAttribues[] = $this->allAttribues[0];
    array_unshift($this->allAttribues, $this->allAttribues[0]);
}
for ($i = 1; $i <= $count; $i++) {
    $attribute_container_id = "qtc_container" . $i;
    ?>
				<div id=<?php 
    echo $attribute_container_id;
    ?>
 class="qtc_container">
					<div class="com_qtc_repeating_block well well-small span10">

						<?php 
    // CHECK for view override
    $comquick2cartHelper = new comquick2cartHelper();
    $att_list_path = $comquick2cartHelper->getViewpath('product', 'attribute2', "SITE", "SITE");
    ob_start();
    include $att_list_path;
    $html_attri = ob_get_contents();
    ob_end_clean();
    echo $html_attri;
    ?>

					</div>
					<?php 
    ?>
					<div class='com_qtc_remove_button pull-left span1'>
						<button class='btn btn-mini' type='button' id='remove<?php 
    echo $i;
    ?>
'
Пример #16
0
/**
 * @version    SVN: <svn_id>
 * @package    Quick2cart
 * @author     Techjoomla <*****@*****.**>
 * @copyright  Copyright (c) 2009-2015 TechJoomla. All rights reserved.
 * @license    GNU General Public License version 2 or later.
 */
// No direct access.
defined('_JEXEC') or die;
$path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
//require_once $path;
JLoader::register('comquick2cartHelper', $path);
JLoader::load('comquick2cartHelper');
$comquick2cartHelper = new comquick2cartHelper();
$view = $comquick2cartHelper->getViewpath('category', 'categorylist');
$qtc_mod_scroll_height = $params->get('scroll_height');
?>
	<div class="techjoomla-bootstrap <?php 
echo $params->get('moduleclass_sfx');
?>
" >
		<div class="row-fluid">
<?php 
ob_start();
include $view;
$html = ob_get_contents();
ob_end_clean();
echo $html;
?>
Пример #17
0
 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->params = JComponentHelper::getParams('com_quick2cart');
     $user = JFactory::getUser();
     $this->logged_userid = $user->id;
     // Check for errors.
     $errors = $this->get('Errors');
     if (count($errors)) {
         throw new Exception(implode("\n", $errors));
     }
     $jinput = JFactory::getApplication()->input;
     $layout = $jinput->get('layout', 'default', 'STRING');
     $option = $jinput->get('option', '', 'STRING');
     $storeOwner = $jinput->get('qtcStoreOwner', 0, 'INTEGER');
     $comquick2cartHelper = new comquick2cartHelper();
     //$client='com_quick2cart';
     //$client='*';
     //$products = $model->getProducts($client);
     //Get all stores.
     $this->store_details = $comquick2cartHelper->getAllStoreDetails();
     $this->categoryPage = 1;
     global $mainframe;
     $mainframe = JFactory::getApplication();
     $model = $this->getModel('category');
     //store_id is changed from  STORE view
     $change_storeto = $mainframe->getUserStateFromRequest('$option.current_store', 'current_store', '', 'INTEGER');
     $storeOwner = $jinput->get('qtcStoreOwner', 0, 'INTEGER');
     // FOR STORE OWNER
     if (!empty($storeOwner)) {
         $storehelper = new storehelper();
         $change_storeto = $storehelper->isVendorsStoreId($change_storeto);
     }
     $this->change_prod_cat = $mainframe->getUserStateFromRequest('prod_cat', 'prod_cat', '0', 'INTEGER');
     //vm: #25029
     $this->change_prod_cat = $jinput->get('prod_cat', 0, 'INTEGER');
     // retrun store_id,role etc with order by role,store_id
     $this->store_role_list = $store_role_list = $comquick2cartHelper->getStoreIds();
     $this->store_list = array();
     foreach ($this->store_role_list as $store) {
         $this->store_list[] = $store['store_id'];
     }
     //$this->products = $model->getAllProducts();
     $this->products = $this->items = $this->get('Items');
     //$mainframe->setUserState('$option.current_store', '0');  // VM:commentted  for store owner product view
     // when chage store,get latest storeid otherwise( on first load) set first storeid as default
     $this->store_id = $store_id = !empty($change_storeto) ? $change_storeto : '';
     //$store_role_list[0]['store_id'];
     $pagination = $model->getPagination();
     // ALL FETCH ALL CATEGORIES
     $this->cats = $comquick2cartHelper->getQ2cCatsJoomla($this->change_prod_cat);
     $this->pagination = $pagination;
     //Added by Sneha
     $filter_state = $mainframe->getUserStateFromRequest($option . 'search_list', 'search_list', '', 'string');
     $lists['search_list'] = $filter_state;
     $this->assignRef('lists', $lists);
     //End added by Sneha
     $this->_setToolBar();
     // Get toolbar path
     $this->toolbar_view_path = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
     if ($layout == 'my') {
         if (!$this->logged_userid) {
             $msg = JText::_('QTC_LOGIN');
             $uri = JFactory::getApplication()->input->get('REQUEST_URI', '', 'server', 'string');
             $url = base64_encode($uri);
             $mainframe->redirect(JRoute::_('index.php?option=com_users&view=login&return=' . $url), $msg);
         }
         // Creating status filter.
         $statuses = array();
         $statuses[] = JHtml::_('select.option', '', JText::_('COM_QUICK2CART_SELONE'));
         $statuses[] = JHtml::_('select.option', 1, JText::_('COM_QUICK2CART_PUBLISH'));
         $statuses[] = JHtml::_('select.option', 0, JText::_('COM_QUICK2CART_UNPUBLISH'));
         $this->statuses = $statuses;
         // Setup toolbar
         $this->addTJtoolbar();
     }
     $this->_prepareDocument();
     parent::display($tpl);
 }
Пример #18
0
	<?php 
    return;
}
?>

<div class='<?php 
echo $strapperClass;
?>
 qtc_addInvalidate_border qtc_addProduct' >
	<form name="qtcAddProdForm" id="qtcAddProdForm" class="form-validate form-horizontal"
		method="post" enctype="multipart/form-data" onSubmit="return myValidate(this);" >

		<?php 
$active = 'add_product';
$comquick2cartHelper = new comquick2cartHelper();
$view = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
ob_start();
include $view;
$html = ob_get_contents();
ob_end_clean();
echo $html;
?>

		<?php 
if (!$this->store_id) {
    ?>
				<div class="alert alert-error">
					<button type="button" class="close" data-dismiss="alert"></button>
					<?php 
    echo JText::_('QTC_NO_STORE');
    ?>
Пример #19
0
<?php

/**
 * @version    SVN: <svn_id>
 * @package    Quick2cart
 * @author     Techjoomla <*****@*****.**>
 * @copyright  Copyright (c) 2009-2015 TechJoomla. All rights reserved.
 * @license    GNU General Public License version 2 or later.
 */
// No direct access
defined('_JEXEC') or die;
$lang = JFactory::getLanguage();
$lang->load('com_quick2cart', JPATH_SITE);
$comquick2cartHelper = new comquick2cartHelper();
$path = $comquick2cartHelper->getViewpath('vendor', 'createstore', 'ADMINISTRATOR', 'SITE');
ob_start();
include $path;
$html = ob_get_contents();
ob_end_clean();
echo $html;
return;
Пример #20
0
						<li id="taxshipTabId" class="">
							<a href="#taxshipTab" data-toggle="tab"><?php 
        echo JText::_("COM_QUICK2CART_TAX_ND_SHIPPING_TAB");
        ?>
</a>
						</li>
						<?php 
    }
    ?>
				</ul>

				<div class="tab-content">
					<div class="tab-pane active" id="qtctab1">
						<?php 
    // Check for view override
    $att_list_path = $comquick2cartHelper->getViewpath('products', 'options', "ADMINISTRATOR", "ADMINISTRATOR");
    ob_start();
    include $att_list_path;
    $item_options = ob_get_contents();
    ob_end_clean();
    echo $item_options;
    ?>
					</div>
					<!-- tab 1 end -->

					<div class="tab-pane" id="qtctab2">
						<?php 
    // Check for view override
    $att_list_path = $comquick2cartHelper->getViewpath('products', 'attribute', "ADMINISTRATOR", "ADMINISTRATOR");
    ob_start();
    include $att_list_path;
Пример #21
0
 /**
  * Method to give available shipping mehtods item.
  *
  * @param   object  $itemWiseShipDetail  item_id shipping details .
  *
  * @since   2.2
  * @return   null
  */
 public function getShipMethodHtml($itemWiseShipDetail)
 {
     $comquick2cartHelper = new comquick2cartHelper();
     $path = $comquick2cartHelper->getViewpath('cartcheckout', 'default_shipmethods');
     ob_start();
     include $path;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
Пример #22
0
 function updatestatus($order_id, $status, $comment = '', $send_mail = 1, $store_id = 0)
 {
     global $mainframe;
     $params = JComponentHelper::getParams('com_quick2cart');
     $comquick2cartHelper = new comquick2cartHelper();
     switch ($status) {
         case 'C':
             /// to reduce stock
             $usestock = $params->get('usestock');
             $outofstock_allowship = $params->get('outofstock_allowship');
             if ($usestock == 1) {
                 $comquick2cartHelper->updateItemStock($order_id);
             }
             $comquick2cartHelper->updateStoreFee($order_id);
     }
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     if ($send_mail == 1) {
         if (!empty($store_id)) {
             $query = 'SELECT o.status FROM `#__kart_order_item` as o WHERE o.order_id =' . $order_id . ' AND o.`store_id`=' . $store_id . ' order by `order_item_id`';
             //die(" work is in progress(store product status change) die in helper ");
         } else {
             $query = "SELECT o.status FROM #__kart_orders as o WHERE o.id =" . $order_id;
         }
         $db->setQuery($query);
         $order_oldstatus = $db->loadResult();
     }
     $res = new stdClass();
     // UPDATING STORE ORDER CHANGES
     if (!empty($store_id)) {
         // change ORDER_ITEM STATUS// here i want order_item_id to update status of all order item releated to store
         $isOrderStatusChanged = $comquick2cartHelper->updateOrderItemStatus($order_id, $store_id, $status);
         if (empty($isOrderStatusChanged)) {
             //	return ;
         }
     } else {
         // IF admin changes ORDER status
         $res->status = $status;
         $res->id = $order_id;
         if (!$db->updateObject('#__kart_orders', $res, 'id')) {
             return 2;
         }
         $isOrderStatusChanged = $comquick2cartHelper->updateOrderItemStatus($order_id, 0, $status);
         // UPDATE ORDER ITEM STATUS ALSO
     }
     //START Q2C Sample development
     $query = "SELECT o.* FROM #__kart_orders as o WHERE o.id =" . $order_id;
     $db->setQuery($query);
     $orderobj = $db->loadObject();
     $dispatcher = JDispatcher::getInstance();
     JPluginHelper::importPlugin('system');
     $result = $dispatcher->trigger('Onq2cOrderUpdate', array($orderobj));
     //Call the plugin and get the result
     //END Q2C Sample development
     if ($send_mail == 1 && $order_oldstatus != $status) {
         $params = JComponentHelper::getParams('com_quick2cart');
         //$adminemails = comquick2cartHelper::adminMails();
         $query = "SELECT ou.user_id,ou.user_email,ou.firstname FROM #__kart_users as ou WHERE ou.address_type='BT' AND ou.order_id = " . $order_id;
         $db->setQuery($query);
         $orderuser = $db->loadObjectList();
         //Change for backward compatiblity for user info not saving order id against it
         if (empty($orderuser)) {
             $query = "SELECT ou.user_id,ou.user_email,ou.firstname\n\t\t\t\tFROM #__kart_users as ou \n\t\t\t\tWHERE ou.address_type='BT' AND ou.order_id IS NULL AND ou.user_id = (SELECT o.user_info_id FROM #__kart_orders as o WHERE o.id =" . $order_id . ")";
             $db->setQuery($query);
             $orderuser = $db->loadObjectList();
         }
         $orderuser = $orderuser[0];
         switch ($status) {
             case 'C':
                 $orderstatus = JText::_('QTC_CONFR');
                 /*for invoice*/
                 $jinput = JFactory::getApplication()->input;
                 $jinput->set('orderid', $order_id);
                 $order = $order_bk = $comquick2cartHelper->getorderinfo($order_id);
                 $this->orderinfo = $order['order_info'];
                 $this->orderitems = $order['items'];
                 $this->orders_site = 1;
                 $this->orders_email = 1;
                 $this->order_authorized = 1;
                 if ($this->orderinfo[0]->address_type == 'BT') {
                     $billemail = $this->orderinfo[0]->user_email;
                 } else {
                     if ($this->orderinfo[1]->address_type == 'BT') {
                         $billemail = $this->orderinfo[1]->user_email;
                     }
                 }
                 $fullorder_id = $order['order_info'][0]->prefix . $order_id;
                 if (!JFactory::getUser()->id && $params->get('guest')) {
                     $jinput->set('email', md5($billemail));
                 }
                 // check for view override
                 $view = $comquick2cartHelper->getViewpath('orders', 'invoice');
                 ob_start();
                 include $view;
                 $invoicehtml = ob_get_contents();
                 ob_end_clean();
                 /*for invoice*/
                 break;
             case 'RF':
                 $orderstatus = JText::_('QTC_REFUN');
                 break;
             case 'S':
                 $orderstatus = JText::_('QTC_SHIP');
                 break;
             case 'E':
                 $orderstatus = JText::_('QTC_ERR');
                 break;
             case 'P':
                 $orderstatus = JText::_('QTC_PENDIN');
                 break;
             default:
                 $orderstatus = $status;
                 break;
         }
         $fullorder_id = $orderobj->prefix . $order_id;
         if (!empty($store_id)) {
             $productStatus = $comquick2cartHelper->getProductStatus($order_id);
             $body = JText::sprintf('QTC_STORE_PRODUCT_STATUS_CHANGE_BODY', $productStatus);
         } else {
             $body = JText::_('QTC_STATUS_CHANGE_BODY');
         }
         $site = $mainframe->getCfg('sitename');
         if ($comment) {
             $comment = str_replace('{COMMENT}', $comment, JText::_('QTC_COMMENT_TEXT'));
             $find = array('{ORDERNO}', '{STATUS}', '{SITENAME}', '{NAME}', '{COMMENTTEXT}');
             $replace = array($fullorder_id, $orderstatus, $site, $orderuser->firstname, $comment);
         } else {
             $find = array('{ORDERNO}', '{STATUS}', '{SITENAME}', '{NAME}', '{COMMENTTEXT}');
             $replace = array($fullorder_id, $orderstatus, $site, $orderuser->firstname, '');
         }
         $body = str_replace($find, $replace, $body);
         $guest_email = '';
         if (!$orderuser->user_id && $params->get('guest')) {
             $guest_email = "&email=" . md5($orderuser->user_email);
         }
         $Itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=orders');
         $link = JURI::root() . substr(JRoute::_('index.php?option=com_quick2cart&view=orders&layout=order' . $guest_email . '&orderid=' . $order_id . '&Itemid=' . $Itemid), strlen(JURI::base(true)) + 1);
         $order_link = '<a href="' . $link . '">' . JText::_('QTC_ORDER_GUEST_LINK') . '</a>';
         $body = str_replace('{LINK}', $order_link, $body);
         $body = nl2br($body);
         if (!empty($invoicehtml)) {
             $body = $body . '<div>' . JText::_('QTC_ORDER_INVOICE_IN_MAIL') . '</div>';
             $invoicehtml = $body . $invoicehtml;
             $invoicesubject = JText::sprintf('QTC_INVOICE_MAIL_SUB', $site, $fullorder_id);
             $comquick2cartHelper->sendmail($orderuser->user_email, $invoicesubject, $invoicehtml, $params->get('sale_mail'));
         } else {
             $subject = JText::sprintf('QTC_STATUS_CHANGE_SUBJECT', $fullorder_id);
             $comquick2cartHelper->sendmail($orderuser->user_email, $subject, $body, $params->get('sale_mail'));
         }
     }
 }
Пример #23
0
 /**
  * Function used to get Free irder HTML
  *
  * @param   INT  $order_id  Order ID
  *
  * @return  STRING
  *
  * @since  1.0.0
  */
 public function getFreeOrderHtml($order_id)
 {
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart', JPATH_SITE);
     // $path = JPATH_SITE.DS.'components'.DS.'com_quick2cart'.DS.'views'.DS.'cartcheckout'.DS.'tmpl'.DS.'freeorder.php';
     // CHECK for view override
     $comquick2cartHelper = new comquick2cartHelper();
     $path = $comquick2cartHelper->getViewpath('cartcheckout', 'freeorder', 'SITE', 'SITE');
     ob_start();
     include $path;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
Пример #24
0
            ?>
</fieldset>
<?php 
        }
        ?>

<?php 
    }
    ?>

<?php 
}
/*chk for paramter shipping*/
?>

</div>  <!-- customer info end  id=qtc_wholeCustInfoDiv-->
<div style="clear:both;"></div>

</div>

</div>

<?php 
// CHECK for view override
$comquick2cartHelper = new comquick2cartHelper();
$view = $comquick2cartHelper->getViewpath('orders');
ob_start();
include $view;
$html = ob_get_contents();
ob_end_clean();
echo $html;
Пример #25
0
$comparams = JComponentHelper::getParams('com_quick2cart');
$document = JFactory::getDocument();
//$document->addScript(JURI::root().'components/com_quick2cart/assets/js/order.js');
$document->addStyleSheet(JURI::base() . 'components/com_quick2cart/assets/css/quick2cart.css');
$comquick2cartHelper = new comquick2cartHelper();
//$Itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=cart');
?>
<div class="techjoomla-bootstrap <?php 
echo $params->get('moduleclass_sfx', '');
?>
"  >
	<div  class='row-fluid'>
		<?php 
if ($qtc_modViewType == "qtc_listView") {
    $comquick2cartHelper = new comquick2cartHelper();
    $view = $comquick2cartHelper->getViewpath('vendor', 'storelist');
    $options = $target_data;
    ob_start();
    include $view;
    $html = ob_get_contents();
    ob_end_clean();
    echo $html;
} else {
    $max_scroll_ht = !empty($qtc_mod_scroll_height) ? trim($qtc_mod_scroll_height) : 250;
    $scroll_style = "overflow-y:auto;max-height:" . $max_scroll_ht . "px;overflow-x:hidden;";
    ?>
			<ul class="thumbnails" style="<?php 
    echo $scroll_style;
    ?>
" >
			<?php 
Пример #26
0
		});
	}

</script>

<div class="qyc_admin_zones <?php 
echo Q2C_WRAPPER_CLASS;
?>
">

	<?php 
// Add store toolbar
$helperobj = new comquick2cartHelper();
$active = 'zones';
$order_currency = $helperobj->getCurrencySession();
$view = $helperobj->getViewpath('vendor', 'toolbar');
ob_start();
include $view;
$html = ob_get_contents();
ob_end_clean();
echo $html;
?>
	<div class="row-fluid">
		<div class="form-horizontal">
			<form action="<?php 
echo JRoute::_('index.php?option=com_quick2cart&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" enctype="multipart/form-data" name="zoneForm" id="zoneForm" class="form-validate">
				<fieldset class="adminform">
					<legend>
						<?php 
Пример #27
0
					<!--step2-->
					<div class="tab-pane step-pane" id="step2">
						<div class="qtcAddBorderToWrapper">
						<?php 
// show user info
$html = "";
$comquick2cartHelper = new comquick2cartHelper();
ob_start();
$path = $comquick2cartHelper->getViewpath('registration', 'default');
include_once $path;
$html = ob_get_contents();
ob_end_clean();
echo $html;
// billing and shipping info
$comquick2cartHelper = new comquick2cartHelper();
$billpath = $comquick2cartHelper->getViewpath('cartcheckout', 'default_billing');
ob_start();
include $billpath;
$html = ob_get_contents();
ob_end_clean();
echo $html;
?>
						</div>
					</div>
					<!--step2-->

					<?php 
if ($isShippingEnabled) {
    ?>
					<!--step3-->
					<div class="tab-pane step-pane" id="step3">
Пример #28
0
// No direct access.
defined('_JEXEC') or die;
$document = JFactory::getDocument();
jimport('joomla.filter.output');
jimport('joomla.utilities.date');
//$document->addStyleSheet(JUri::base().'components/com_quick2cart/assets/css/quick2cart.css');//backend css
$reportsHelper = new reportsHelper();
?>
<div class="<?php 
echo Q2C_WRAPPER_CLASS;
?>
" >
<?php 
$active = 'payouts';
$comquick2cartHelper = new comquick2cartHelper();
$view = $comquick2cartHelper->getViewpath('vendor', 'toolbar');
ob_start();
include $view;
$html = ob_get_contents();
ob_end_clean();
echo $html;
?>
	<?php 
if ($this->issite) {
    ?>
		<!--page header-->
		<legend><?php 
    echo JText::_('COM_QUICK2CART_MY_CASHBACK');
    ?>
</legend>
		<?php 
Пример #29
0
 </span>
			</div>
		</div>
	</div>
	<?php 
    return false;
}
$document = JFactory::getDocument();
$document->addStyleSheet(JUri::root(true) . '/components/com_quick2cart/assets/css/swipebox.min.css');
// Here if min and max qty is not present then we assign it to min=1 and max=999
$min_qty = !empty($this->itemdetail->min_quantity) ? $this->itemdetail->min_quantity : 1;
$max_qty = !empty($this->itemdetail->min_quantity) ? $this->itemdetail->max_quantity : 999;
$slab = !empty($this->itemdetail->slab) ? $this->itemdetail->slab : 1;
$client = $this->client;
$comquick2cartHelper = new comquick2cartHelper();
$prodViewPath = $comquick2cartHelper->getViewpath('product', 'product');
$pepoleViewPath = $comquick2cartHelper->getViewpath('product', 'pepole');
$params = JComponentHelper::getParams('com_quick2cart');
$on_editor = $params->get('enable_editor', 0);
$productDetailsUrl = 'index.php?option=com_quick2cart&view=productpage&layout=default&item_id=' . $this->item_id;
$productDetailsUrl = JUri::root() . substr(JRoute::_($productDetailsUrl, false), strlen(JUri::base(true)) + 1);
?>

<script type="text/javascript">
	techjoomla.jQuery(function()
	{
		var update_prodImg = function(){
			/*var old_src=techjoomla.jQuery("#qtc_prod_image").attr("src");*/
			var imgsrc=this.src;

			/*imgsrc = imgsrc.replace(/_S./i, '_M.');*/