Re: Back In Stock Notifications - Cron
Great Script Conor!
Thanks so much for creating it! :clap:
For those that would like to run a cron job for this module, feel free to use / modify the one below:
PHP Code:
<?php
// filename: cron1.php
// make changes in /admin/includes/init_includes/init_admin_auth.php example below...
//
################################## init_admin_auth.php ##################################
#
# if (! defined('IS_ADMIN_FLAG')) {
# die('Illegal Access');
# }
# // New Code Starts Here:
# if (!isset($_SESSION['admin_id']) && defined('CRON_ADMIN_USER_ID') && CRON_ADMIN_USER_ID != '') {
# $_SESSION['admin_id'] = CRON_ADMIN_USER_ID;
# }
# // End New Code:
# if (!(basename($PHP_SELF) == FILENAME_LOGIN . '.php')) {
#
################################## init_admin_auth.php ##################################
if ($_SERVER['REMOTE_ADDR'] == $_SERVER['SERVER_ADDR']) { // Security measure to make sure only local server runs file! <-- Comment out this line to run browser testing
define('CRON_ADMIN_USER_ID', '99'); // Pick an ID number and add CRON_ADMIN_USER_ID into admin database, I used phpMyAdmin to do this
require ('includes/application_top.php');
require (DIR_FS_ADMIN . DIR_WS_LANGUAGES . 'english/back_in_stock_notifications.php');
require (DIR_FS_ADMIN . DIR_WS_FUNCTIONS . 'back_in_stock_notifications_functions.php');
sendBackInStockNotifications();
} // <-- Comment out this line to run browser testing
?>
Hope this helps someone else that might need this feature.
Best Regards,
Mike
Re: Back In Stock Notifications - Cron
Hi Mike,
Quote:
Originally Posted by
ferenczy
Great Script Conor!
Thanks so much for creating it! :clap:
No problem, glad you like it!
Thanks for posting the cron job script.. it's nice and neat! :)
All the best...
Conor
ceon
Re: Back In Stock Notifications
Sorry I was snippy....
One more question.....
Exactly where is the text for the subscription email stored.
I found the file to change the text of the subscription screen that is displayed, but I would like to add some text to the actual subscription email that is sent out......
Thanks for a great mod
Re: Back In Stock Notifications
Never mind.,....
it is the back_in_stock_notification_subscribe.php file!
All good
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
exeter_acres
it is the back_in_stock_notification_subscribe.php file!
Yes, just create a copy of that file in your includes/languages/english/YOUR_TEMPLATE folder and modify it as desired!
Quote:
Originally Posted by
exeter_acres
All good
Glad to hear it! :)
All the best...
Conor
ceon
Re: Back In Stock Notifications
i noticed on some of my sold out products the back in stock notification doesn't show up on the product pages but on others it works fine. any idea what could cause this?
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
MB1
i noticed on some of my sold out products the back in stock notification doesn't show up on the product pages but on others it works fine. any idea what could cause this?
Make sure you're using the latest version of the module, earlier versions may not show the link if the quantity in stock is negative rather than exactly zero.
All the best..
Conor
ceon
Re: Back In Stock Notifications
ok i upgraded to 2.2.4 one thing i noticed was that when i changed my admin folder to another name for security reasons the admin section of the back in notification didn't work anymore any ideas other then having an admin folder strickly for back in stock files
thanks for your help this is a great mod
Re: Back In Stock Notifications
Hi,
Quote:
Originally Posted by
MB1
any ideas other then having an admin folder strickly for back in stock files
That problem can have nothing to do with the Back In Stock Notifications module.. you should check out if you have a problem with an "Admin Profiles" module or something similar.
Also check that you have the correct path to your newly renamed admin folder in your admin/includes/configure.php
All the best...
Conor
ceon
Re: Back In Stock Notifications
everything else seemed to be working so i never double checked that file, i haven't worked on the site in ages and another thing i was wondering these last few days was why my developers tool kits couldn't find anything.
thanks for replying i found a piece of code that was point to my old folder in the admin configure.php file