Author Topic: Show Manufacturers information on "productdetails page"  (Read 31519 times)

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Show Manufacturers information on "productdetails page"
« on: January 04, 2012, 00:44:16 am »
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

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #1 on: January 05, 2012, 00:27:34 am »
Does noone know if that is possible?  :-\

JtouchMobile.com

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 96
  • Mobile Solutions for VirtueMart 2
    • JtouchMobile.com
Re: Show Manufacturers information on "productdetails page"
« Reply #2 on: January 05, 2012, 04:07:01 am »
@tobsagt:

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

Find this code:
Code: [Select]
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

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #3 on: January 05, 2012, 23:58:36 pm »
Thanks for your post.

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

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #4 on: January 09, 2012, 11:17:35 am »
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

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 96
  • Mobile Solutions for VirtueMart 2
    • JtouchMobile.com
Re: Show Manufacturers information on "productdetails page"
« Reply #5 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)) { ?>
Author of Jtouch - Mobile solution for Joomla & VirtueMart
http://www.jtouchmobile.com

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #6 on: January 10, 2012, 10:08:09 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

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #7 on: January 13, 2012, 15:11:51 pm »
is there no way to show to "manufacturer image" in the product details?  ???

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #8 on: January 19, 2012, 14:05:53 pm »
Noone knows?  :(

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Show Manufacturers information on "productdetails page"
« Reply #9 on: January 19, 2012, 15:06:13 pm »
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; ?>
I do NOT do development work for hire.

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #10 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.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Show Manufacturers information on "productdetails page"
« Reply #11 on: January 19, 2012, 15:43:14 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


I do NOT do development work for hire.

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #12 on: January 19, 2012, 15:48:37 pm »
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Show Manufacturers information on "productdetails page"
« Reply #13 on: January 19, 2012, 15:53:01 pm »
have you tried

$this->product->manufacturer->manufacturerImage
I do NOT do development work for hire.

tobisagt

  • Jr. Member
  • **
  • Posts: 104
Re: Show Manufacturers information on "productdetails page"
« Reply #14 on: January 19, 2012, 16:40:33 pm »
have you tried

$this->product->manufacturer->manufacturerImage

yes, dont work for me.