Hi David,
further to recent email, I eventually managed to add missing "alt" text's to images throughout PT via the templates in PT configuration, but I'm stuck with adding them to the merchant Logo's. Looking to add the merchant name as alt text.
Could you advise how this can be done please?
Hi David,
Tried that, still not showing any "Alt" !
Ah, just dawned on me!
This is for the logo's on the product pages, I am referring to the Logo's on the Merchants page... apologies for the confusion.
I missed this one anyway, thanks for that.
Cheers!
Ah yes, that would be in pto_atoz.php although there's no product name in context, you could add the merchant name as alt text by looking for the following code at line 148:
$item = "<img border='0' src='".$pto_config_externalBaseHREF."logos/".str_replace(" ","%20",$row->$module).$pto_config_logoExtension."' />";
...and REPLACE with:
$item = "<img alt='".htmlentities($row->$module,ENT_QUOTES,get_option("blog_charset"))."' border='0' src='".$pto_config_externalBaseHREF."logos/".str_replace(" ","%20",$row->$module).$pto_config_logoExtension."' />";
Cheers,
David.
--
PriceTapestry.com
Product name was a typo, it was the merchant name that I actually wanted to show for these logo's.
Thanks David.
Can we add Merchant name for Alt text please for this instance?
Hi,
Above comment should add the merchant name as alt text if that's not working as expected let me know - apologies the thread became a bit mixed up because of the original post not being published...
Cheers,
David.
--
PriceTapestry.com
Oh right...
Your code for pto_atoz.php works fine thanks, but the code for the pto_poduct.php is showing the product title and not the merchant name.
Can you change this code to show alt merchant name please:
$merchant_html = "<img alt='".htmlentities($product->original_name,ENT_QUOTES,get_option("blog_charset"))."' border='0' src='".$pto_config_externalBaseHREF."logos/".str_replace(" ","%20",$product->merchant).$pto_config_logoExtension."' />";
Sure - have a go with;
$merchant_html = "<img alt='".htmlentities($product->merchant,ENT_QUOTES,get_option("blog_charset"))."' border='0' src='".$pto_config_externalBaseHREF."logos/".str_replace(" ","%20",$product->merchant).$pto_config_logoExtension."' />";
Cheers,
David.
--
PriceTapestry.com
Hi,
Sure - edit pto_product.php and look for the following code at line 105:
$merchant_html = "<img border='0' src='".$pto_config_externalBaseHREF."logos/".str_replace(" ","%20",$product->merchant).$pto_config_logoExtension."' />";
...and REPLACE with:
$merchant_html = "<img alt='".htmlentities($product->original_name,ENT_QUOTES,get_option("blog_charset"))."' border='0' src='".$pto_config_externalBaseHREF."logos/".str_replace(" ","%20",$product->merchant).$pto_config_logoExtension."' />";
Cheers,
David.
--
PriceTapestry.com