VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: kelecz on December 26, 2014, 21:10:59 PM

Title: Picture's displayed name same as Product name
Post by: kelecz on December 26, 2014, 21:10:59 PM
Hello there,

as my post title say: when customer click on picture to see it biger, how can we have it as product title(name). I need that as hack, I know how to make it VM config.
But if you have 10000 or more is complicated, and I have problems with CSVI method. Is it possible just to take it from product name? And if there is 5 or 3 pictures for one product?
VM 2.6.10
Joomla 2.5.28

[attachment cleanup by admin]
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 29, 2014, 20:52:33 PM
Nothing?
Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 29, 2014, 22:14:14 PM
isn't it
if($description) $postText = $this->file_description;

in administrator\components\com_virtuemart\helpers\image.php ~ line 71   ?
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 29, 2014, 23:21:53 PM
Thanks for answer.

Maybe it is. But what to do.  :D Beginner, sorry.

Quote}
         $postText = false;
         if($description) $postText = $this->file_description;
         return $this->displayIt($file_url, $file_alt, $imageArgs,$lightbox,$effect,$postText);
      } else {
         //Media which should be sold, show them only as thumb (works as preview)
         return $this->displayMediaThumb('id="vm_display_image"',false);
      }

This is how it looks.

If you can help I'll be grateful.

Regards,
Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 30, 2014, 00:22:07 AM
if($description) $postText = $this->file_title;   ?
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 30, 2014, 12:47:27 PM
THX for answer.

Nope. I'd tried product_name, product_title,....

Maybe live view of site: http://petproba.konji.rs/petshop/psi/zvezde-9cm-detail

If you open orange star you'll see 8866_a.jpg, that is Image Alt-Text in VM Config or file_meta in CSVI csv file (for example).

But I am sure that you are 100% close.
Title: Re: Picture's displayed name same as Product name
Post by: PRO on December 30, 2014, 12:58:44 PM
I use CSV improved media import/export to change the names in the database

http://www.csvimproved.com/en/


Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 30, 2014, 13:03:58 PM
Yes, me either.

But if it is option that databases mismatches, and  always is, that will be great option.

But thanks for answer and you time.

Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 30, 2014, 14:17:30 PM
Your not using a standard template!!!!!!

who knows what they have coded to use as the image title... it appears to be the file name..

on a STANDARD VM install it is $file_alt in the image helper  - which is where the confusion came from -- std VM shows the $file_alt = $this->file_meta;

Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 30, 2014, 16:08:39 PM
This is my image helper file.



[attachment cleanup by admin]
Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 30, 2014, 16:10:39 PM
of course it will be completely std. unless u have altered it - thats not the point -- it is what your template does with the rendering that matters..
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 30, 2014, 16:16:57 PM
How can I found that? Just to investigate.... Hm

Ok, thank you very much. You are so kind. If I found some solution I'll notice you.

Regards,
Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 30, 2014, 18:29:24 PM
you need to find the code rendering your lightbox layout - but that is way past what advice can be given via the forum
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 31, 2014, 01:10:43 AM
Dear GJC Web Design,
I think that I found write file. Can you just take a look please.

THX

[attachment cleanup by admin]
Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 31, 2014, 10:28:09 AM
IMHO it has nothing to do with any core VM files - it is in your template somewhere you need to change

Have you tested with Beez etc?
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 31, 2014, 11:12:55 AM
Nope, and I do not know how.
THX anyway!
Title: Re: Picture's displayed name same as Product name
Post by: AH on December 31, 2014, 11:52:09 AM
Post your in the paid support boards to see if anyone wants to take a look.
Title: Re: Picture's displayed name same as Product name
Post by: GJC Web Design on December 31, 2014, 12:47:44 PM
or just hide the label with css....

http://petproba.konji.rs/plugins/system/vmslider/css/fancybox/jquery.fancybox.css

.fancybox-title-float-wrap {
  bottom: 0;
  display: none;
  margin-bottom: -35px;
  position: absolute;
  right: 50%;
  text-align: center;
  z-index: 8050;
}
Title: Re: Picture's displayed name same as Product name
Post by: jjk on December 31, 2014, 14:00:34 PM
Note that the alt-text display for the lightbox is handled in the file mediahandler.php (line 570 in your version of mediahandler.php), if your template uses the standard VirtueMart lightbox.

if($lightbox){
            $image = JHTML::image($file_url, $file_alt, $imageArgs);
            if ($file_alt ) $file_alt = 'title="'.$file_alt.'"';

Personally I've changed my alt-text display for the lightbox images to this:

         if($lightbox){
            $image = JHTML::image($file_url, $file_alt, $imageArgs);
            if ($file_alt ) $file_alt = 'title="'.$withDesc.'"';

but I don't know how to get the product name into that (other than changing it in the database). In the long run, it will be easier and better for SEO to upload product images with product names when adding new products.  "dog-transport-box.jpg" certainly is a better filename than a meaningless "39342.jpg".
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on December 31, 2014, 18:12:07 PM
THX GJC, you are really nice. Thank you for your time and effort.

Thanks JJK. Yes, that is reason why I start this post. I want product_name be as Ctr-alt or file_meta or name of the picture. SEO is big reason and of course it is looking more professional and you do not take care for one more data field.
That is the point.

THX
Title: Re: Picture's displayed name same as Product name
Post by: kelecz on January 01, 2015, 13:29:42 PM


As PRO said this is solution with CSVI but I have to try 100 times with a lot of problems. But works. This is result on pictures.
But I will try to found solution with product_name.

[attachment cleanup by admin]