News:

Support the VirtueMart project and become a member

Main Menu

Ask a Question

Started by spyderwoman, October 24, 2011, 19:23:45 PM

Previous topic - Next topic

spyderwoman

Is there a way to remove the 'Ask a question about this product' button?

PRO

#1
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 ;
      });
   });
");

spyderwoman

Wow! So excited about this template system! GREAT!

beipink

#3
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

PRO

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>

beipink

#5
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>



marcopais

Hi beipink,

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

Thanks!

marcopais