[SOLVED] How to add "Ask a question about this product" button in category view

Started by shyntaxx, September 14, 2013, 16:57:10 PM

Previous topic - Next topic

shyntaxx

I want to add the "ask a question about this product" button to each product in category view

I have tried to add

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

<div class="ask-a-question">
<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 } ?>


but it doesn't seem to be working ...

Any help would be mutch appreciated

Maxim Pishnyak

You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

shyntaxx

The solution is the following ..

I have added the following code to category view .. :::

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

<div class="ask-a-question">
<a class="ask-a-question modal" rel="{handler: 'iframe', size: {x: 700, y: 550}}" href="<?php echo JRoute::_('index.php?option=com_virtuemart&view=productdetails&task=askquestion&virtuemart_product_id=' $product->virtuemart_product_id '&virtuemart_category_id=' $product->virtuemart_category_id '&tmpl=component'); ?>"><?php echo JText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL'?></a>
</div>
<?php } ?>


SOLVED

Thanks,
Shyntaxx