News:

Support the VirtueMart project and become a member

Main Menu

Ask a question in cart

Started by fetis, September 06, 2012, 14:27:47 PM

Previous topic - Next topic

fetis

Hi everybody . Here I want to ask how to make in a basket at each goods the button "To ask a question on the goods". The button added, but here is how to make that it functioned.
  <?php
      $i
=1;
      foreach( 
$this->cart->products as $pkey =>$prow ) { ?>

         <tr valign="top" class="sectiontableentry<?php echo $i ?>">
            <td align="left" >
               <?php if ( $prow->virtuemart_media_id) {  ?>
                  <span class="cart-images">
                   <?php
                   
if(!empty($prow->image)) echo $prow->image->displayMediaThumb('',false);
                   
?>

                  </span>
               <?php ?>
               <?php echo JHTML::link($prow->url$prow->product_name).$prow->customfields?>
<div class="ask-a-question">
            <a class="ask-a-question" href="<?php $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|800|550'
         });
         return false ;
      });
   });
"
); echo $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(); ?>
" ><?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>
            </td>
            <td align="left" ><?php  echo $prow->product_sku ?></td>
            <td align="center" >

By pressing the button, opens shop page. Help please.

fetis