Jump to content

Add an Image to the "Sale Items" category


Guest Ringo7

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...