Post by karman » Wed Feb 08, 2012 5:26 pm

A simple mod to sent a alert t email when a product goes of stock when order is placed (less than 1)

Tested on 1.5.1.x

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by stoksey » Fri Feb 10, 2012 5:19 am

Fantastic.
Will this work with latest wersionand how do I install. I have vqmod installed.

Appreciate help.

Ian

Newbie

Posts

Joined
Sun May 01, 2011 3:03 pm

Post by karman » Fri Feb 10, 2012 5:59 am

Hi

I wrote it for latest version.

Just copy the file to vqmod xml directory. It uses the email address from admin side. And currently emails for each product going out of stock. There is no config involved to get it to work

L:

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by Out2lunch » Tue Apr 03, 2012 6:55 pm

Thanks for this...

;D

New member

Posts

Joined
Wed Jun 29, 2011 9:32 pm

Post by robster » Tue Apr 17, 2012 1:27 am

Hi and thanks for this, but it does not seem to be working for me. I tested by setting product to stock level of 1 then from front end I ordered this product, taking stock level down to 0. I did not receive an out of stock email.

I am using 1.5.1.3.1

Am I understanding the operation of this mod correctly? Any ideas?

Rob

I know my place...!


User avatar
Active Member

Posts

Joined
Tue Jul 13, 2010 8:08 pm
Location - North Yorkshire, UK

Post by karman » Tue Apr 17, 2012 7:02 am

Hi,

yup, that what suppose todo.

Please check your vqmod logs to make sure the mod is applying correctley. Also check your maillog on the server to see if the email is not maybe getting blcoked by spam or something.

L:

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by fmobile » Tue May 22, 2012 5:43 am

Karman,

I installed the mod and everything works fine! But I have one little question, now I get the 'model' field in the out of stock mail, but I want to see the product_name field in case of the 'model' field in my mail.

I already tried to change 'model' to 'product_id' in the .XML file but without succes.

Can you please tell me what to do?

Thank you very much, great mod!

Newbie

Posts

Joined
Sat Mar 03, 2012 9:04 pm

Post by karman » Tue May 22, 2012 2:30 pm

Hi,

Try 'name' . i've not tested it, but that should give you the product name field

L:

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by fmobile » Tue May 22, 2012 6:00 pm

Hi,

I tried 'name' but it doesn't give any information in mail then. Blank

Newbie

Posts

Joined
Sat Mar 03, 2012 9:04 pm

Post by karman » Tue May 22, 2012 6:10 pm

Sorry, should have tested it before.. I see nwo what the issue is.

give me a bit, will fix

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by karman » Tue May 22, 2012 6:29 pm

Fmobile,

my dev opencart system is up to @#% again today, but please test the attached vqmod file, Should work now.

if not, can you just sent me any errors you get.

thanks
L:

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by Kristofke » Sun Jul 15, 2012 5:02 am

I have tested the latest release of your mod and it blocks all e-mails coming from opencart, also order notifications.

Newbie

Posts

Joined
Sun Jul 15, 2012 5:01 am

Post by karman » Sun Jul 15, 2012 3:58 pm

Does the old one work fine? ... I need to install opencart again, but simply swamped with work till end of this month so cannot test anything at th emoment

Newbie

Posts

Joined
Wed Feb 08, 2012 5:10 pm

Post by pprmkr » Sat Dec 01, 2012 5:07 pm

Edited the mod and tested on 1.5.4.1

Sends alert mail to admin when quantity < 1

You can edit row 12 in the xml to set the warning stock quantity:

Code: Select all

if ($qry->row['quantity'] < 1) {
And the text starting on row 15:

Code: Select all

				$text = 'Warning!'."\n\n";
				$text .= 'Product stock reached 0'."\n\n";
				$text .= 'Product name:'.$qry->row['name']."\n";
				$text .= 'Product model:'.$qry->row['model']."\n";

User avatar
Active Member
Online

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by Pamella » Thu Feb 21, 2013 4:30 pm

Great ;-) many thanks to share it but it seems than it do not support option(s), is not ?

OC 3.0.3.7 EN (default theme) running on PHP 7.3 MariaDB 10.3 Linux / Apache 2.4


New member

Posts

Joined
Tue Oct 25, 2011 4:22 am

Post by Pamella » Sat Mar 02, 2013 2:47 am

if using " in product name, then it's displayed as " in subject and content message sent

please, do you know how to fix it ?

many thanks ;-) in advance

OC 3.0.3.7 EN (default theme) running on PHP 7.3 MariaDB 10.3 Linux / Apache 2.4


New member

Posts

Joined
Tue Oct 25, 2011 4:22 am

Post by ramjiweb » Thu May 01, 2014 4:52 pm

hi ,
i use 1.5.6.1, how to add email Id in admin

Ramji
www.clickmart.co.in


Newbie

Posts

Joined
Tue Apr 15, 2014 2:16 pm
Location - Coimbatore

Post by krastew » Fri Mar 15, 2019 1:34 am

Hi folks and thank you for the contribution to the developer of this xml.

I have updated the xml to be compatible for version 3.0.3.1 :) It should work on any 3.X version. Enjoy!

Newbie

Posts

Joined
Fri Dec 21, 2018 1:33 am

Post by f1br3opt1c » Wed Oct 30, 2019 5:57 pm

krastew wrote:
Fri Mar 15, 2019 1:34 am
Hi folks and thank you for the contribution to the developer of this xml.

I have updated the xml to be compatible for version 3.0.3.1 :) It should work on any 3.X version. Enjoy!
Thanks, this works on 2.3.0.2 as well tested. Is it possible to have it also notify when a product option is out of stock? For example Option A has 5 but Option B was sold out.

New member

Posts

Joined
Fri May 24, 2013 5:36 pm

Post by pprmkr » Wed Oct 30, 2019 8:51 pm

Yes.
Copy attached file to /system/ and refresh modifications or use Extension - Installer

Note 1: tested on OC 2.3.0.2
Note 2: Change values for minimum on lines 12 and 41 :

Code: Select all

if ($qry->row['quantity'] < 4) {
 
 if ($option_gry->row['quantity'] < 2) { 
 

Attachments


User avatar
Active Member
Online

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands
Who is online

Users browsing this forum: No registered users and 18 guests