Guest Maneatdog Posted May 14, 2006 Share Posted May 14, 2006 Is it possible to change the order of my sub catatories see http://www.applecarte.co.uk/printshop/inde...iewCat&catId=22 what i want is to have my print sub catagories under the picture rather than above, if anyone can help that would be great. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
roban Posted May 14, 2006 Share Posted May 14, 2006 Yes and it depends on how you want to sort them. If you want to sort them alphabetically do this: Open /includes/contents/viewCat.inc.php Find somewhere @ line 158 QUOTE $productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId']); Replace it with QUOTE $productListQuery = "SELECT ".$glob['dbprefix']."CubeCart_cats_idx.cat_id, ".$glob['dbprefix']."CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM ".$glob['dbprefix']."CubeCart_cats_idx INNER JOIN ".$glob['dbprefix']."CubeCart_inventory ON ".$glob['dbprefix']."CubeCart_cats_idx.productId = ".$glob['dbprefix']."CubeCart_inventory.productId WHERE ".$glob['dbprefix']."CubeCart_cats_idx.cat_id = ".$db->mySQLSafe($_GET['catId'])." ORDER BY name ASC"; Quote Link to comment Share on other sites More sharing options...
markscarts Posted May 14, 2006 Share Posted May 14, 2006 have my print sub catagories under the picture rather than above Sure, Open skins/Classic/styleTemplates/content/viewCat.tpl. Fine the following block of code: <!-- BEGIN: sub_cats --> <div id="subCats"> <!-- BEGIN: sub_cats_loop --> <div class="subCat"> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" title="{TXT_CATEGORY}" /></a><br /> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS}) </div> <!-- END: sub_cats_loop --> </div> <!-- END: sub_cats --> <br clear="left" /> <!-- BEGIN: cat_img --> <img src="{IMG_CURENT_CATEGORY}" alt="{TXT_CURENT_CATEGORY}" border="0" title="{TXT_CURENT_CATEGORY}" /> <!-- END: cat_img --> REPLACE it with this block of code: <!-- BEGIN: cat_img --> <img src="{IMG_CURENT_CATEGORY}" alt="{TXT_CURENT_CATEGORY}" border="0" title="{TXT_CURENT_CATEGORY}" /> <!-- END: cat_img --> <!-- BEGIN: sub_cats --> <div id="subCats"> <!-- BEGIN: sub_cats_loop --> <div class="subCat"> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" title="{TXT_CATEGORY}" /></a><br /> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS}) </div> <!-- END: sub_cats_loop --> </div> <!-- END: sub_cats --> <br clear="left" /> If you look at the code with a good text editor, you'll see that the two areas of code are clearly marked, so it is not difficult to move things around a bit. sub_cats vs. cat_img ;) Quote Link to comment Share on other sites More sharing options...
Guest Maneatdog Posted May 16, 2006 Share Posted May 16, 2006 Thanks guys, worked a treat, cheers Quote Link to comment Share on other sites More sharing options...
Guest luvs2ride1979 Posted June 13, 2006 Share Posted June 13, 2006 A question for you all along this line (will be adding the alphabetical code shortly!). I want my subcategories to be displayed in a list format, down the left. I got rid of the icons and I got it left aligned, but they're all bunched up together... Any of you know off hand how I can get a BR between each one or put them in a bullet list? Link: (site in testing/development stage) http://rescuenetwork.com/tack Thanks! Quote Link to comment Share on other sites More sharing options...
markscarts Posted June 13, 2006 Share Posted June 13, 2006 Well hello, luvs2ride! Yes, this can be done. Try the following: 1. Make a copy of the entire Legend folder on your pc, this contains all the skin files for Legend skin. 2. Do not modify any files in your original Legend skin folder. 3. Re-name the copy folder to newLegend, or myLegend, or mySkin - whatever you'd like to call it. You will be modifying these files to get the skin to look and operate the way you want it to. 4. Upload your new skin folder to the skins/ directory at your site. 5. In admin control panel for the store, under Store Config > General Settings, choose your new skin name from the dropdown menu. It will appear there automatically if your new skin file is in the skins/ directory. NOW that you have secured the purity of your original Legend skin, follow these instructions to change the appearance of your subcategories: OPEN skins/<new name>/styleTemplates/content/viewCat.tpl FIND the following block of code: <!-- BEGIN: sub_cats --> <div id="subCats"> <!-- BEGIN: sub_cats_loop --> <span class="subCat"> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" title="{TXT_CATEGORY}" /></a><br /> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS}) </span> <!-- END: sub_cats_loop --> </div> <!-- END: sub_cats --> REPLACE it with this block of code: <!-- Modified for subcategories in a list format, MarksCarts http://cc3.biz >> --> <!-- BEGIN: sub_cats --> <div class="boxContent"><span class="txtContentTitle">Choose a Category:</span> <ul style="margin-left: 3em"> <!-- BEGIN: sub_cats_loop --> <li class="bullet"> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS}) </li> <!-- END: sub_cats_loop --> </ul> </div> <!-- END: sub_cats --> <!-- << Modified for subcategories in a list format, MarksCarts http://cc3.biz >> --> Quote Link to comment Share on other sites More sharing options...
Guest luvs2ride1979 Posted June 13, 2006 Share Posted June 13, 2006 Well hello, luvs2ride! Yes, this can be done. Try the following: That Worked! THANKS! Now I just have to go screw with my style sheet to make it readable For some reason, the 70% setting in the Legend skin for bullet font size is making the subcat font size TINY! I figured it would be the same as the block menu, but it's much smaller... I can do style sheets though, lol. Thanks again!! ~Barbara Quote Link to comment Share on other sites More sharing options...
Guest luvs2ride1979 Posted June 13, 2006 Share Posted June 13, 2006 That Worked! THANKS! Now I just have to go screw with my style sheet to make it readable For some reason, the 70% setting in the Legend skin for bullet font size is making the subcat font size TINY! I figured it would be the same as the block menu, but it's much smaller... I can do style sheets though, lol. Thanks again!! ~Barbara I FIXED IT! Since the new list was labled "box content" as the style, it shrunk everything down to 75% again (75% of 75%). I made a new style, boxcontent2 with no borders and everything 100%. I also made the li style "bulletLrg". Here's the code I ended up with: <!-- Modified for subcategories in a list format, MarksCarts http://cc3.biz >> --> <!-- BEGIN: sub_cats --> <div class="boxContent2"><span class="txtContentTitle">Choose a Category:</span> <ul style="margin-left: 3em"> <!-- BEGIN: sub_cats_loop --> <li class="bulletLrg"> <a href="index.php?act=viewCat&catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS}) </li> <!-- END: sub_cats_loop --> </ul> </div> <!-- END: sub_cats --> <!-- << Modified for subcategories in a list format, MarksCarts http://cc3.biz >> --> Here's a link to show how it ended up (used the breadcrumb thing for navigation too): http://rescuenetwork.com/tack/index.php?act=viewCat&catId=21 Thanks again for your help! ~Barbara Quote Link to comment Share on other sites More sharing options...
markscarts Posted June 14, 2006 Share Posted June 14, 2006 Thanks again for your help! You're welcome :) Quote Link to comment Share on other sites More sharing options...
convict Posted June 14, 2006 Share Posted June 14, 2006 I really like the idea Worthy of a mod for cubecart.org Similar solution does exist in .org. Search term "Sub categories in a vertical list, For Version 3". :D Quote Link to comment Share on other sites More sharing options...
Guest PoXiE Posted July 16, 2006 Share Posted July 16, 2006 Would it be possible to do the samething for the Killer skin? The list style of layout, not an icon veiw. Quote Link to comment Share on other sites More sharing options...
convict Posted July 17, 2006 Share Posted July 17, 2006 Subcategories are skin independent I think no prob to use this for Killer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.