Hikashop category module as menu item
12 years 8 months ago - 12 years 8 months ago #140789
by webarts
Hikashop category module as menu item was created by webarts
Hello ,
i have a specific problem and i want your help .
We integrade Hikashop with a stock control and we want when the user creates a sub category in stock control software to display it dynamicaly on Joomla menu to avoid going and create manualy a joomla menu item that points to hikashop category.
so we decide to show a category module on the menu.
On hikashop module we select :
Type of content: Category
Type of layout: List
You can see the under construction website here server.webartscy.com/~mazrin/ and if you go over the Fathers Day menu item you can see the hikashop module.
now our problem is that we want to have a clean ul li list to can display properly with the correct style the module to look like exactly as menu items.
please advice how we can achive this. even if you have a list layout the code its not clean .
i have a specific problem and i want your help .
We integrade Hikashop with a stock control and we want when the user creates a sub category in stock control software to display it dynamicaly on Joomla menu to avoid going and create manualy a joomla menu item that points to hikashop category.
so we decide to show a category module on the menu.
On hikashop module we select :
Type of content: Category
Type of layout: List
You can see the under construction website here server.webartscy.com/~mazrin/ and if you go over the Fathers Day menu item you can see the hikashop module.
now our problem is that we want to have a clean ul li list to can display properly with the correct style the module to look like exactly as menu items.
please advice how we can achive this. even if you have a list layout the code its not clean .
Last edit: 12 years 8 months ago by webarts.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140864
by nicolas
Replied by nicolas on topic Hikashop category module as menu item
Hi,
Go in the options of your module via the menu Display>Content modules and change the option "Show sub categories" to "no child" and that should display as a "clean" ul/li list
Go in the options of your module via the menu Display>Content modules and change the option "Show sub categories" to "no child" and that should display as a "clean" ul/li list
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140870
by webarts
Replied by webarts on topic Hikashop category module as menu item
thank you ,
there is a way to show the sub categories tree ? Is that possible
there is a way to show the sub categories tree ? Is that possible
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140887
by nicolas
Replied by nicolas on topic Hikashop category module as menu item
It should be the case if you set that option to "all sub categories".
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140889
by webarts
Replied by webarts on topic Hikashop category module as menu item
with that we come back to the previous stage and we dont have "clean" ul/li list
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140894
by nicolas
Replied by nicolas on topic Hikashop category module as menu item
Yes. That's because HikaShop adds extra tags to handle the accordion system of Joomla/mootools in that case.
You would have to edit the file "listing_list" of the view "category" via the menu Display>Views and remove the pieces you don't want.
You would have to edit the file "listing_list" of the view "category" via the menu Display>Views and remove the pieces you don't want.
Please Log in or Create an account to join the conversation.
12 years 8 months ago #140984
by webarts
Replied by webarts on topic Hikashop category module as menu item
Nicolas i give a try and i mess it up, its hard for you to sent me the code for a clean ui li of listing_list when the option is "all sub categories" ?
Please Log in or Create an account to join the conversation.
12 years 8 months ago #141072
by nicolas
Replied by nicolas on topic Hikashop category module as menu item
Replace the code in that file by that code and that will do it:
Please note that we're already far from user support and this is already custom code development...
Code:
<ul>
<?php
if(!empty($this->rows)){
foreach($this->rows as $k => $row){
if($only_if_products && $row->number_of_products<1) continue;
$link = $this->getLink($row->category_id,$row->alias);
?>
<li>
<a href="<?php echo $link;?>">
<?php
echo $row->category_name;
if($this->params->get('number_of_products',0)){
echo ' ('.$row->number_of_products.')';
}
?>
</a>
<ul class="hikashop_category_list<?php echo $this->params->get('ul_class_name'); ?>"><?php
if(!empty($row->childs)){
$app = JFactory::getApplication();
$found='';
if(JRequest::getString('option')==HIKASHOP_COMPONENT && in_array(JRequest::getString('ctrl','category'),array('category','product'))){
if(JRequest::getString('ctrl','category')=='product'&&JRequest::getString('task','listing')=='show'){
$found = $app->getUserState(HIKASHOP_COMPONENT.'.last_category_selected');
$config =& hikashop_config();
$pathway_sef_name = $config->get('pathway_sef_name','category_pathway');
$cid = JRequest::getInt($pathway_sef_name,0);
}else{
$cid = JRequest::getInt('cid',0);
}
foreach($row->childs as $child){
if($cid == $child->category_id){
$found=$child->category_id;
$app->setUserState(HIKASHOP_COMPONENT.'.last_category_selected',$child->category_id);
break;
}
}
}
$limit = $this->params->get('child_limit');
$i = 0;
foreach($row->childs as $child){
if($only_if_products && $child->number_of_products<1) continue;
if(!empty($limit) && $i >= $limit){
break;
}
$i++;
$link = $this->getLink($child->category_id,$child->alias);
$class = '';
if($found==$child->category_id){
$class=' current active';
}
?>
<li class="hikashop_category_list_item<?php echo $class; ?>">
<a href="<?php echo $link; ?>">
<?php
echo $child->category_name;
if($this->params->get('number_of_products',0)){
echo ' ('.$child->number_of_products.')';
}
?>
</a>
</li>
<?php
}
}else {
echo JText::_('HIKA_LISTING_LIST_EMPTY');
}
?></ul>
</il><?php
}
}
?></ul>
Please Log in or Create an account to join the conversation.
12 years 8 months ago - 12 years 8 months ago #141103
by webarts
Replied by webarts on topic Hikashop category module as menu item
thank you very much Nicolas , we really appreciate your support thats why your are far away from the second ! We was able to solve the problem before your post. I will double check this. But we are willing to pay next time for an extra support. Thank you for noted this .
Last edit: 12 years 8 months ago by webarts.
Please Log in or Create an account to join the conversation.
Time to create page: 0.197 seconds