Post by neil » Wed Nov 30, 2016 4:31 pm

Hi

We are using the W3 validator to check our website but it has fired up a few error reports on the home page could anyone be of any assistance please. We are use Op[encart version 1.5.5.1

https://validator.w3.org/nu/?showsource ... 2F#l351c16

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by sachin6609 » Sat Dec 10, 2016 3:28 pm

Hii

You just Need To Add "alt" tag in img tag like bellow

Your Error
<img src="http://www.angliaclipperservices.com/im ... 0x480r.jpg" style="width: 100%"/>

Add Alt Tag in img tag like below

<img src="http://www.angliaclipperservices.com/im ... 0x480r.jpg" style="width: 100%" alt="IMAGE_NAME_GOES_HERE"/>

Active Member

Posts

Joined
Thu Jul 23, 2015 2:57 pm

Post by neil » Mon Dec 12, 2016 10:15 pm

Thanks I understand we need to add the alt attribute but any idea where the file that needs changing is located?

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm


Post by IP_CAM » Tue Dec 13, 2016 2:52 am

By OC v.1.5.6.x Default, exept for the Shop Logo, and a few other Pic's, mostly all image links either contain a TITLE and/or ALT Tag, as you can see in the 1.5.6.5 Code Samples, listed below. It would have to be redone in all the xxx.tpl Files, where image links exist, if it does not yet exist in your OC v.1.5.x. It's not much work either.
Just don't ask me for the reason, why they are not the same in all links, the british way of doing things has always been a little different from others... :laugh:

Code: Select all

category:
<?php if ($thumb) { ?>
<div class="image"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></div>
<?php } ?>

Code: Select all

product:
 <?php foreach ($images as $image) { ?>
<a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox col-xs-4 col-sm-3 col-md-3">
<img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" />

Code: Select all

product-related items:
<div class="image">
<a href="<?php echo $product['href']; ?>">
<img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" />
</a>
</div>

Code: Select all

specials:
<div class="image">
<a href="<?php echo $product['href']; ?>">
<img src="<?php echo $product['thumb']; ?>" title="Click to see more details on <?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" />
</a>
</div>
and if you want to add width/height Tags into your images, just download this Extension:
Cookieless HTTP Domain Routing
https://www.opencart.com/index.php?rout ... n_id=23506
to find out, where you have to insert the TAGS, to make it work. You don't need the VqMod for this, it serves just as reference, you could add the Values directly into both the shop root and admin:
... /model/tool/image.php
Files, like on this sample line shown here:

Code: Select all

return $this->config->get('config_url') . 'image/' . $new_image . '" width="' . $width . '" height="' . $height;
Still, it's always much better, to remote/url-link the images, by use of the Extension, all Site Tester Performance Results will look much brighter too, and you don't have to manipulate anything in Source Files, to have your image sizes shown as well! ! ;)
And you probably don't even have to add Links to the config.php files, I believe, v.1.5.5.x still has those HTTP_IMAGE link- settings already by default. If so, then just change them, to link the images the Cookie-free way!

The Shop Logo TAG's would manually have to be added in the:
theme/template/common/header.tpl
like:

Code: Select all

<div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" width="269" height="56" /></a></div>
Good Luck !
Ernie

PS: This style="width: 100%"/> is a potentially dangerous Image Value, it could 'influence' your image sizes, to really look like sh.. :-\ , and the Bootstrap Routine probably cannot handle this value either in a proper matter.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland


Post by neil » Tue Dec 13, 2016 9:37 pm

Really I just want to add the alt attribute to the slideshow images but I just need to know where to look?

As I say the attribute already seems to be in place @ catalog/view/theme/default/template/module/slideshow.tpl

<div><a href="<?php echo $banner['link']; ?>"><img src="<?php echo $banner['image']; ?>" alt="<?php echo $banner['title']; ?>" title="<?php echo $banner['title']; ?>" /></a></div>

New member

Posts

Joined
Wed Aug 04, 2010 7:06 pm

Who is online

Users browsing this forum: No registered users and 282 guests