Page 1 of 1

I am not sure if this is a bug or not?

Posted: Tue Nov 03, 2015 8:39 am
by Jhammo
Hello,

I want to do the most basic thing in the world. I am trying to use a custom html banner with 4 photos in it, and I want to link the photos to different URL's. Each time I try, Open Cart requires that I need "Text to Display"; I do not want text to display, and I just want the damn photo clickable. Is this a bug problem with 2.0, or am I that stupid with the damn editor.

Thank you for anyones response

Re: I am not sure if this is a bug or not?

Posted: Sun Nov 08, 2015 1:49 pm
by daniGo
Banner has validation for title:

Code: Select all

if ((utf8_strlen($banner_image_description['title']) < 2) || (utf8_strlen($banner_image_description['title']) > 64)) {
You must insert the title or remove this validation. But the title is used only for image attribute "alt" and is not visible on default banner, carousel and slideshow.

If title validation bothers you open admin/controller/design/banner.php and remove from line 408:

Code: Select all

if (isset($this->request->post['banner_image'])) {
	foreach ($this->request->post['banner_image'] as $banner_image_id => $banner_image) {
		foreach ($banner_image['banner_image_description'] as $language_id => $banner_image_description) {
			if ((utf8_strlen($banner_image_description['title']) < 2) || (utf8_strlen($banner_image_description['title']) > 64)) {
				$this->error['banner_image'][$banner_image_id][$language_id] = $this->language->get('error_title');
			}
		}
	}
}