Guest Ringo7 Posted September 6, 2007 Share Posted September 6, 2007 I have added an image to each of my Categories. However, I would like to add an image to the "Sale Items" category as well. Could someone please explain how this is accomplished since there is no option to do so under the ACP? Thanks in advance! John Quote Link to comment Share on other sites More sharing options...
vokf Posted September 6, 2007 Share Posted September 6, 2007 Not easy in ACP- perhaps visit cubecartforums.org and request a mod. The "Sale items" are not really a category, but it does use "viewcat.inc.php If you're feeling brave, you can hack this. Back-up your store first!; I have the SEO mod installed, this code is from CC3.0.0.16 - so if you're on different, the code may be in a different place. Edit /includes/content/viewcat.inc.php Around line 234 Find: if(!empty($currentCat[0]['cat_image'])) { $view_cat->assign("IMG_CURENT_CATEGORY","images/uploads/".$currentCat[0]['cat_image']); $view_cat->assign("TXT_CURENT_CATEGORY",validHTML($currentCat[0]['cat_name'])); $view_cat->parse("view_cat.cat_img"); } Add AFTER: elseif($_GET['catId']=="saleItems") { $view_cat->assign("IMG_CURENT_CATEGORY","images/uploads/your image filename.jpg"); $view_cat->parse("view_cat.cat_img"); } Ensure you set the correct filename for your SALE category image, and the above should work fine. The quickest way to do this in ACP, would be to create a category named SALE (or something unique), and alter the code in the viewcat.inc.php to specify that record, this would allow you to select different images easily - but its a bit beyond this forum. Hope this helps, Jason Quote Link to comment Share on other sites More sharing options...
Guest Ringo7 Posted September 6, 2007 Share Posted September 6, 2007 Thanks Jason! WOW that was quick... Fantastic! Works like a charm! John Quote Link to comment Share on other sites More sharing options...
vokf Posted September 6, 2007 Share Posted September 6, 2007 Cool :-) Happy to help! 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.