Skip to main content

Shadowbox not showing image title

More
11 years 11 months ago #174792 by Udo
-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.4.33
-- Browser(s) name and version -- : Firefox 32.0.3

Hi,

Some days ago I migrated from Joomla 1.5 to Joomla 2.5 and upgraded Hikashop Business from 2.3.0 to 2.3.3.
The Image popup mode is shadowbox (embedded).
The problem was that the product image titles are not displayed in the popup anymore. Searching for a way to repair this I found out 2 things.

1. The shadowbox integration has changed. Before it was the Shadowbox plugin, now it's shadowbox.js
Up till now I didnot realize that and I still use the Shadowbox plugin.
I switched to shadowbox.js, but still the image titles don't show. The plus of shadowbox.js is that the first image stops showing twice.

2. After installing the old override hikashop_image.php in the template/html map the images titles are displayed again!
Alas the first image is loaded twice again.

My question: is there a way to get shadowbox.js to show the image titles in the popup?
If that's not possible I prefer using the old override.

Regards,
Udo

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #174828 by Jerome
Hi,

We put the title on the image but we do not put the title on the link.
You can override the view "product | show_block_img" and replace
Code:
$attr = ''; if (!empty ($this->element->images) && count($this->element->images) > 1) { $attr = 'onclick="return window.localPage.openImage(\'hikashop_main_image'.$variant_name.'\');"'; }
By
Code:
$attr = 'title="'.$this->escape(@$image->file_description).'"'; if (!empty ($this->element->images) && count($this->element->images) > 1) { $attr .= 'onclick="return window.localPage.openImage(\'hikashop_main_image'.$variant_name.'\');"'; }
And also
Code:
$attr = 'onmouseover="return window.localPage.changeImage(this, \'hikashop_main_image'.$variant_name.'\', \''.$img->url.'\', '.$img->width.', '.$img->height.', \''.str_replace("'","\'",@$image->file_description).'\', \''.str_replace("'","\'",@$image->file_name).'\');"';
By
Code:
$attr = 'title="'.$this->escape(@$image->file_description).'" onmouseover="return window.localPage.changeImage(this, \'hikashop_main_image'.$variant_name.'\', \''.$img->url.'\', '.$img->width.', '.$img->height.', \''.str_replace("'","\'",@$image->file_description).'\', \''.str_replace("'","\'",@$image->file_name).'\');"';
It will add the title on the link so shadowbow will display it correctly.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #174974 by Udo
Thanks, great!
The override also works when using the shadowbox plugin in stead of shadowbox.js.

regards,
Udo

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #204307 by lovettph
Where do I find this code?

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #204328 by Jerome
Hi,

You can override the view "product | show_block_img" and replace

Like I wrote, in the view "product | show_block_img".
www.hikashop.com/support/documentation/1...ize-the-display.html

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #204954 by lovettph
That documentation does not help me. Is there another way you can explain it?

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #204955 by lovettph
I don't see this code:

$attr = '';
if (!empty ($this->element->images) && count($this->element->images) > 1) {
$attr = 'onclick="return window.localPage.openImage(\'hikashop_main_image'.$variant_name.'\');"';
}


In the CSS

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205045 by lovettph
I'm not sure if it's because the versions are different, but the code is not the exact same. The closest I could find is:

if (!empty ($this->element->images) && count($this->element->images) > 1) {
$firstThunb = true;
foreach ($this->element->images as $image) {
if($this->image->override) {
echo $this->image->display($image->file_path, 'hikashop_main_image'.$variant_name, $image->file_name, 'class="hikashop_child_image"','', $width, $height);
}

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205052 by nicolas
Hi,

Yes, the code changed since then.
Actually, if you look at the sho_block_img file via the menu Display>Views, you'll see this:
take.ms/qCdsF
So as you can see the title is now added automatically. So these modifications should not be necessary.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205094 by lovettph
Thank you for your patience with me. I updated the code, but when I click on the picture of the product the name of (name or title) does not come up with the pic. I've activated the site I am trying to build. It is at vivianl.me . On the footer menu, click test. It's a makeup site. When you get to the actual lipsticks, the color doesn't coordinate with the picture. So I need to picture to state which color it actually is.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205137 by Xavier
Hi,

Please backup and remove the override of the view "product / show_block_img" via the menu Display > Views.
I think that you have overrides on that view so you don't have the latest version.

Do you have the latest version of HikaShop ?

ps: the domain name has expired.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205333 by lovettph
Ok, I updated to the latest version and then I replaced the code with what was originally there.

I now have 2.5.

I always have issues with .me sites :/ For whatever reason, they don't automatically renew according to the settings. The host has to manually do it :(

So what do I try now?

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205334 by Jerome
Hi,

For the registration of your website with your subscription, you have to do that in the "my subscription" page.
www.hikashop.com/my-account/your-subscriptions.html

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205440 by lovettph
Thank you. What else can I do to allow the shadowbox to show the image name or image title?

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205442 by Jerome
Hi,

The patch explained in the previous post is the current working solution.
www.hikashop.com/forum/integrations/8721...ge-title.html#174828

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205483 by lovettph
I've been told to do like 3 different things. I was told to change the code, then to not change it. Then update the version. Now that I've updated the version, should I replace the code?

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago - 11 years 3 months ago #205502 by nicolas
Hi,

As I said in my previous message here www.hikashop.com/forum/integrations/8721...ge-title.html#205052 , there is no need to change any code. The title is displayed by shadowbox automatically with the latest versions of HikaShop, as long as you specify it in your images.
I've just tried on my end and it works just fine.

If you sitll have the issue, it means that you have a template override on the show_block_img file.
Rename the file templates/YOUR_TEMPLATE/html/com_hikashop/product/show_block_img.php to something else via FTP and that will solve the problem.
Last edit: 11 years 3 months ago by nicolas.

Please Log in or Create an account to join the conversation.

More
11 years 3 months ago #205556 by lovettph
Thank you. It works.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #230133 by alevogel
Hello
I have the latest version of Hikashop Business and no override on the show_block_img. The image title is only displayed in image pop up mode shadow box, but not in mode mootools. Is there any way to show title in mootools mode as well?

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #230174 by Jerome
Hi,

The "Squeezebox" (mootools) library provided by Joomla does not allow to display title.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.327 seconds
Powered by Kunena Forum