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

TOPIC: Manufacturer LInks in Product Details Page

Manufacturer LInks in Product Details Page 11 years 2 months ago #2777

Initially I am not adding manufacturer logos, but will look to include these later as it looks great in your demos.

But is there a way to include a manufacturer link in the product detail page somewhere?

So that user can view all other products form that same manufacturer.
I have Show manufacturers checked in the configuration > Template & I also have set show manufacturers to yes in the flexible plugin?

Thanks in advance.
Attachments:
Last Edit: 11 years 2 months ago by Andy Connell.
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2782

Hi Andy,

Yes, this is already integrated in the template.

If you have a look at virtuemart-2-template-puremart product display

you will see the Citizen Logo (linked) (see attachments)

When this is clicked the manufacturer info is there plus a link to all their products

Regards,

Admin
Attachments:
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2790

The manufacturer link doesn't show in product detail page for me?
Is this because I'm not using manufacturer logos?
Also can the link go direct to manufacturer products page rather than the manufacturer details page?
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2795

Yes, if you have no logos then there's nothing to link to....

To link directly to the manufacturers products page you would need to change the link in
templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php around line 359

from
<div class="FlexibleProductDetailsManufacturerLogoList">  
    	<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>

to
 
<div class="FlexibleProductDetailsManufacturerLogoList">  
    	<a title="<?php echo $ManufacturerName; ?>"   href="<?php JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id) ?>"><img src="<?php echo $this->product->mf_images[0]->file_url_thumb; ?>" alt="<?php echo $ManufacturerName; ?>" /></a>
    </div>
 

Haven't tested this but you get the idea..

Cheers,

Admin
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2856

Thanks for this, but its still not showing up for me?

Does your change only link to the manufacturer page if there is a manufacturer logo?
As I do not have manufacturer Logo's.

All I want is a text manufacturer link from the Product Detail page, so that within the product details the user can easily click on the manufacturer link to see all the other products available from them.
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2860

Yes - in the above case it's still using the manu logos

if you want just some text link then replace the img call - something like
 
<div class="FlexibleProductDetailsManufacturerLogoList">  
    	<a title="<?php echo $ManufacturerName; ?>"   href="<?php JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id) ?>">
		See other products from <?php echo $ManufacturerName; ?>" />
		</a>
    </div>
 
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2863

Sorry to pester again!

Ive tried your last recommendation and again doesn't work.
I reworked it to this below but this also doesnt work?
In the productdetail page all I see is "See other products from" No Manufacturer name or link.

Is echo $ManufacturerName; correct?
<div>  
    	See other products from 
    	<a title="<?php echo $ManufacturerName; ?>"   href="<?php JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id) ?>">
    	<?php echo $ManufacturerName; ?>
		</a>
    </div>
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2864

Ah - there's a if clause above it..
 
  <?php if ($params->get('productdetails_manufacturer',1)) { ?>   
                <?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="FlexibleProductDetailsManufacturerLogoList">  
    	<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 } ?>
 
               	<?php } ?>
 
 

the $ManufacturerName is set by $ManufacturerName = $this->product->mf_name;

so
 
<?php if ($params->get('productdetails_manufacturer',1)) { ?>   
                <?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="FlexibleProductDetailsManufacturerLogoList">  
    	<a title="<?php echo $ManufacturerName; ?>"   href="<?php JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id) ?>">
		See other products from <?php echo $ManufacturerName; ?>" />
		</a>
    </div>
                    <?php  //  } ?>
 
               	<?php } ?>
 
 

just loose the if statement

Cheers
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2867

Spot On! Thanks for your help & perseverance with me!
There was a slight typo, which was adding " /> after the manufacturer name, but I fixed this.
This is the code I have now used & working perfectly!
<?php if ($params->get('productdetails_manufacturer',1)) { ?>   
                <?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="FlexibleProductDetailsManufacturerLogoList">  
    	See other products from 
    	<a title="<?php echo $ManufacturerName; ?>"   href="<?php JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $this->product->virtuemart_manufacturer_id) ?>">
		<?php echo $ManufacturerName; ?>
		</a>
    </div>
                    <?php  //  } ?>
 
               	<?php } ?>
Last Edit: 11 years 2 months ago by Andy Connell.
The topic has been locked.

Manufacturer LInks in Product Details Page 11 years 2 months ago #2869

Excellent - will mark as solved!

Regards
The topic has been locked.
Time to create page: 0.156 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