VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: spyderwoman on October 24, 2011, 19:23:45 PM

Title: Ask a Question
Post by: spyderwoman on October 24, 2011, 19:23:45 PM
Is there a way to remove the 'Ask a question about this product' button?
Title: Re: Ask a Question
Post by: PRO on October 24, 2011, 19:56:07 PM
remove this

// Ask a question about this product ?>

            <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>-->
            </div>


that removes the whole link, is thaqt what you wanna do? or change it from a button to text?

this is also at the top of the file, which pertains to it

$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component');
$document = &JFactory::getDocument();
$document->addScriptDeclaration("
   jQuery(document).ready(function($) {
      $('a.ask-a-question').click( function(){
         $.facebox({
            iframe: '".$url."',
            rev: 'iframe|550|550'
         });
         return false ;
      });
   });
");
Title: Re: Ask a Question
Post by: spyderwoman on October 25, 2011, 03:22:22 AM
Wow! So excited about this template system! GREAT!
Title: Re: Ask a Question
Post by: beipink on January 08, 2012, 11:19:01 AM
Quote from: BanquetTables.pro on October 24, 2011, 19:56:07 PM

this is also at the top of the file, which pertains to it

$url = JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id='.$this->product->virtuemart_product_id.'&virtuemart_category_id='.$this->product->virtuemart_category_id.'&tmpl=component');
$document = &JFactory::getDocument();
$document->addScriptDeclaration("
   jQuery(document).ready(function($) {
      $('a.ask-a-question').click( function(){
         $.facebox({
            iframe: '".$url."',
            rev: 'iframe|550|550'
         });
         return false ;
      });
   });
");

Is there way to open the form in another page or even pop-in without iframe?
As is now, the style cannot be overridden.
thanks
Title: Re: Ask a Question
Post by: PRO on January 08, 2012, 18:19:59 PM
this is what I do for 1.1

<a href="URL HERE " onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=600');return false;">Request Quote</a>
Title: Re: Ask a Question
Post by: beipink on January 29, 2012, 03:46:00 AM
Ok, the main problem is that to style the page you need to override the  CSS in the core.  The main template's CSS are not loaded at all.
It looks like this  is another small bug that requires some attention.

<head>
<base href="http://localhost/site/index.php/..../askquestion/modal">
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta content="index, follow" name="robots">
<meta content="" name="title">
<meta content="Joomla! 1.7 - Open Source Content Management" name="generator">
<title>Product details  - Ask a question</title>
<link rel="canonical" href="/site/index.php/outback-207/stand-alone-488/starter-15kw-detail">
<link type="text/css" href="/site/components/com_virtuemart/assets/css/vmsite-ltr.css" rel="stylesheet">
<link type="text/css" href="/site/components/com_virtuemart/assets/css/facebox.css" rel="stylesheet">
<link type="text/css" href="/site/components/com_virtuemart/assets/css/validationEngine.template.css" rel="stylesheet">
<link type="text/css" href="/site/components/com_virtuemart/assets/css/validationEngine.jquery.css" rel="stylesheet">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js">
<script type="text/javascript" src="http://localhost/site/components/com_virtuemart/assets/js/jquery.ui.autocomplete.html.js">
<script type="text/javascript" src="/site/media/system/js/core.js">
<script type="text/javascript" src="/site/components/com_virtuemart/assets/js/vmsite.js">
<script type="text/javascript" src="/site/components/com_virtuemart/assets/js/facebox.js">
<script type="text/javascript" src="/site/components/com_virtuemart/assets/js/vmprices.js">
<script type="text/javascript" src="/site/components/com_virtuemart/assets/js/jquery.validationEngine.js">
<script type="text/javascript" src="/site/components/com_virtuemart/assets/js/languages/jquery.validationEngine-en.js">
<script type="text/javascript">
<link type="text/css" href="/site/templates/system/css/general.css" rel="stylesheet">
<link type="text/css" href="/site/templates/system/css/template.css" rel="stylesheet">
</head>


Title: Re: Ask a Question
Post by: marcopais on March 18, 2012, 15:42:22 PM
Hi beipink,

I'm having this problem too. How can I load template css files to this page?

Thanks!
Title: Re: Ask a Question
Post by: marcopais on March 20, 2012, 10:27:22 AM
Anyone? :-\