Guest SweetNightshade Posted August 24, 2009 Share Posted August 24, 2009 My employer wants me to figure out how to show the number of items in each category on the category side-bar. URL is www.sheetmusicstorehouse.com Any suggestions? Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 25, 2009 Share Posted August 25, 2009 The category admin section shows these values, so we just need to copy the query. In the file \includes\boxes\categories.inc.php, find the line that has: $results = $db->select("SELECT cat_name, cat_id FROM and change it to: $results = $db->select("SELECT cat_name, cat_id, noProducts FROM Now we need to tweak the template. Find the file \skins\YOUR_SKIN\styleTemplates\boxes\categories.tpl, find the line that has: {DATA.cat_name} and change it to: {DATA.cat_name} ({DATA.noProducts}) See how that flies. Quote Link to comment Share on other sites More sharing options...
Guest SweetNightshade Posted September 7, 2009 Share Posted September 7, 2009 The category admin section shows these values, so we just need to copy the query. In the file \includes\boxes\categories.inc.php, find the line that has: $results = $db->select("SELECT cat_name, cat_id FROM and change it to: $results = $db->select("SELECT cat_name, cat_id, noProducts FROM Now we need to tweak the template. Find the file \skins\YOUR_SKIN\styleTemplates\boxes\categories.tpl, find the line that has: {DATA.cat_name} and change it to: {DATA.cat_name} ({DATA.noProducts}) See how that flies. You are awesome, worked like a charm. Thanks. 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.