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

Modify modal form "ask a question about this product".

Started by deisa, August 20, 2012, 18:10:16 PM

Previous topic - Next topic

deisa

Hi,

How I can modify  the  size of the modal form "ask a question about this product" ?

Thanks in advance.
Currently working with VirtueMart 3.6.10 10211 on Joomla! 3.9.14  PHP    7.2.1

ivus

Hi deisa,

It's quite simple. Change the following:

/components/com_virtuemart/views/productdetails/tmpl/default.php @ line 33



$document->addScriptDeclaration("
jQuery(document).ready(function($) {
$('a.ask-a-question').click( function(){
$.facebox({
iframe: '" . $url . "',
rev: 'iframe|550|550'
});
return false ;
});
/* $('.additional-images a').mouseover(function() {
var himg = this.href ;
var extension=himg.substring(himg.lastIndexOf('.')+1);
if (extension =='png' || extension =='jpg' || extension =='gif') {
$('.main-image img').attr('src',himg );
}
console.log(extension)
});*/
});
");



Specifically:



   rev: 'iframe|550|550'



First number is height, second number is width.

Good luck. I hope this helps.

deisa

Dear Ivus,

Thank you very much for your help.
I have changed line 33 to rev: 'iframe|550|950' but the modal form "ask a question about this product" donĀ“t changed the width.
Which can be the reason of this?

Thanks in advance.
Currently working with VirtueMart 3.6.10 10211 on Joomla! 3.9.14  PHP    7.2.1

ivus

Hi deisa,

You failed to indicate which versions you're using and also on which page you want the changes to apply. I assumed you wanted it on the PRODUCT DETAILS page...?

If that doesn't work for you then I'm not sure what you've done? Do you have template overrides?

bytelord

Hi,

If you done it as ivus suggest and that changes concern products details you should look inside your productdetails\default.php template around line 233. May you have an old part o template source. The right one is this

<div class="ask-a-question">
        <a class="ask-a-question" href="<?php echo $url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
        <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>-->


As you can see there is a part that have been commented, may be you use that one. Last clean your browser cache (just in case).

Check it.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

deisa

Dear ivus &  bytelord,

Ivus has the reason... I have template overrides. :-[

Correct path: \templates\mytemplatename\html\com_virtuemart\productdetails\tmpl\default.php

I have changed the width without problems now

Many thanks for the effective support.

Currently working with VirtueMart 3.6.10 10211 on Joomla! 3.9.14  PHP    7.2.1