| Current Path : /home/digilove/public_html/modules/mod_sellercategory/tmpl/ |
| Current File : /home/digilove/public_html/modules/mod_sellercategory/tmpl/default.php |
<?php
/**
* Marketplace Menus module
*
* PHP version 7.0
*
* @category Module
* @package Joomla
* @author WebKul software private limited <support@webkul.com>
* @copyright 2010 WebKul software private limited
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @version GIT:5.2
* @filesource http://store.webkul.com
* @link Technical Support: webkul.uvdesk.com
*/
// no direct access
defined('_JEXEC') or die();
$jinput=JFactory::getApplication()->input;
$method=$jinput->getMethod();
$seller_id=0;
$seller_id=$jinput->get('seller_id', 0, 'INT');
?>
<style type="text/css">
.wk_cat_blk<?php echo $class_sfx; ?> *{
font-size: 15px!important;
}
.wk_cat_blk<?php echo $class_sfx; ?>{
margin-top: 10px;
margin-bottom: 10px;
}
</style>
<div class="wk_cat_blk<?php echo $class_sfx; ?>">
<h4><?php echo JText::_('SELL_CAT');?></h4>
<hr>
<?php
if (!isset($seller_id)) {
$user = JFactory::getUser();
$seller_id = $user->id;
}
$menulink = plgSystemMarketplace::getMenuId(
'index.php?option=com_marketplace&view=category'
);
require_once JPATH_SITE."/components/com_marketplace/models/profilesave.php";
if (!class_exists('VmConfig')) {
include JPATH_ADMINISTRATOR.'/components/com_virtuemart/helpers/config.php';
}
VmConfig::loadConfig();
$model = new MarketplaceModelProfilesave();
$is_seller = $model->getItem($seller_id, "is_seller");
if ($is_seller==1) {
$lang_tag=VmConfig::$vmlang;
$db = JFactory::getDBO();
$helper_ins = new ModSellerCategoryHelper();
$virtuemart_categories = $helper_ins->getVmCategories();
$i=0;
foreach ($virtuemart_categories as $virtuemart_cat) {
$wk_catid = '';
if ($virtuemart_cat->virtuemart_category_id!=$wk_catid) {
$wk_catid=$virtuemart_cat->virtuemart_category_id;
$virtuemart_categories_product = $helper_ins
->virtuemartCategoriesProduct(
$wk_catid,
$seller_id
);
if (count($virtuemart_categories_product)>0) {
$i++;
?>
<div class="wk_cat_sell<?php $class_sfx; ?>">
<a href='<?php echo
JRoute::_(
"index.php?option=com_marketplac".
"e&view=category&seller_id=".
$seller_id."&category_id=".$wk_catid.
'&Itemid='.$menulink,
false
); ?>'><?php
echo $virtuemart_cat->category_name;
?> (<?php echo count($virtuemart_categories_product); ?>) </a>
</div>
<?php }
}
}
if (!$i) {
echo JText::_('NO_SELL_CAT_PRO');
}
} else {
echo JText::_('NO_SELL');
}
?>
<style type="text/css">
.wk_cat_blk<?php $class_sfx; ?> {
border: 1px solid #bfbfbf;
border-radius: 5px;
padding: 5px;
}
.wk_cat_sell<?php $class_sfx; ?> a{
text-decoration: none;
}
</style>
</div>