Zen Cart Logo
Forums / All Other Contributions/Addons / Back In Stock Notifications

Back In Stock Notifications

Views: 71,747

Results 81 to 100 of 507
7 Nov 2008, 7:38 AM
#81
100asa avatar

100asa

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);

7 Nov 2008, 9:56 AM
#83
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Back In Stock Notifications

Great! with this tips I was discover error (configure.php) and solve!
:clap:

7 Nov 2008, 11:06 AM
#84
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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

3 Dec 2008, 12:32 AM
#85
schira avatar

schira

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Back In Stock Notifications

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

3 Dec 2008, 11:05 PM
#86
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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

3 Dec 2008, 11:31 PM
#87
schira avatar

schira

New Zenner

Join Date:
May 2006
Posts:
6
Plugin Contributions:
0

Re: Back In Stock Notifications

Sorry Conor,

Fat fingers. Thanks for your reply and I will be eagerly looking forward to the new version.

Regards,
Andrew

4 Dec 2008, 2:07 AM
#88
mustang394 avatar

mustang394

Zen Follower

Join Date:
Jun 2008
Location:
Colorado
Posts:
146
Plugin Contributions:
0

Re: Back In Stock Notifications

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!


Product Back In Stock

Hydor Koralia Wavemaker Controller 2-Way Basic

Link:
http://afishybusiness.com/index.php?main_page=product_info&products_id=649

5 Dec 2008, 11:34 AM
#89
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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

7 Dec 2008, 2:16 AM
#90
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

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?

7 Dec 2008, 4:04 AM
#91
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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

7 Dec 2008, 12:17 PM
#92
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

Could there be a simple way to add

sleep(10);

into the loop somewhere?
I got that from the php manual.

7 Dec 2008, 1:05 PM
#93
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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
7 Dec 2008, 1:55 PM
#94
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

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.

7 Dec 2008, 5:28 PM
#95
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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

7 Dec 2008, 5:54 PM
#96
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

Conor,
You've been very patient with my persistent badgering about this little detail. Once again, thank you very much!

7 Dec 2008, 6:04 PM
#97
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

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?
**

7 Dec 2008, 6:15 PM
#98
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

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.

7 Dec 2008, 6:23 PM
#99
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Back In Stock Notifications

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 **158

do 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

7 Dec 2008, 8:06 PM
#100
brushwoodnursery avatar

brushwoodnursery

Zen Follower

Join Date:
Dec 2006
Posts:
199
Plugin Contributions:
0

Re: Back In Stock Notifications

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.