Hi,
I need to have the 'ask a question' email sent to to a different address than 'product order' email, as it is 2 different people who need to recieve them (sales support for ask a question & the shipper for product order notification)
how would I do this?
thank you!!!!
I figured out a way to do this with an override of the productdetails default.php - replace the existing ask a question code with
<a class="ask-a-question" href="mailto:myemail@mysite.com?subject=Question re <?php echo $this->product->product_name ?> ">Ask a question about this product</a>
works!!!
nice :-)
better variant is to set filter in your email box, redirect for emails with subject Ask, question...
Can someone give me solution for Virtuemrt 3
This is the code i have:
// 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
}
?>
<?php
So where to put the email?
the snippet above just uses a std. mailto link to open your mail client
it won't work if u want to use the modal form etc
to do what u want will need a core hack in the helper or a plugin
Thank you for your reply. Is it under com_virtuemrt - Helpers - vmview.php or is something else?
well .. vm mail is sent from components\com_virtuemart\helpers\shopfunctionsf.php --
but mail is built in components\com_virtuemart\views\askquestion\view.html.php
so prob there
If you only need a value or two(sku+name for eg) , i think you can link to an external form builder and add the value(s) in the link.
This permit to add some security check and not reveal directly your email to all spammers & hackers as explained by dsrpmedia.
Quote from: Studio 42 on November 20, 2016, 23:07:44 PM
If you only need a value or two(sku+name for eg) , i think you can link to an external form builder and add the value(s) in the link.
This permit to add some security check and not reveal directly your email to all spammers & hackers as explained by dsrpmedia.
I don't want dsrpmedia solution. I want to use Virtuemart "ask question about this product" form but when someone hit the "send" button the email to be send to different email (not the shop vendor email)
Stu 42 isn't saying to use it
he suggests using a different form comp
I used breezingforms here -> https://www.palmerstownpharmacy.ie/en/health/pain-management/paralief-paracetamol-500mg-24
click the Complete form button .. it is like Ask a question.. but it opens a form which you can do what u want with and send where u like
the details of the product etc are just passed by hidden fields and js -- but there are different ways to do it
or if u just want a different email then hack components\com_virtuemart\views\askquestion\view.html.php as I suggested
I give you a clean way to do this.
If you prefer hack the VM core and on each update redo the same changes , then use GJC Web Design solution and add manually the code to change the vendor mail.
I only give long term solution, if i can.