Hi
I don't know if now you have solved this problem
When I enable the "ask for price" function and I disable the "Ask a question" function, I couldn't send any email asking for the price
I was checking the code and I realized that in one line of the code (I don't remember where it is), both "ask for price" and "ask a question" function check if the "ask a question" function is enable
I think that if I want to let the users ask for the price I don't want the appear the "ask a question" button in the item details
Regards
hmm, sounds valid bug, file and line?
The file is: components/com_virtuemart/controllers/productdetails.php
And the line is 69
Agreed, the sublayout for prices uses the function mailAskquestion but the controller only considers if the config for "ask_question" is set
QuoteModified above for clarity
Quote
if ($product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($product->images[0]) and !$product->images[0]->file_is_downloadable) {
$askquestion_url = 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', FALSE);
?>
<a class="ask-a-question bold" href="<?php echo $askquestion_url ?>" rel="nofollow" ><?php echo vmText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
<?php
} else {
ask question url from controller
public function mailAskquestion () {
JSession::checkToken () or jexit ('Invalid Token');
$app = JFactory::getApplication ();
if(!VmConfig::get('ask_question',false)){
$app->redirect (JRoute::_ ('index.php?option=com_virtuemart&tmpl=component&view=productdetails&task=askquestion&virtuemart_product_id=' . vRequest::getInt ('virtuemart_product_id', 0)), 'Function disabled');
}
I don't understand your point...
Is this an error or not?
If u are saying that is not an error I don't understand it... Why do you want to check if ask_question function is enable if you only want to ask for price?
Regards
QuoteI don't understand your point...
I was agreeing with you -
"Show call for price, when the price is empty" setting - is not considered separately when using the function mailAskquestion
Oh
Sorry, I'm spanish and my english is not very good :'(
No problem - you English will be better than my Spanish ;)
My first response was not very clear - so I have modified it, just in case someone else reads it
just use in line 69 if(!VmConfig::get('ask_question',false) and !VmConfig::get ('askprice', 1)){
ok
Thanks