VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: ptrouw on June 20, 2017, 11:55:57 AM

Title: send email notify Users waiting not working
Post by: ptrouw on June 20, 2017, 11:55:57 AM
Using VM3.2.2.
We have to send emails to a lot of users about new stock arrival. We always used the "send email" to notify Users waiting, but this Send Email button is not working anymore with the product admin.
In browser console I can see these error:
Failed to load resource: the server responded with a status of 500 ()  https://www.xyz.com/administrator/index.php?option=com_virtuemart&view=product&task=ajax_notifyUsers&virtuemart_product_id=524

Is it an ajax problem?
Any ideas to solve this or a work around?

Note: I also have an 3.2.1 installation and this one works fine!

HTML code seems fine:
<div class="button2-left btn-wrapper btn btn-small" data-type="sendmail">
<div class="blank" style="padding:0 6px;cursor: pointer;" title="Send the email to the shoppers">
<span class="vmicon vmicon-16-email"></span>
Send Email
</div>
</div>

<script id="vm.validator_js" type="text/javascript">
<script id="submit_js" type="text/javascript">
<script id="updateChosen_js" type="text/javascript">
<script id="vm.remindTab_js" type="text/javascript">
<script id="vEngine_js" type="text/javascript">
<script id="vm.cookie_js" type="text/javascript">
<script id="datepicker_js" type="text/javascript">
<script id="dynotable_ini_js" type="text/javascript">
<script id="mediahandler.vars_js" type="text/javascript">
<script id="onReadyProduct_js" type="text/javascript"
Title: Re: send email notify Users waiting not working
Post by: stAn99 on June 20, 2017, 16:15:36 PM
hello, pls install and enable our fatal catcher extension from here:
https://www.rupostel.com/utilities-for-joomla/extensions/fatal-catcher-plugin

- install
- set your own email (or system email will be used)
- enable the plugin in joomla plugins
- repeat the action to receive the error

the plugin should send you an email with:
- file and line that causes your error
- backtrace if available (if xdebug is enabled)

you should provide the plugin's output so that any advise can be done.

best regards, stan, rupostel.com
Title: Re: send email notify Users waiting not working
Post by: ptrouw on June 20, 2017, 16:45:14 PM
got it.
thanks Stan, mail_html_notify.php script from template was incorrect
Title: Re: send email notify Users waiting not working
Post by: K&K media production on June 21, 2017, 12:40:49 PM
This should be solved in vm 3.2.3
http://dev.virtuemart.net/projects/virtuemart/files
Title: Re: send email notify Users waiting not working
Post by: ptrouw on June 21, 2017, 12:46:34 PM
Hey,
Do you think the waitinglist will include language code in the near future?
Now all waitinglist persons will get the same email message in just 1 languages. We have 4 languages, the work around for us is now 1 email with 4 messages in 4 languages. Not very professional.
Title: Re: send email notify Users waiting not working
Post by: Jörgen on June 21, 2017, 12:56:49 PM
Hello

Use language strings and edit the template files to include this for the language specific text:

echo vmText::_('VM_MY_MESSAGE_ETC');

regards

Jörgen @ Kreativ Fotografi
Title: Re: send email notify Users waiting not working
Post by: ptrouw on June 21, 2017, 13:09:40 PM
Will not work, the waitinglist doesn't store the original language of the person leaving behind the email. Therefore the email can never be in 1 specific language or the use of vmText!
Title: Re: send email notify Users waiting not working
Post by: Jörgen on June 21, 2017, 13:52:40 PM
You´re right, have to store language together with mailaddress for waitinglist. I have made some Changes to my waitinglist in order to get a notification to admin when someone puts there name on the waitinglist. Maybe I could add this feature to that. I will see if I get the time for it.

Jörgen @ Kreativ Fotografi
Title: Re: send email notify Users waiting not working
Post by: ptrouw on June 21, 2017, 14:34:46 PM
Would be great to store user Front end selected language in waitinglist table. We can then use it in template specific mail_html_notify.php file, but it also needs a language depended mail subject line which is in a VM core file.
Title: Re: send email notify Users waiting not working
Post by: vangelisg on February 28, 2018, 09:46:06 AM
I am having the exact same problem and I am searching for a sound solution for quite a while now.
So I came with the following workaround.
I hope this helps.

PS. Seriously now, if anyone has solved this please post a solution or just point to the right direction. I am too fat and very lazy to be a lumberjack at this age.
Title: Re: send email notify Users waiting not working
Post by: tramber91 on March 19, 2021, 18:51:40 PM
Hi all

I come back in this old topic
I have exactly same issue with latest version of VM

I can see Customer E-mail on products
But no way to send a notify
Error message in Chrome console
Failed to load resource: the server responded with a status of 500 () at
/administrator/index.php?option=com_virtuemart&view=product&task=ajax_notifyUsers&virtuemart_product_id=590


It should be solved ? or it remains an issue ?

Thanks for your support

Bertrand

Jommla 3.9.25
VM 3.8.8
Title: Re: send email notify Users waiting not working
Post by: Jörgen on March 20, 2021, 07:25:40 AM
Read through the thread again and correct the error in your custom template.

Jörgen
Title: Re: send email notify Users waiting not working
Post by: tramber91 on March 20, 2021, 21:05:18 PM
Thanks for your quick answer

I have installed fatal catcher and error message is

2 strtoupper() expects parameter 1 to be string, object given in file: /home/etlbertrand/sitetest/jouarre/libraries/src/Language/Language.php line: 314
2 strpos() expects parameter 1 to be string, object given in file: /home/etlbertrand/sitetest/jouarre/libraries/src/Language/Language.php line: 361


Correspond to joomla core line
if (strpos($string, '\\') !== false)
{
// Interpret \n and \t characters
$string = str_replace(array('\\\\', '\t', '\n'), array("\\", "\t", "\n"), $string);
}


We are in VM administration, cannot be issue from template override ?

take care

Bertrand
Title: Re: send email notify Users waiting not working
Post by: Jörgen on March 21, 2021, 07:48:35 AM
What back end admin template do you use ?
Do You have any plugins or extensions that could interfere ?

Jörgen
Title: Re: send email notify Users waiting not working
Post by: GJC Web Design on March 21, 2021, 09:25:05 AM
you need to backtrace why $string is an object  .. not the expected string
Title: Re: send email notify Users waiting not working
Post by: tramber91 on March 27, 2021, 16:28:30 PM
Hi

Issue was solved by removing my template overide file "mail_html_notify.php"
But I think another plugin i remove impact also the issue. I did a lot of cleaning to resolve this issue to come back to the overide which was my first suspect idea.
Maybe one of the Joomgallery plugin which was not updated.

thanks for your support

take care

Bertrand