News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

I am trying to remove the MFG link from the product page

Started by RFIDBob, June 26, 2012, 00:48:28 AM

Previous topic - Next topic

RFIDBob

Team,


I am sure someone has already figured this out. I have spent all day looking at the forum and my website and I thought I would send up a message to see if anyone has a quick solution for me.

I want to remove the Manufacturer link that appears on each product page on my store. Please look at my attached screen shot. I have a separate menu on the right for all my manufacturers so I don't want there to be another on on the product page. I have played around on in a lot of areas trying to remove this "simple link" I just want it gone. Take a look at this screen shot and let me know if any one has  a simple way to do this. The closest I have come is to remove the contents of the controller file under:

components/com_virtuemart/controllers/manufacturer.php

this method will bring up a blank page when the link is clicked, which does not fix the problem. Its just a way to prevent the content from coming up. But I want to remove the entire link. I have gone into each of the view directories trying to find the code that disables this link. The closest I have come is the contents of:

components/com_virtuemart/views/productdetails/tmpl/default.php

on line225 the following code exists:

<?php
      // Manufacturer of the Product
      if (VmConfig::get('show_manufacturers', 1) && !empty($this->product->virtuemart_manufacturer_id)) {
          echo $this->loadTemplate('manufacturer');
      }
      ?>

I have tried commenting it out and removing it all together and it does nothing to remove that pesky link.

Please, any Ideas would be very helpful.

thanks,

-RFIDBob

[attachment cleanup by admin]
Vist our online RFID store at argowireless.com

srajca

hey try this. Change this code in templates/YOURTEMPLATE/html/com_virtuemart/productdetails/default_manufacturer.php
<?php
/**
 *
 * Show the product details page
 *
 * @package VirtueMart
 * @subpackage
 * @author Max Milbers, Valerie Isaksen

 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default_manufacturer.php 5409 2012-02-09 13:52:54Z alatak $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>

<div class="manufacturer">
    <?php
    $link 
JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' $this->product->virtuemart_manufacturer_id '&tmpl=component');
    
$text $this->product->mf_name;

    
/* Avoid JavaScript on PDF Output */
    
if (strtolower(JRequest::getWord('output')) == "pdf") {
echo JHTML::_('link'$link$text);
    } else {
?>

        <span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL'?></span><a class="modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $link ?>"><?php echo $text ?></a>
    <?PHP } ?>
</div>

with this one
<?php
/**
 *
 * Show the product details page
 *
 * @package VirtueMart
 * @subpackage
 * @author Max Milbers, Valerie Isaksen

 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default_manufacturer.php 5409 2012-02-09 13:52:54Z alatak $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
?>

<div class="manufacturer">
    <?php
    $link 
JRoute::_('index.php?option=com_virtuemart&view=manufacturer&virtuemart_manufacturer_id=' $this->product->virtuemart_manufacturer_id '&tmpl=component');
    
$text $this->product->mf_name;

    
/* Avoid JavaScript on PDF Output */
    
if (strtolower(JRequest::getWord('output')) == "pdf") {
echo JHTML::_('link'$link$text);
    } else {
?>

        <span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL'?></span><a class="modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}"><?php echo $text ?></a>
    <?PHP } ?>
</div>

i just looked at it briefly, but I think it should work.
Let me know if this fixes your issue.

RFIDBob

Srajca,

You are awesome. I owe you a beer, a shot, or whatever you do. My biggest problem in VM is knowing exactly where to go in the file structure to make the changes that I know need to happen. I was able to navigate  to templates/MYTEMPLATE/html/com_virtuemart/productdetails/default.php

and I was able to delete line #266

<span class="bold"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_DETAILS_MANUFACTURER_LBL'?></span><a class="modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $link ?>"><?php echo $text ?></a>

This line is the line that makes the text on the product page "Manufacturer 'YOURMFG'" deleting this line removed all trace to the link. I have a slightly different organization method for my site due to a specialized template. Using this link would take the user back to a page without any of my side menus and would look very unusual.

The MOST important thing in E-Commerce is consistency in your website. If a user sees something that they perceive as an error or problem with the site they will NOT use their credit card to make a purchase.  Users equate page consistency with credit card security.

Again, Srajca thanks a lot... you can see the results in my latest screen shot.



[attachment cleanup by admin]
Vist our online RFID store at argowireless.com

srajca

Perfect, I am glad I was able to help.
P.S. your shop looks pretty good.