本文整理汇总了PHP中comquick2cartHelper类的典型用法代码示例。如果您正苦于以下问题:PHP comquick2cartHelper类的具体用法?PHP comquick2cartHelper怎么用?PHP comquick2cartHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了comquick2cartHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_mod
/**
* Function used to update
*
* @param INT $called_frm //Mundhe complet this
*
* @return Array
*
* @since 1.0.0
*/
public function update_mod($called_frm = '0')
{
$lang = JFactory::getLanguage();
$lang->load('mod_quick2cart', JPATH_ROOT);
$comquick2cartHelper = new comquick2cartHelper();
jimport('joomla.application.module.helper');
if (JModuleHelper::getModule('mod_quick2cart')) {
$module = JModuleHelper::getModule('mod_quick2cart');
if (JVERSION < '1.6.0') {
$moduleParams = new JParameter($module->params);
$layout = $moduleParams->get('viewtype');
$ckout_text = $moduleParams->get('checkout_text');
} else {
$moduleParams = json_decode($module->params);
if (!empty($moduleParams)) {
$layout = $moduleParams->viewtype;
$ckout_text = $moduleParams->checkout_text;
}
}
}
if (isset($layout) && isset($ckout_text)) {
$data = $comquick2cartHelper->get_module($layout, $ckout_text);
} else {
$data = $comquick2cartHelper->get_module();
}
echo $data;
jexit();
}
示例2: display
/**
* 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);
}
示例3: __construct
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JController
* @since 1.6
*/
public function __construct($config = array())
{
$comquick2cartHelper = new comquick2cartHelper();
$this->my_stores_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=stores&layout=my');
$this->create_store_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=vendor&layout=createstore');
parent::__construct($config);
}
示例4: getInput
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;
}
示例5: fetchElement
/**
* Fetch custom Element view.
*
* @param string $name Field Name.
* @param mixed $value Field value.
* @param mixed $node Field node.
* @param mixed $control_name Field control_name/Id.
*
* @since 2.2
* @return null
*/
public function fetchElement($name, $value, $node, $control_name)
{
$db = JFactory::getDBO();
$user = JFactory::getUser();
$comquick2cartHelper = new comquick2cartHelper();
// Getting user accessible store ids
$storeList = $comquick2cartHelper->getStoreIds();
$options = array();
$app = JFactory::getApplication();
$jinput = $app->input;
$zone_id = $jinput->get('id');
$defaultSstore_id = 0;
if ($zone_id) {
// Load Zone helper.
$path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
if (!class_exists('zoneHelper')) {
JLoader::register('zoneHelper', $path);
JLoader::load('zoneHelper');
}
$zoneHelper = new zoneHelper();
$defaultSstore_id = $zoneHelper->getZoneStoreId($zone_id);
}
foreach ($storeList as $store) {
$storename = ucfirst($store['title']);
$options[] = JHtml::_('select.option', $store['store_id'], $storename);
}
$fieldName = $name;
return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required" size="1" ', 'value', 'text', $defaultSstore_id, $control_name);
}
示例6: display
/**
* 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->item = $this->get('Item');
//$this->form = $this->get('Form');
$comquick2cartHelper = new comquick2cartHelper();
$getPayoutFormData = $this->get('PayoutFormData');
$this->getPayoutFormData = $getPayoutFormData;
//print_r($this->getPayoutFormData);die;
$payee_options = array();
$payee_options[] = JHtml::_('select.option', '0', JText::_('COM_QUICK2CART_SELECT_PAYEE'));
if (!empty($getPayoutFormData)) {
foreach ($getPayoutFormData as $payout) {
$amt = round($payout->total_amount);
if ($amt > 0) {
$username = $comquick2cartHelper->getUserName($payout->user_id);
$payee_options[] = JHtml::_('select.option', $payout->user_id, $username);
}
}
}
$this->payee_options = $payee_options;
// Check for errors.
if (count($errors = $this->get('Errors'))) {
throw new Exception(implode("\n", $errors));
}
$this->addToolbar();
parent::display($tpl);
}
示例7: __construct
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = array())
{
$comquick2cartHelper = new comquick2cartHelper();
$this->my_coupons_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=coupons&layout=my');
$this->create_coupon_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=couponform');
parent::__construct($config);
$this->view_list = 'coupons';
}
示例8: csvexport
/**
* Gives sales reports csv export.
*
* @since 2.2.2
* @return null.
*/
public function csvexport()
{
$model = $this->getModel("salesreport");
$CSVData = $model->getCsvexportData();
$filename = "SalesReport_" . date("Y-m-d");
$csvDataString = null;
$headColumn = array();
$headColumn[0] = JText::_('COM_QUICK2CART_SALESREPORT_STORE_ITEMID');
$headColumn[1] = JText::_('COM_QUICK2CART_SALESREPORT_PROD_NAME');
$headColumn[2] = JText::_('COM_QUICK2CART_SALESREPORT_STORE_NAME');
$headColumn[3] = JText::_('COM_QUICK2CART_SALESREPORT_STORE_ID');
$headColumn[4] = JText::_('COM_QUICK2CART_SALESREPORT_SALES_COUNT');
$headColumn[5] = JText::_('COM_QUICK2CART_SALESREPORT_AMOUNT');
$headColumn[6] = JText::_('COM_QUICK2CART_SALESREPORT_CREATED_BY');
$csvDataString .= implode(";", $headColumn);
$csvDataString .= "\n";
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header("Content-disposition: filename=" . $filename . ".csv");
// Getting all store list
$comquick2cartHelper = new comquick2cartHelper();
$store_details = $comquick2cartHelper->getAllStoreDetails();
$productHelper = new productHelper();
if (!empty($CSVData)) {
foreach ($CSVData as $data) {
$store_id = $data['store_id'];
$csvrow = array();
$csvrow[0] = '"' . $data['item_id'] . '"';
$csvrow[1] = '"' . $data['item_name'] . '"';
$csvrow[2] = '""';
if (!empty($store_details[$store_id])) {
$csvrow[2] = '"' . $store_details[$store_id]['title'] . '"';
}
$csvrow[3] = '"' . $data['store_id'] . '"';
$csvrow[4] = '"' . $data['saleqty'] . '"';
// GETTING PRODUCT PRICE
$prodAttDetails = $productHelper->getProdPriceWithDefltAttributePrice($data['item_id']);
// CONSIDERING FIELD DISCOUNT, NOT COUPON DISCOUNT
$discountPrice = $prodAttDetails['itemdetail']['discount_price'];
$prodBasePrice = !empty($discountPrice) ? $discountPrice : $prodAttDetails['itemdetail']['price'];
$prodPrice = $prodBasePrice + $prodAttDetails['attrDetail']['tot_att_price'];
$prodPrice = strip_tags($comquick2cartHelper->getFromattedPrice($prodPrice));
$csvrow[5] = '"' . $prodPrice . '"';
$csvrow[6] = '""';
if (!empty($store_details[$store_id])) {
$csvrow[6] = '"' . $store_details[$store_id]['firstname'] . '"';
}
$csvDataString .= implode(";", $csvrow);
$csvDataString .= "\n";
}
}
ob_clean();
echo $csvDataString . "\n";
jexit();
$link = 'index.php?option=com_quick2cart&view=salesreport';
$this->setRedirect($link);
}
示例9: getVersion
function getVersion()
{
if (!class_exists('comquick2cartHelper')) {
$path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
JLoader::register('comquick2cartHelper', $path);
JLoader::load('comquick2cartHelper');
}
$helperobj = new comquick2cartHelper();
echo $latestversion = $helperobj->getVersion();
jexit();
}
示例10: getOptions
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*
* @since 11.4
*/
protected function getOptions()
{
require_once JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
$comquick2cartHelper = new comquick2cartHelper();
// Get all stores.
$stores = $comquick2cartHelper->getAllStoreDetails();
$options = array();
//$options[] = JHtml::_('select.option', '', JText::_('QTC_SELET_STORE'));
foreach ($stores as $key => $value) {
$options[] = JHtml::_('select.option', $key, $value['title']);
}
// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $options);
return $options;
}
示例11: onDisplayFieldValue
function onDisplayFieldValue(&$field, $item, $values = null, $prop = 'display')
{
// execute the code only if the field type match the plugin type
if ($field->field_type != 'quick2cart') {
return;
}
jimport('joomla.filesystem.file');
if (JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
$mainframe = JFactory::getApplication();
$lang = JFactory::getLanguage();
$lang->load('com_quick2cart');
$comquick2cartHelper = new comquick2cartHelper();
$output = $comquick2cartHelper->getBuynow($item->id, "com_flexicontent");
}
$field->{$prop} = $output;
}
示例12: fetchElement
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;
}
示例13: getShipView
function getShipView()
{
$app = JFactory::getApplication();
$qtcshiphelper = new qtcshiphelper();
$comquick2cartHelper = new comquick2cartHelper();
$plgActionRes = array();
$jinput = $app->input;
$extension_id = $jinput->get('extension_id');
$plugview = $jinput->get('plugview');
// Plugin view is not found in URL then check in post array.
if (empty($plugview)) {
$plugview = $jinput->post->get('plugview');
}
// If extension related view
if (!empty($extension_id)) {
$plugName = $qtcshiphelper->getPluginDetail($extension_id);
// Call specific plugin trigger
JPluginHelper::importPlugin('tjshipping', $plugName);
$dispatcher = JDispatcher::getInstance();
$plgRes = $dispatcher->trigger('TjShip_plugActionkHandler', array($jinput));
if (!empty($plgRes)) {
$plgActionRes = $plgRes[0];
}
}
// Enque msg
if (!empty($plgActionRes['statusMsg'])) {
$app->enqueueMessage($plgActionRes['statusMsg']);
}
// Extra plugin Url params.
if (!empty($plgActionRes['urlPramStr'])) {
$plgUrlParam = '&' . $plgActionRes['urlPramStr'];
} else {
$plgUrlParam = '&plugview=';
}
//print" kasdflkjsdk $plgUrlParam"; die;
$itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=vendor&layout=cp');
$link = 'index.php?option=com_quick2cart&view=shipping&layout=list' . $plgUrlParam . '&extension_id=' . $extension_id . '&Itemid=' . $itemid;
$this->setRedirect(JRoute::_($link, false));
}
示例14: onK2AfterDisplayContent
function onK2AfterDisplayContent(&$item, &$params, $limitstart)
{
// Add Language file.
$lang = JFactory::getLanguage();
$lang->load('com_quick2cart', JPATH_SITE);
jimport('joomla.filesystem.file');
if (!JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
return true;
}
$path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
if (!class_exists('comquick2cartHelper')) {
// require_once $path;
JLoader::register('comquick2cartHelper', $path);
JLoader::load('comquick2cartHelper');
}
$mainframe = JFactory::getApplication();
$lang = JFactory::getLanguage();
$lang->load('com_quick2cart');
$comquick2cartHelper = new comquick2cartHelper();
$output = $comquick2cartHelper->getBuynow($item->id, 'com_k2');
return $output;
}
示例15: _getquick2cartstoreHTML
function _getquick2cartstoreHTML()
{
jimport('joomla.filesystem.file');
if (JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
$lang = JFactory::getLanguage();
$lang->load('com_quick2cart', JPATH_SITE);
$path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
if (!class_exists('comquick2cartHelper')) {
//require_once $path;
JLoader::register('comquick2cartHelper', $path);
JLoader::load('comquick2cartHelper');
}
// Load assets
comquick2cartHelper::loadQuicartAssetFiles();
$product_path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helpers' . DS . 'product.php';
if (!class_exists('productHelper')) {
//require_once $path;
JLoader::register('productHelper', $product_path);
JLoader::load('productHelper');
}
$params = $this->params;
$no_of_stores = $params->get('no_of_stores', '2');
//Get profile id
$user = CFactory::getRequestUser();
$model = new productHelper();
$target_data = $model->getUserStores($user->_userid, $no_of_stores);
if (!empty($target_data)) {
$html = "\n\t\t\t\t<div class='techjoomla-bootstrap' >\n\t\t\t\t\t<div class='row-fluid'>\n\t\t\t\t\t<ul class='thumbnails' >\n\t\t\t\t\t";
foreach ($target_data as $data) {
$path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'views' . DS . 'vendor' . DS . 'tmpl' . DS . 'thumbnail.php';
//@TODO condition vise mod o/p
ob_start();
include $path;
$html .= ob_get_contents();
ob_end_clean();
}
$html .= "\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
return $html;
}
}
}