News:

Looking for documentation? Take a look on our wiki

Main Menu

SOLVED: Strange problem at default.php override file

Started by tzic, April 03, 2014, 13:15:58 PM

Previous topic - Next topic

tzic

Hello,

I am changing -with success- the product detail page located here /httpdocs/templates/ja_purity_ii/html/com_virtuemart/productdetails/default.php but I encounter a strange problem.  If I remove the class="ask-a-question" (from the first <a href>) from the ask a question button (because I just want it to be text without any formatting) when I click on that link the contact form opens in full screen. If I leave the class="ask-a-question" and I click on it the contact form opens up like a pop up box which is what I want. I tried to figure out what is going on in vmsite-ltr.css but I could not find an answer. I am using firebug to inspect elements

I would really appreciate any help with this

http://www.ahealthcare.gr/%CE%BD%CE%BF%CF%83%CE%BF%CE%BA%CE%BF%CE%BC%CE%B5%CE%B9%CE%B1%CE%BA%CE%AD%CF%82-%CE%BA%CE%BB%CE%AF%CE%BD%CE%B5%CF%82/%CE%BA%CF%81%CE%B5%CE%B2%CE%AC%CF%84%CE%B9%CE%B1-%CE%BD%CE%BF%CF%83%CE%BF%CE%BA%CE%BF%CE%BC%CE%B5%CE%B9%CE%B1%CE%BA%CE%B5%CF%82-%CE%BA%CE%BB%CE%B9%CE%BD%CE%B5%CF%82/%CE%B7%CE%BB%CE%B5%CE%BA%CF%84%CF%81%CE%BF%CE%BA%CE%AF%CE%BD%CE%B7%CF%84%CE%B7-%CE%BA%CE%BB%CE%AF%CE%BD%CE%B7-%CF%80%CE%BF%CE%BB%CF%8D%CF%83%CF%80%CE%B1%CF%83%CF%84%CE%B7-detail

<?php
// Ask a question about this product
if (VmConfig::get('ask_question'1) == 1) {
    
?>

    <div class="ask-a-question-new"> <!-- <div class="ask-a-question"> --><a class="ask-a-question" href="<?php echo $this->askquestion_url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a> ή καλέστε μας στο <b>(2310-345970)</b> για περισσότερες πληροφορίες.
    <?php /* ?>   <a class="ask-a-question" href="<?php echo $this->askquestion_url ?>" ><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a> <?php */ ?> 
        <!--<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo $this->askquestion_url ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>-->
    </div>
<?php }
?>

StefanSTS

Hi,

you have two classes ask-a-question and modal.
modal is opening out the popup, so keep modal and you should be fine.

You could also add a third class (class="ask-a-question modal my-override-for-ask-a-question".

In this class you can override only the formatting, that you want to change from ask-a-question.

So long
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

tzic

#2
Thank you for the reply Stefan

I tried this: <a class="modal" .... but it just opens a white window. Can you please be more specific? Where is this modal class located? I cant find it in vmsite-ltr.css. I know that I can use a custom class but what should I add in this class in  vmsite-ltr.css so that by clicking the link a pop up box comes up?

Nick

EDIT: adding a custom class "ask-a-question2" and using <a class="ask-a-question2 modal" at default.php just opens a white window. Any ideas?

EDIT2 SOLVED: I added <a class="ask-a-question2 modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}"....... and it worked