| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Categories Menu - Showing Subcategories | ||||
|
|
Thread Tools | Search this Thread |
#91
|
|||||||
|
|||||||
Re: Categories Menu - Showing Subcategories
PhilJ has a commercial version that works great...
http://www.xcartmods.co.uk/demos/4018/home.php?treem=1
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#92
|
|||||||||
|
|||||||||
Re: Categories Menu - Showing Subcategories
This mod looks good....
It is also search engine friendly... You may want to call the javascript from external file... Ash
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance Call within Australia: Phone: 1300 648 274 | Mobile: 0417 241 950 Call outside Australia: +61 417 241 950 | Email: results@mitash.com | Skype: mitashau | Web: www.mitash.com |
|||||||||
#93
|
|||||||||
|
|||||||||
Re: Categories Menu - Showing Subcategories
Hi Can I use this mod to show sub categories in 4.1.3??
Thanks Ash
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance Call within Australia: Phone: 1300 648 274 | Mobile: 0417 241 950 Call outside Australia: +61 417 241 950 | Email: results@mitash.com | Skype: mitashau | Web: www.mitash.com |
|||||||||
#94
|
|||||||||
|
|||||||||
Re: Categories Menu - Showing Subcategories
Any one..?
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance Call within Australia: Phone: 1300 648 274 | Mobile: 0417 241 950 Call outside Australia: +61 417 241 950 | Email: results@mitash.com | Skype: mitashau | Web: www.mitash.com |
|||||||||
#95
|
|||||||
|
|||||||
Re: Categories Menu - Showing Subcategories
I cannot seem to get them to work with my current version. Plus they are not exactly what I am looking for. What I am trying to do is make a drop down of subcategories that will be placed on the home.tpl file. I am hoping to have about 4 dropdowns on the same page. I am using version 4.1.3. Can anyone help me?
Thank you!
__________________
X-cart Version: 4.1.3 PHP Version: 5.1.6 MySQL: 3.23.58 OS: Linux |
|||||||
#96
|
|||||||||
|
|||||||||
Re: Categories Menu - Showing Subcategories
Solution for 4.1.6
Cat A --Cat A1 --Cat A2 Cat B --Cat B1 --Cat B2 Only one modification in incude/categorie.php Search for this in your code : # # Override subcategory_count for Admin area # if(!empty($subcategories) && ($current_area == 'A' || ($current_area == 'P' && $active_modules['Simple_Mode']))) { $product_counts = func_query_hash("SELECT categoryid, COUNT(*) FROM $sql_tbl[products_categories] WHERE categoryid IN ('".implode("','", array_keys($subcategories))."') GROUP BY categoryid", "categoryid", false, true); foreach($subcategories as $k => $v) { $subcategories[$k]['subcategory_count'] = func_query_first_cell("SELECT COUNT(subcat.categoryid) as subc FROM $sql_tbl[categories] USE INDEX (PRIMARY) LEFT JOIN $sql_tbl[categories] as subcat ON subcat.categoryid_path LIKE CONCAT($sql_tbl[categories].categoryid_path, '/%') WHERE $sql_tbl[categories].categoryid = '$k' GROUP BY $sql_tbl[categories].categoryid"); $subcategories[$k]['product_count_global'] = $subcategories[$k]['product_count']; $subcategories[$k]['product_count'] = isset($product_counts[$k]) ? intval($product_counts[$k]) : 0; } } then add this just below the line : //Subcategories in menu function func_getallsubcat() { $raj =func_get_categories_list("", true, "all"); $raj1=$raj['all_categories']; $ll=array(); foreach ($raj1 as $k=>$val) { if($val['parentid']!="0") { $ll[$val['parentid']][]=$val; } } return $ll; } $smarty->assign("allsubcategories", func_getallsubcat()); //Subcategorie in menu - end thank you
__________________
Chris ---------------------------------------- X-Cart Gold 4.1.xx / 4.2.xx Need some Help in french Webdesign or else. ---------------------------------------- |
|||||||||
#97
|
|||||||
|
|||||||
Re: Categories Menu - Showing Subcategories
Hello
I add code below into my include/categories.php but my subcategories are still not visible..do i have to make any other modifications? Thanks
__________________
Mircea Teleleu Shopedia.ro-la cumparaturi www.shopedia.ro ______________________ x-cart gold 4.1.6 Linux |
|||||||
#98
|
|||||||||
|
|||||||||
Re: Categories Menu - Showing Subcategories
Hi,
Yes you're right MallRomania, I foget to add variable in skin1/customer/categorie.tpl Add this line were you need to show the subategorie {assign var=in value=$c.categoryid} {foreach from=$allsubcategories.$in item=c } and then the link of your subcategorie (you modify it to fit your template) <a href="home.php?cat={$c.categoryid}" class="CategoriesList3">{$c.category}<br></a>
__________________
Chris ---------------------------------------- X-Cart Gold 4.1.xx / 4.2.xx Need some Help in french Webdesign or else. ---------------------------------------- |
|||||||||
#99
|
|||||||
|
|||||||
Re: Categories Menu - Showing Subcategories
Thanks, here is the complete code for skin1/customer/categories.tpl, modified to fit my template
Code:
__________________
Mircea Teleleu Shopedia.ro-la cumparaturi www.shopedia.ro ______________________ x-cart gold 4.1.6 Linux |
|||||||
#100
|
|||||||||
|
|||||||||
Re: Categories Menu - Showing Subcategories
It seems great, here's the full code page for you.
Code:
And you need to create a CSS with "CategorieList3" because it doesn't exist or use another one. You have Code:
Thank you
__________________
Chris ---------------------------------------- X-Cart Gold 4.1.xx / 4.2.xx Need some Help in french Webdesign or else. ---------------------------------------- |
|||||||||
|
|||
X-Cart forums © 2001-2020
|