News:

Looking for documentation? Take a look on our wiki

Main Menu

Show Manufacturers information on "productdetails page"

Started by tobisagt, January 04, 2012, 00:44:16 AM

Previous topic - Next topic

tobisagt

Hi there,

i've made some tabs to switch between "description, reviews and manufactures information". But how to display the last one?

And the second: Is it possible to show one or more products of the manufacture without click on "show all products of..." button in the lightbox?

Thanks
-Tobi

tobisagt


JtouchMobile.com

@tobsagt:

#1: Open /components/com_virtuemart/views/productdetails/tmpl/default.php

Find this code:
if(VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) { ?>

Move its view section to any place (in the file) you refer to

#2: Hack to the view of manufacture, you can find all at /views/manufacturer

But in top of the answers, I think you should take a time on understanding what M-V-C of Joomla do. Then it is very very easy for you to do any custom on VM ;)

Cheers,
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com

tobisagt

Thanks for your post.

Quote from: MobileMeWs on January 05, 2012, 04:07:01 AM
I think you should take a time on understanding what M-V-C of Joomla do. Then it is very very easy for you to do any custom on VM ;)

Thats what i lovley want to do, but i dont have the time yet, to set my focus on that.

I found the code, but this is just to open manufacturers into a lightbox?!

What i want is not to open it. I want the manufacturers properties right in the product detail page.

tobisagt

ok.

What i get to work is:

Manufacturer Name:

$this->product->mf_name

Manufacturer Description:

$this->product->mf_desc

But Manufacturer Image wont work. Anyone can help?

it tried this:

$this->product->manufacturerImage
$this->manufacturerImage

JtouchMobile.com

<?php // Manufacturer Image
   if (!empty($this->manufacturerImage)) { ?>
      <div class="manufacturer-image">
      <?php echo $this->manufacturerImage; ?>
      </div>
   <?php } ?>

;)

P/S: A VM 2.0.0 tiny bug
if (!empty($manufacturerImage)) { ?>
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com

tobisagt

#6
Quote from: MobileMeWs on January 10, 2012, 05:49:24 AM
<?php // Manufacturer Image
   if (!empty($this->manufacturerImage)) { ?>
      <div class="manufacturer-image">
      <?php echo $this->manufacturerImage; ?>
      </div>
   <?php } ?>

;)

P/S: A VM 2.0.0 tiny bug
if (!empty($manufacturerImage)) { ?>

Thx for bugfix! It works now in the lightbox. But still cant get it to work right in the product details.  :-\

Everything was easy:

In manufacturer it looks like:
<?php echo $this->manufacturer->mf_desc ?>

and in the product details:
<?php echo $this->product->mf_desc ?>

But manufacturerImage is different!
It looks:
<?php echo $this->manufacturerImage; ?>

I need the code to show the image right in the product details, not the lightbox. Any ideas?

tobisagt

is there no way to show to "manufacturer image" in the product details?  ???


PRO

on product page $this->    MEANS the product


on category page $this-> MEANS the current category

ON manufacturer page $this-> means current manufacturer


SO, if you notice on the category page, when calling specific product variables it uses
$product->product_name

then on product page $this->product_name


So, now you know what you can play around with to get the images
this will never work on the product page
<?php echo $this->manufacturerImage; ?>

tobisagt

thx for your reply!

So, pls tell me how it should looks like...

$manufacturer->manufacturerImage; and
$manufacturerImage;

also dont work.

PRO

Quote from: tobisagt on January 19, 2012, 15:15:32 PM
thx for your reply!

So, pls tell me how it should looks like...

$manufacturer->manufacturerImage; and
$manufacturerImage;

also dont work.

I dont know, because Im not gonna take the time to try it, BUT will point out how this works

(current object)      (what you are looking for)
       $this->          product->mf_desc



tobisagt

yes,

that how i get it to work for

description:
$this->product->mf_desc

name:
$this->product->mf_name

etc....


but this dont work for manufacturer image :(

PRO

have you tried

$this->product->manufacturer->manufacturerImage

tobisagt