Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

'Ask a question' not working / showing
(1 viewing) (1) Guest

TOPIC: 'Ask a question' not working / showing

'Ask a question' not working / showing 7 years, 6 months ago #29421

I am using this sj market theme with virtuemart 3 and in product description page.. even if i enabled 'ask a question' from virtuemart's configuration, it wont show the button... but when i change my template to default joomla beez theme, it can be seen so i think the problem is with the template.. how can i show that 'ask a question;' button in product page in this sj market theme?

please help.

Re: 'Ask a question' not working / showing 7 years, 6 months ago #29434

  • usersmart1
  • OFFLINE
  • Moderator
  • Posts: 1364
  • Karma: 20
Dear sir,

Please go to templates\sj_market\html\com_virtuemart\productdetails\default.php find code:
echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$this->product));
=> add code to:
echo shopFunctionsF::renderVmSubLayout('stockhandle',array('product'=>$this->product));

// Ask a question about this product
if (VmConfig::get('ask_question', 0) == 1) {
$askquestion_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', FALSE);
?>
<div class="ask-a-question">
<a class="ask-a-question" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>
</div>
<?php
}
?>

Thanks & regards!
The following user(s) said Thank You: the_dinesh

Re: 'Ask a question' not working / showing 7 years, 6 months ago #29436

thank you so much for the reply and solution... that worked like a charm..... just littile bit of changes i made like below:

// Ask a question about this product
if (VmConfig::get('ask_question', 0) == 1) {
$askquestion_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', FALSE);

echo '<div class="ask-a-question">';
echo '<a class="ask-a-question" href="' . $askquestion_url . '" rel="nofollow" >' . vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') . '</a>';
echo '</div>';

}

it works now but another problem is, it doesnt open the ask form in pop up window... it opens in same window... what could be the solution to make it open in pop up? please help me.

Re: 'Ask a question' not working / showing 7 years, 6 months ago #29480

  • usersmart1
  • OFFLINE
  • Moderator
  • Posts: 1364
  • Karma: 20
Dear sir,

In file: templates\sj_market\html\com_virtuemart\sublayouts\askrecomjs.php and find:
$('a.ask-a-question, a.printModal, a.recommened-to-friend, a.manuModal').click(function(event){

=> Edit to:
$('a.question, a.printModal, a.recommened-to-friend, a.manuModal').click(function(event){

then go to the file:
templates\sj_market\html\com_virtuemart\productdetails\default.php
and find:

<a class="question" href="<?php echo $askquestion_url ?>" rel="nofollow" ><i class="fa fa-question-circle"></i><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>
=> Edit to:
<a class="question" href="<?php echo $askquestion_url ?>" rel="{handler: 'iframe', size: {x: 700, y: 850}}" ><i class="fa fa-question-circle"></i><?php echo vmText::_('COM_VIRTUEMART_PRODUCT_ENQUIRY_LBL') ?></a>

Thanks & regards!

Re: 'Ask a question' not working / showing 7 years, 2 months ago #31864

Hi

Does this change also work on virtuemart 3 jommla 3.6?

Re: 'Ask a question' not working / showing 7 years, 2 months ago #31886

Dear zakgr

It is the same, you can try to do this. note backup your old file again.

Thanks
Time to create page: 0.24 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes