Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - FashionMart (SKU# FLEX-00008)

TOPIC: Manufacturer logo in product view fails

Manufacturer logo in product view fails 9 years 5 months ago #2944

Before we upgraded to VM 2.0.18a we had manufacturer logo displayed in the product details page.

I have added code according to the "receipe" in the sticky post in this forum regarding manufacturer logos.
<?php
if (empty($this->product->mf_images[0]->file_url_thumb)) {
  echo "";   // leave here empty so nothing will be visible
} else { ?><?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $this->product->mf_name;
?>   
	 <div class="FlexibleProductDetailsManufacturerLogo">  
    	<a title="<?php echo $ManufacturerName; ?>"  rev="iframe|550|650"  rel="facebox" href="<?php echo $ManufacturerLink ?>"><img src="<?php echo $this->product->mf_images[0]->file_url_thumb; ?>" alt="<?php echo $ManufacturerName; ?>" /></a>
    </div>
                    <?php } ?>

I'm just wondering why this doesn't work anymore? Did VM make changes so that this code doesn't work?

Happy to hear your thoughts on this... :)
The topic has been locked.

Manufacturer logo in product view fails 9 years 5 months ago #2959

That is the code we are using - don't see any reasn why it shouldn't work..

url so we can have a look?

Thanks

Admin
The topic has been locked.

Manufacturer logo in product view fails 9 years 5 months ago #2962

The topic has been locked.

Manufacturer logo in product view fails 9 years 5 months ago #2963

The link is there but commented out???? Why?
 
<br>
<!-- <div> <a rev="iframe|550|650" rel="facebox" href="/component/virtuemart/produsenter/2013-03-07-06-13-351743794178?tmpl=component&amp;Itemid=0"><img src="/" height="35" /></a> </div> -->
<br>
<br>
 

see attached

the link works -> /component/virtuemart/produsenter/2013-03-07-06-13-351743794178?tmpl=component&Itemid=0

kollevold.no/component/virtuemart/produsenter/2013-03-07-06-13-351743794178?tmpl=component&Itemid=0

but the image is missing..

can you print the $this->product->mf_images[0]->file_url_thumb ?

It is doubly strange because the code says if $this->product->mf_images[0]->file_url_thumb; is empty echo nothing..

Please check your code again..

Cheers
Attachments:
Last Edit: 9 years 5 months ago by John.
The topic has been locked.

Manufacturer logo in product view fails 9 years 5 months ago #2965

Maybe the problem started right before the update...
We had some help managing and adding products and manufacturers...
And "somebody" managed to rename the blank manufacturer (id=1) and used that one as a new manufacturer...
Then the same "somebody" made a new blank manufacturer (id=49) and whenever I tried to "clean up", the same qstars logo appeared as default. and all the manufacturer aliases was named "2013-03-07-06-13-351743794178" or like that.
I changed the alias to the right name (michelin, compomotive, and so on....). But things didn't seem right,

Then we decided to use an old backup of the tables for manufacturer. and started all over again with the blank as id=1.
Then I added the manufacturers so that they all got the same ID they had before (since half of the 8000 products already was registered with manufacturers).

But then I now see that the "2013-03-07-06-13-351869800916" aliases still are in the system somewhere. Even though I put "michelin" as the alias. (see attached image)

Attachment michelin-vm.jpg not found


And as I added the manufacturers, the logo files were renamed in the system to "michelinlogo4.jpg" or "omplogo2.jpg" since we already uploaded the logos before with the same name.

Now I renamed the alias to michelin, and then the link I want to use works ( www.kollevold.no/component/virtuemart/produsent/michelin )

I just don't know how to get out of this mess and have the manufacturers logos displayed on the product details page.

And now I "commented in" the link i took out. It is basically the same link twice now, except the bottom one says that if the image is missing, it displays nothing... And it doesn't look good displaying the red x where the logo image is supposed to be.

I find it hard to explain this, but hopefully you're used to beginners like me... ;)

Hope to hear from you soon! :)
The topic has been locked.

Manufacturer logo in product view fails 9 years 5 months ago #2979

Can't say I understand a word of what you've written .. :(

But the position your in is this - I think... ;)

The links work fine

http://www.kollevold.no/component/virtuemart/produsenter/2013-03-07-06-13-351743794178?tmpl=component&Itemid=0

the image is missing .. in the template but there in the popup

http://www.kollevold.no/images/stories/virtuemart/manufacturer/resized/qstarz6_200x200.jpg

You need to know what VM thinks should be the image

this object

$this->product->mf_images

in the template add this and see what the object is
 
 
<?php
 
// INSERT THE CODE HERE
 
 
if (empty($this->product->mf_images[0]->file_url_thumb)) {
  echo "";   // leave here empty so nothing will be visible
} else { ?><?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $this->product->mf_name;
?>   
	 <div class="FlexibleProductDetailsManufacturerLogo">  
    	<a title="<?php echo $ManufacturerName; ?>"  rev="iframe|550|650"  rel="facebox" href="<?php echo $ManufacturerLink ?>"><img src="<?php echo $this->product->mf_images[0]->file_url_thumb; ?>" alt="<?php echo $ManufacturerName; ?>" /></a>
    </div>
                    <?php } ?>
print 'Debug Line '.__LINE__.' $this->product->mf_images <pre>'; print_r ($this->product->mf_images); print "</pre><br />\n";
 

though still don't know why it gets past the if statement if it is empty?

Cheers
Last Edit: 9 years 5 months ago by John.
The topic has been locked.

Manufacturer logo in product view fails 9 years 5 months ago #3000

Thanks. My problem is hard to explain, but I will try your code as soon as I'm back in my office. i'll let you know how it turnes out. :)
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3009

This is what was displayed with the debug code:

Attachment bilde.jpg not found

Last Edit: 9 years 4 months ago by Christin Larsen.
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3013

so nothing?

whats the url of that page?

then hows it getting past the

if (empty($this->product->mf_images[0]->file_url_thumb)) {

??

put something in the empty to see if it really empty..
 
if (empty($this->product->mf_images[0]->file_url_thumb)) {
  echo "YES I AM EMPTY";   // leave here empty so nothing will be visible
} else { ?><?php
$ManufacturerLink = JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id . '&tmpl=component');
$ManufacturerName = $this->product->mf_name;
?>   
	 <div class="FlexibleProductDetailsManufacturerLogo">  
    	<a title="<?php echo $ManufacturerName; ?>"  rev="iframe|550|650"  rel="facebox" href="<?php echo $ManufacturerLink ?>"><img src="<?php echo $this->product->mf_images[0]->file_url_thumb; ?>" alt="<?php echo $ManufacturerName; ?>" /></a>
    </div>
                    <?php } ?>
 
Last Edit: 9 years 4 months ago by John.
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3020

See for yourself: :)
www.kollevold.no/mekaniker-depot/mekanikerdresser/mekanikerdress-omp-master-detail

I've cleaned up in the database table where all the manufacturers images was listed. I've removed all the old and deleted file names and connections.

If I now only knew the filenames the system is asking for, I can always rename the files I have in the manufacturers folder....
Last Edit: 9 years 4 months ago by Christin Larsen.
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3022

The problem is VM doesn't know

the html is
 
<div>                   
     <a href="/component/virtuemart/produsenter/omp?tmpl=component&amp;Itemid=0" rel="facebox" rev="iframe|550|650" title="OMP"><img src="/"></a>
</div>

but there is so much more I don't understand about your problem -
If $this->product->mf_images[0]->file_url_thumb is empty and shows the EMPTY then how is the else html being shown

If the manu page works fine with the man image why isn't the details page working

AFAIK it is just the manufacturer model that is used.. if the thumb is known there then why not on the details page..?

the file path and name will be identical to the manu page

the jos_virtuemart_manufacturer_medias just links a manu id to a jos_virtuemart_medias id..

Sorry - I really don't know what you've done...
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3037

Hi Christin.

Every time you update your Virtuemart, you need to re-follow this tutorial:
www.flexiblewebdesign.com/forum-virtuemart-2-template-puremart-support/250-tutorial-how-to-show-manufacturer-logos

Because that file :/administrator/components/com_virtuemart/models/product.php
has been reset back to stock (with update) and you need to re-modify it by following the same exact tutorial.

Regards.
Forum Support.
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3042

Aha.... That did it! Thanks!

:)
The topic has been locked.

Manufacturer logo in product view fails 9 years 4 months ago #3135

sure, your welcome.

Case solved. Topic is closed.

Regards.
The topic has been locked.
Time to create page: 0.133 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo