VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: dslove on May 09, 2016, 09:52:16 AM

Title: Product waiting list, message to Shop owner
Post by: dslove on May 09, 2016, 09:52:16 AM
Hi all,

I need VM to send a message to the Shop Owner each time someone uses the "notify me" function to subscribe to a product's waiting list.

Any pointers?
I remember there was a small hack to do this on VM1, but cannot find any info on VM3...

Joomla 3.5.1
Virtuemart 3.0.16
PHP 5.4.16
Title: Re: Product waiting list, message to Shop owner
Post by: Jörgen on May 09, 2016, 10:26:13 AM
Hello

Here is the view for the notify form:
components\com_virtuemart\views\productdetails\tmpl\notify.php (http://components\com_virtuemart\views\productdetails\tmpl\notify.php)

regards

Jörgen @ Kreativ Fotografi

Title: Re: Product waiting list, message to Shop owner
Post by: dslove on May 09, 2016, 10:58:29 AM
Hi Jörgen, thank you for your reply.

I am aware of this file, I have even used it to create a template override for this form so It looks a little sexier.
Is this where the code for emailing the Shop Owner has to be inserted?

(all it does is to add the client to the waiting list, no emails sent)
Title: Re: Product waiting list, message to Shop owner
Post by: Jörgen on May 09, 2016, 11:40:29 AM
Try this

https://docs.joomla.org/Sending_email_from_extensions (https://docs.joomla.org/Sending_email_from_extensions)

Jörgen @ Kreativ Fotografi
Title: Re: Product waiting list, message to Shop owner
Post by: dslove on May 09, 2016, 12:23:11 PM
Thanks again,

I believe that for this to properly function, the file /components/com_virtuemart/controllers/productdetails.php must be customised, and not the html override.

What is your opinion?
Title: Re: Product waiting list, message to Shop owner
Post by: dslove on May 09, 2016, 12:36:53 PM
Wow, come to think of it, this seems like it should be a standard VM feature, or at least there should be some VM extension to add this functionality.

As it is right now, how can a VM Shop Owner deal with the Product Waiting List? It seems that almost no options are offered for this. A simple email message to the Shop Owner for every new Waiting List entry would really help them to maintain their list in a more productive way, get in touch with the potential client -e.g. inform about possible re-stocking date, suggest a similar product etc...
Title: Re: Product waiting list, message to Shop owner
Post by: Jörgen on May 09, 2016, 12:52:07 PM
Hello


I totally agree that it sould be a core feature. I will implement this as soon as i will get the time. Probably next week.

I would make a sublayout with the code and load it from the productdetails or possibly the notify. Have not decided where it would fit the best.

regards

Jörgen @ Kreativ Fotografi

Title: Re: Product waiting list, message to Shop owner
Post by: dslove on May 09, 2016, 12:57:26 PM
These guys thought about it for VM2.x https://extensions.virtuemart.net/products/notify-product-for-vm-detail but I see they didn't update it for VM3

Jörgen, I want to be open here, and say that I am not happy touching core files in my projects. It makes updates complicated.

Are you talking about having this functionality included in an upcoming VM update or creating an extension that offers this functionality?
Title: Re: Product waiting list, message to Shop owner
Post by: Jörgen on May 09, 2016, 13:03:58 PM
Hello

No extension, I will only make add some simple code to send e-mail to the shop owner when someone stores a notification. I am not in a position to put this in the core. If I get something working I can make a suggestion. But that´s about it.

I will publish the code when I have something working.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Product waiting list, message to Shop owner
Post by: dslove on May 09, 2016, 13:10:56 PM
Thanks Jörgen!  :) 8)
Title: Re: Product waiting list, message to Shop owner
Post by: rage76 on December 06, 2017, 08:17:17 AM
hi, was something done on this?
Title: Re: Product waiting list, message to Shop owner
Post by: Jörgen on December 06, 2017, 10:23:03 AM
I have a working version of this, but haven´t got the time to package it for use. It is an override of a couple of template files, and an adjustment for the call to waitinglist in the template file. I will be back on this, time is kind of scarce right now.

regards

Jörgen @ Kreativ Fotografi

Title: Re: Product waiting list, message to Shop owner
Post by: rage76 on December 06, 2017, 13:08:16 PM
This would be a big help. I am anxiously waiting !!