send 'ask a question' email to a different address than 'product order' email

Started by dsrpmedia, July 23, 2014, 19:27:02 PM

Previous topic - Next topic

dsrpmedia

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!!!!

dsrpmedia

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!!!

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Vlada vanek

better variant is to set filter in your email box, redirect for emails with subject Ask, question...

batboiko

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?

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

batboiko

Thank you for your reply. Is it under com_virtuemrt - Helpers - vmview.php or is something else?

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

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.

batboiko

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)

GJC Web Design

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

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

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.