Author Topic: Show manufacturer logo in the product details  (Read 1934 times)

Menace

  • Beginner
  • *
  • Posts: 42
Re: Show manufacturer logo in the product details
« Reply #15 on: August 17, 2012, 13:25:55 PM »
I think you don't understand what I mean...

Using the line I posted means that users just have to name the image the same way the manufacturer is named in the backend and upload the image there. NOTHING ELSE. They don't have to change anything afterwards.

cherokee

  • Beginner
  • *
  • Posts: 16
Re: Show manufacturer logo in the product details
« Reply #16 on: August 17, 2012, 13:49:39 PM »
thanks
I will continue investigating.
Menace's solution if it worked
thanks

dze

  • Beginner
  • *
  • Posts: 1
Re: Show manufacturer logo in the product details
« Reply #17 on: November 12, 2012, 09:31:54 AM »
Thanks Ruben V.C.
In my case "userfriendly" means user don't need to rename the image... just have to upload it.

I repeat that mine is not the best solution, but if I have time I will do what I said before: when you save a manufacturer image, force it to be renamed with manufacturers id name... Still have to think on how to solve de extension (.jpg or .png or whatever) stuff...





I'm a little refined.
Replacing spaces with "_".
Quote
<?php
       $img_format = ".jpg";
      
      
      $mfname = $this->product->mf_name;
      $pattern = "/\s/";
      $replacement = "_";
      $way =  preg_replace($pattern, $replacement, $mfname);
      $way = strtolower($way).$img_format;
      
      
      
      
      
      ?>
        <img src="/images/stories/virtuemart/manufacturer/<?php echo $way ?>"



VirtueMart Forum

Re: Show manufacturer logo in the product details
« Reply #17 on: November 12, 2012, 09:31:54 AM »