VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: damz101 on July 05, 2013, 01:28:50 AM

Title: previous next and close buttons for virtuemart products
Post by: damz101 on July 05, 2013, 01:28:50 AM
hey guys im using virtuemart 2.0.20 with joomla 2.5. i am having a problem getting the prev,next and close buttons on product images. please help

[attachment cleanup by admin]
Title: Re: previous next and close buttons for virtuemart products
Post by: jenkinhill on July 06, 2013, 10:45:50 AM
Looks like you are using a template override written for an older version of VirtueMart. Current versions use fancybox to allow image navigation, but I suspect your override is using the old facebox. You will need to update that template - probably [yourjoomlatemplae]/html/com_virtuemart/productdetails/default_images.php  - compare that with the VM default template in components/com_virtuemart/views/productdetails/tmpl/default_images.php
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 06, 2013, 16:55:11 PM
After comparing them whats the next step? Joomla 2.5.11, Virtuemart 2.0.10, PHP 5.2.17.
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 06, 2013, 19:40:23 PM
Quote from: damz101 on July 06, 2013, 16:55:11 PM
After comparing them whats the next step?
After comparing the next step is to update your template to 2.0.12, then to 2.0.14, and then 2.0.16.
Title: Re: previous next and close buttons for virtuemart products
Post by: jenkinhill on July 06, 2013, 23:43:57 PM
damz101  you first say your VM version is 2.0.20 and leter say it is 2.0.10  Which are you actually using?  http://forum.virtuemart.net/index.php?topic=116480.0
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 06, 2013, 23:59:45 PM
 jenkinhill: im using VM version 2.0.20b sorry about that
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 07, 2013, 10:03:15 AM
Quote from: damz101 on July 06, 2013, 23:59:45 PM
jenkinhill: im using VM version 2.0.20b sorry about that
But what the version of your template files in temlates/your_template/html/com_virtuemart folder?
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 07, 2013, 20:58:18 PM
Quote from: Maxim Pishnyak on July 07, 2013, 10:03:15 AM
Quote from: damz101 on July 06, 2013, 23:59:45 PM
jenkinhill: im using VM version 2.0.20b sorry about that
But what the version of your template files in temlates/your_template/html/com_virtuemart folder?

i dont follow
Title: Re: previous next and close buttons for virtuemart products
Post by: jenkinhill on July 07, 2013, 21:16:15 PM
Simple. It looks like the overrides you are using are built for an earlier version of VirtueMart. Whyich version we cannot tell - which is one of the reasons why we cannot support third party templates/overrides.

Try renaming the file [yourjoomlatemplae]/html/com_virtuemart/productdetails/default_images.php  eg default_images.php.was
This will force VM to use the default image template for 2.0.20b and may solve your problem. If not then you will have to look closer at the code.
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 07, 2013, 22:41:06 PM
Quote from: damz101 on July 07, 2013, 20:58:18 PM
Quote from: Maxim Pishnyak on July 07, 2013, 10:03:15 AM
Quote from: damz101 on July 06, 2013, 23:59:45 PM
jenkinhill: im using VM version 2.0.20b sorry about that
But what the version of your template files in temlates/your_template/html/com_virtuemart folder?

i dont follow
check version of file default.php in the folder templates/your_template/html/com_virtuemart/productdetails

<?php
/**
*
* Show the product details page
*
* @package   VirtueMart
* @subpackage
* @author Max Milbers, Eugen Stranz
* @author RolandD,
* @todo handle child products
* @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.php 6530 2012-10-12 09:40:36Z alatak $
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

// addon for joomla modal Box
JHTML::_('behavior.modal');
// JHTML::_('behavior.tooltip');
$document = JFactory::getDocument();
$document->addScriptDeclaration("
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 08, 2013, 01:18:33 AM
Maxim Pishnyak: " @version $Id: default.php 5151 2011-12-19 17:10:23Z Milbo $ "
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 08, 2013, 23:42:07 PM
Good.

You are having Virtuemart 2.0.0 version for your template virtuemart overrides.

So you still need to check and to update your overrides in your web site template folder.

There were overall 5 changes of template files:
com_virtuemart.2.0.8_layout_changes
com_virtuemart.2.0.10_layout_changes
com_virtuemart.2.0.12_layout_changes
com_virtuemart.2.0.14_layout_changes
com_virtuemart.2.0.14_to_2.0.16_layout_changes

So advice from Jenkinhill is still stands for you
Quote from: jenkinhill on July 06, 2013, 10:45:50 AM
Looks like you are using a template override written for an older version of VirtueMart. Current versions use fancybox to allow image navigation, but I suspect your override is using the old facebox. You will need to update that template - probably [yourjoomlatemplae]/html/com_virtuemart/productdetails/default_images.php  - compare that with the VM default template in components/com_virtuemart/views/productdetails/tmpl/default_images.php
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 12, 2013, 02:49:24 AM
Quote from: jenkinhill on July 07, 2013, 21:16:15 PM
Simple. It looks like the overrides you are using are built for an earlier version of VirtueMart. Whyich version we cannot tell - which is one of the reasons why we cannot support third party templates/overrides.

Try renaming the file [yourjoomlatemplae]/html/com_virtuemart/productdetails/default_images.php  eg default_images.php.was
This will force VM to use the default image template for 2.0.20b and may solve your problem. If not then you will have to look closer at the code.

thanks that worked great!!!. quick question what do you mean by overrides?
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 12, 2013, 02:54:35 AM
Quote from: jenkinhill on July 07, 2013, 21:16:15 PM
Simple. It looks like the overrides you are using are built for an earlier version of VirtueMart. Whyich version we cannot tell - which is one of the reasons why we cannot support third party templates/overrides.

Try renaming the file [yourjoomlatemplae]/html/com_virtuemart/productdetails/default_images.php  eg default_images.php.was
This will force VM to use the default image template for 2.0.20b and may solve your problem. If not then you will have to look closer at the code.

ok so the renaming of the file worked it was default_images.php it was just default.php and what i noticed that a a share product plugin i had on the page stopped working
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 12, 2013, 09:18:48 AM
Quote from: damz101 on July 12, 2013, 02:49:24 AM
thanks that worked great!!!. quick question what do you mean by overrides?
Template overrides is main base for customizing VM.
They wouldn't be overridden by regular VM updates.
Actually it's not simply don't know about overrides - everybody here very often use them.
Check sticked threads for example or FAQ section.
Without up to date overrides web shop is not up to date.
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 12, 2013, 16:34:45 PM
Quote from: Maxim Pishnyak on July 12, 2013, 09:18:48 AM
Quote from: damz101 on July 12, 2013, 02:49:24 AM
thanks that worked great!!!. quick question what do you mean by overrides?
Template overrides is main base for customizing VM.
They wouldn't be overridden by regular VM updates.
Actually it's not simply don't know about overrides - everybody here very often use them.
Check sticked threads for example or FAQ section.
Without up to date overrides web shop is not up to date.

ok thanks. next problem i renamed default.php in order for the prev next buttons to come up and it messed with a plugin i had installed before. the plugin stopped working.
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 12, 2013, 17:13:54 PM
Quote from: damz101 on July 12, 2013, 16:34:45 PM
next problem i renamed default.php in order for the prev next buttons to come up and it messed with a plugin i had installed before. the plugin stopped working.
Where is situated this specific default.php?
What is in it?
What plugin did you mentioned?
Title: Re: previous next and close buttons for virtuemart products
Post by: damz101 on July 12, 2013, 17:28:47 PM
Quote from: Maxim Pishnyak on July 12, 2013, 17:13:54 PM
Quote from: damz101 on July 12, 2013, 16:34:45 PM
next problem i renamed default.php in order for the prev next buttons to come up and it messed with a plugin i had installed before. the plugin stopped working.
Where is situated this specific default.php?
What is in it?
What plugin did you mentioned?

thats its found /mytemplate/html/com_virtuemart/productdetails
it contains code for the product navigation along with others.
and the plugin is Jo VM socialshare. 
Title: Re: previous next and close buttons for virtuemart products
Post by: Maxim Pishnyak on July 12, 2013, 22:43:10 PM
see this http://joomcore.com/jo-virtuemart-socialshare-plugin/752-plugin-doesnt-display-nowhere-in-custom-theme.html
Title: Re: previous next and close buttons for virtuemart products
Post by: MarioP on October 04, 2013, 18:50:02 PM
Hello.
I want to refresh the topic. I have similar problem. I have no navigation arrows when the fancybox appears.  Close button is showing.  I've used template overrides and thought that this is the cause of my problem. But even though I deleted the overrides the problem still appears. Even if I change the temple for the standard beez_20 the problem still exist.  What can be wrong??. To be sure I checked the version of file default.php in the folder templates/your_template/html/com_virtuemart/productdetails and it's 6530 2012-10-12 09:40:36Z. What else could I check to solve the problem?
Joomla  2.5.14
VM 2.0.24
PHP 5.3.x
Title: Re: previous next and close buttons for virtuemart products
Post by: MarioP on October 04, 2013, 21:39:15 PM
I compared the file [yourjoomlatemplae]/html/com_virtuemart/productdetails/default_images.php in VM 2.0.18 where the fancybox works properly for me ( I have one website with this VM version) with the default_images.php in current version where I have no navigation arrows. They are different.
There is lack of this part of script:
jQuery(".additional-images .product-image").click(function() {
jQuery(".main-image img").attr("src",this.src );
jQuery(".main-image img").attr("alt",this.alt );
jQuery(".main-image a").attr("href",this.src );
jQuery(".main-image a").attr("title",this.alt );


And the following code:
<div class="additional-images">
<?php
for ($i 0$i $count_images$i++) {
$image $this->product->images[$i];
?>

            <div class="floatleft">
            <?php
                echo 
$image->displayMediaFull('class="product-image" style="cursor: pointer"',false,"");
            ?>

            </div>
<?php
}
?>

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


was changed to:

<div class="additional-images">
<?php
for ($i 1$i $count_images$i++) {
$image $this->product->images[$i];
?>

            <div class="floatleft">
            <?php
                echo 
$image->displayMediaFull("",true,"rel='vm-additional-images'");
            ?>

            </div>
<?php
}
?>

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


I don't know what exactly was changed because I'm not a programmer but changes are quite big. Maybe there's any shortcoming which causes that problem...