Totally Zenned
- Join Date:
- Oct 2006
- Location:
- Italy
- Posts:
- 636
- Plugin Contributions:
- 0
Back In Stock Notifications
how can I turn on error reporting? in admin/includes/application_top.php I already have-->error_reporting(E_ALL & ~E_NOTICE);
Views: 71,747
Totally Zenned
how can I turn on error reporting? in admin/includes/application_top.php I already have-->error_reporting(E_ALL & ~E_NOTICE);
Sensei
Totally Zenned
Great! with this tips I was discover error (configure.php) and solve!
:clap:
Passed
Hi,
100asa:
Great! with this tips I was discover error (configure.php) and solve!
:clap:
That's great news. :)
Thanks very much Dr Byte.. I knew that I'd seen that info before when searching for "blank page" but I'm going to store the direct link as it's a frequent occurrence!
All the best...
Conor
New Zenner
Coneo,
Thanks for a great Mod,I have installed it and it works great. One question though. How do I modify the "BACK IN STOCK NOTIFICATIION SUBSCRIPTION" email so that the product name is a clickable link which takes you back to that products page?
Andrew
Passed
Hi Andrew,
schira:
Coneo,
It's "Conor" actually! ;)
schira:
Thanks for a great Mod,I have installed it and it works great. One question though. How do I modify the "BACK IN STOCK NOTIFICATIION SUBSCRIPTION" email so that the product name is a clickable link which takes you back to that products page?
That's not a bad idea. I'll make it so that the name is clickable in the HTML version of the e-mail in the next version of the module.
I'm working away at a new SEO module (which has ended up taking an extra two weeks longer than I thought it would because of transliteration issues - ugh! - don't ask! :) ) and have just finished the final parts of it today. Once I've finished off the docs for that I'll make the necessary changes to the Back In Stock Notifications module and release it.
That should hopefully happen by next week.
You can keep an eye out here to see when it's available.
All the best...
Conor
Ceon
New Zenner
Sorry Conor,
Fat fingers. Thanks for your reply and I will be eagerly looking forward to the new version.
Regards,
Andrew
Zen Follower
Thats odd mine already creates a clickable link back to the product page.
see example from a sent email:
Dear ,
We have restocked a product you asked to be notified about.
Please check it out before it goes out of stock again!
Hydor Koralia Wavemaker Controller 2-Way Basic
Link:
http://afishybusiness.com/index.php?main_page=product_info&products_id=649
Passed
Hi,
Mustang394:
Thats odd mine already creates a clickable link back to the product page.
Yes, the "restocked" e-mail does, but the initial subscription e-mail doesn't. I don't see any reason that it shouldn't and Andrew has requested it so I'll be adding it to the next version.
All the best...
Conor
Ceon
Zen Follower
Hi, Conor! The site is almost ready and I'll be running the back in stock notifications soon. There are over 5000 to go so there will probably be about 1000 emails going out. I'm concerned about being flagged for spamming. Just wondering if you had a chance to look at the throttling in phplist to try to adapt it to your mod?
Passed
Hi!
How are you?
brushwoodnursery:
Just wondering if you had a chance to look at the throttling in phplist to try to adapt it to your mod?
Unfortunately there's no throttling built into the module at present.
It's would be a very handy feature I'd imagine, but unfortunately too much work to implement at this time. :(
All the best...
Conor
Ceon
Zen Follower
Could there be a simple way to add
sleep(10);
into the loop somewhere?
I got that from the php manual.
Passed
Hi,
brushwoodnursery:
Could there be a simple way to add
sleep(10);
> I got that from the [php manual](http://us.php.net/sleep).
Certainly you can add that, but I don't know how much difference it will make. I'd imagine it'd probably be better than nothing but unfortunately I don't know enough about throttling to know if adding a 10 second delay would be enough to prevent servers blocking e-mails for breaching their limits for e-mails sent from a particular address. I'd have to research what these limits are and how any rules are applied in order to build an effective throttling mechanism into the software. Sadly, I just don't have the time to do that.
Hopefully I will in the future as I think it would be useful to know and therefore useful to implement.
As for the sleep() function. If you were to add it you'd have to add a counter into the sendBackInStockNotifications() function in
admin\includes\functions\back_in_stock_notifications_functions.php
and have it run the sleep command after a particular number of e-mails have been sent.
All the best...
Conor
Zen Follower
OK, just finished digging through the code in phplist and they do use sleep(x) as one of the throttling functions. They actually use three but this is described as the simplest way. The more complex ones are batch throttling (which would match what you mentioned about counting a batch then stopping) and domain throttling (which limits the number going to any one domain per period, an even more complex count).
I'm just after a simple sleep(). If I have 1000 emails going out and I sleep(10) the loop, they would all still go out overnight easily. Can you tell me a good place to add that command? I don't think I need the counter, etc. A delay between each email sent would be fine with me.
My only concern would be timeout.
Passed
Hi,
Just before line 154 of the admin/includes/functions/
($email_addresses_result->MoveNext();)
You could add the following code:
$num_emails_in_batch++
if ($num_emails_in_batch > 100) {
$num_emails_in_batch = 0;
sleep(10);
}
You should also add the following before the while loop on line 65:
$num_emails_in_batch = 0;
Just good coding practice! :)
I might make this simple functionality an option in the next version with a configurable number of e-mails in a batch and sleep time.
All the best...
Conor
Ceon
Zen Follower
Conor,
You've been very patient with my persistent badgering about this little detail. Once again, thank you very much!
Zen Follower
Hmm...got trouble:
Parse error: syntax error, unexpected T_IF in /home/xxxxxx/xxx/xxx/admin/includes/functions/back_in_stock_notifications_functions.php on line **158
do i need the batch counter or can I just try the sleep?
**
Zen Follower
I commented out everything but the sleep(10);
I have not entered inventory except a little testing bit. There would be 43 emails sent. At 10 seconds it stalls out and goes to a blank page. At 2 seconds, same thing. At 1 second, it takes just over 43 seconds (guesstimate) to return the successful results of a test mailing. In all 3 cases, the sample email was successfully sent out.
Passed
Hi,
brushwoodnursery:
Hmm...got trouble:
Parse error: syntax error, unexpected T_IF in /home/xxxxxx/xxx/xxx/admin/includes/functions/back_in_stock_notifications_functions.php on line **158do i need the batch counter or can I just try the sleep?
**
Oops, there's a missing semicolon after
$num_emails_in_batch++
It should be:
$num_emails_in_batch++;
Sorry! :)
I have not entered inventory except a little testing bit. There would be 43 emails sent. At 10 seconds it stalls out and goes to a blank page. At 2 seconds, same thing. At 1 second, it takes just over 43 seconds (guesstimate) to return the successful results of a test mailing. In all 3 cases, the sample email was successfully sent out.
Sounds like PHP is timing out.
You must have safe mode on, otherwise the script would set the maximum execution time/timeout for PHP to 0 ("Don't time out").
If you don't have access to your server to change the safe_mode setting or the max_execution setting then I'm afraid the sleep() command will be useless for you! :(
All the best..
Conor
Zen Follower
Safe Mode is Off.
The notification panel pulls up just fine now.
Test run works fine. There's no delay, though, since it's only 43 emails and they batch up as one.
So, i ran the test with the batch size at 10 and the sleep at 20 seconds. Goes to blank page in just over 1 minute.
maybe it's my database connection?
I've decided to try to run it without the delay. I'll just do it after the phplist newsletter goes out and hope for the best. Looking through the list, most of the serious customers are waiting for multiple items. Also, not all of the items will be restocked at this time. It might be fine.
Tell staff why this post should be reviewed.