Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

Category images not appearing
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Category images not appearing

Category images not appearing 11 years, 9 months ago #7286

  • bwhistler
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
category has image. Image is not appearing on the accordion. Module options set to show category images.

What is wrong?

www.brentwhistler.com/dirtylaundry/index.php/

services/pricing category is the one that should have an image

Re: Category images not appearing 11 years, 9 months ago #7310

  • loitt
  • OFFLINE
  • Platinum Boarder
  • Posts: 2222
  • Karma: 48
Dear Kenneth Whistler,

Please insert images into the description of categories.

Thanks
Ticket System | Join our Clubs to download our extensions and templates

Re: Category images not appearing 11 years, 9 months ago #7334

  • bwhistler
  • OFFLINE
  • Single Product
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
OK - I see - I do have a category image (under basic options in the category). I did not understand nor learn from the documentation that the accordion picks up the image from the description and not from the category options.

Thanks!

Re: Category images not appearing 11 years, 9 months ago #7352

  • loitt
  • OFFLINE
  • Platinum Boarder
  • Posts: 2222
  • Karma: 48
Dear Kenneth Whistler,

If you want to display the intro image of category firstly, please go to "modules\mod_sj_categories_accordion\core\categoriesaccordionreader.php", finding:

if (!isset($category->image_extracted)){
	$cat_images = YTools::extractImages($category->description);
	$category->image_extracted = true;
}
if (!isset($category->image)&& isset($cat_images) && count($cat_images)){
	foreach ($cat_images as $i => $cat_url) {
		if (YTools::isUrl($cat_url) || file_exists($cat_url)){
			$category->image = $cat_url;
			break;
		}
	}
}


=>

$category->image = '';
$cat_intro_image = json_decode($category->params);

if(!empty($cat_intro_image->image)){
	$category->image = $cat_intro_image->image;
}else{
	if (!isset($category->image_extracted)){
		$cat_images = YTools::extractImages($category->description);
		$category->image_extracted = true;
	}
	if (isset($cat_images) && count($cat_images)){
		foreach ($cat_images as $i => $cat_url) {
			if (YTools::isUrl($cat_url) || file_exists($cat_url)){
				$category->image = $cat_url;
				break;
			}
		}
	}
}


Thanks
Ticket System | Join our Clubs to download our extensions and templates
  • Page:
  • 1
Time to create page: 0.22 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes