News:

Support the VirtueMart project and become a member

Main Menu

[Solved]How to get rid of thumbnail in product details page

Started by Fintan, March 10, 2012, 10:11:45 AM

Previous topic - Next topic

Fintan

Hello, congrats on 2.0.2 stable. :)

As the title states I would like to get rid of the thumbnail in the product detail page and just see the full size picture. What do I have to tweak?

jenkinhill

Edit the product image template and create an override, the relevant section is labelled // Showing The Additional Images

joomla_root/components/com_virtuemart/views/productdetails/tmpl/default_images.php

http://forum.virtuemart.net/index.php?topic=90935.0


Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Fintan

Okay this is what I did (my PHP is sh...y ;) ):
I changed this line:
// Showing The Additional Images
// if(!empty($this->product->images) && count($this->product->images)>1) {
if (!empty($this->product->images)) {
    ?>
    <div class="additional-images">
<?php
// List all Images
if (count($this->product->images) > 0) {
    foreach ($this->product->images as $image) {
echo '<div class="floatleft">' $image->displayMediaThumb('class="product-image"'false'class="modal"'truetrue) . '</div>'//'class="modal"'
    }
}
?>

        <div class="clear"></div>
    </div>


I then created a com_virtuemart folder in MYTEMPLATE/html and uploaded my changed proctuctdetais folder to there.

Now when I open virtuemart and configuration I get this:
QuotevmError: Attention file tmpl has no extension in view productdetails and directory /home/httpd/vhosts/latina-bodyfashion.ch/httpdocs/Test/templates/cyan/html/com_virtuemart/productdetails

I then deleted the productdetails folder from mytemplate/html/com_virtuemart and just left the image-details.php.

Now when I go the product and choose override->image-details I get only images in detail view.

Following the link you gave me is not that easy.


jenkinhill

Firstly the edit is incorrect.  You have not removed the full PHP container, which starts <?php  and ends  ?>

The edited template should look like this:


<?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_images.php 5406 2012-02-09 12:22:33Z alatak $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

// Product Main Image
if (!empty($this->product->images[0])) {
    
?>

    <div class="main-image">
<?php echo $this->product->images[0]->displayMediaFull('class="medium-image" id="medium-image"'false"class='modal'"true); ?>
    </div>
<?php // Product Main Image END ?>



Then create a com_virtuemart directory in your joomla template html directory, and within that create a directory productdetails

Then just upload the edited default_images.php  file into productdetails - you can leave the original still in the original VM directory.

Note, if you want to use that override in some but not all products then call it something else, like nothumb_images.php, upload it in the same way but in each product editor under Product information/ Product Details Page select the new override file. Where not required leave that option as default.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Fintan

I did say my PHP wasn't very good ;), Thank you for the help :)

juanfer2k

After doing this, i keep seeing the box in the middle of the screen, other searches tookme very long and it's just a tweak, I Know.
teh example here http://www.tressonuno.com/index.php