News:

Support the VirtueMart project and become a member

Main Menu

Change subject of the "Back In Stock" e-mail notification, how?

Started by loppan, March 01, 2018, 07:24:27 AM

Previous topic - Next topic

loppan

Hi,

spent all evening yesterday trying to figure this one out, but didn't manage to, so I'm kindly asking for help now ;).

I'm on VM 3.2.12 and Joomla! 3.8.3.

When I send "back in stock"-notifications to the users on my waiting list, and use the default template, the subject of the e-mail turns out to be :

"Back in stock : %s", where %s is the actual product. I'd like to change this. I've searched everywhere but can't find the line "Back in stock" in any language file.

Tried to investigate further, and I found some clues in administrator/components/com_virtuemart/models/waitinglist.php, on line 93 :

if (empty($subject)) {
$subject = vmText::sprintf('COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_SUBJECT', $item->product_name);
}


Full of hope, I know searched for the "COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_SUBJECT" language constant instead. I found out that it's actually set to :

COM_VIRTUEMART_PRODUCT_WAITING_LIST_EMAIL_SUBJECT="%s has arrived!"

, so that just created more confusion. Even changing the constant didn't change the subject, so this has got to be set somewhere else. I also tried adding a language override for that constant, and it didn't help either.

I'm actually kind of surprised that I'm having such issues with something that I normally would easily know how to do, but on this one I'm simply stuck.

Kindly asking for advice here :)

Million thanks in advance. Best regards!

Peter

Jörgen

Quote from: loppan on March 01, 2018, 07:24:27 AM

if (empty($subject)) {


This suggests that the call can be overridden and you should look in the template and see if there is some override for notify. Otherwise You should create an override for notify in the virtuemart views.

Unpacking the VM code locally and search for the string "Back in stock" should also help.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.