Forums / Addon Admin Tools / Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Results 1 to 20 of 147
19 Jan 2015, 00:31
#1
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Posts:
10,011
Plugin Contributions:
1

Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

I found this module today (http://www.zen-cart.com/downloads.php?do=file&id=1944), and did not see a support thread for it. I have a LOT of questions for the author or anyone who's downloaded and used this module. Hence why I am creating this post..

The Ceon Back In Stock Notifications module has not been updated since 24 Feb 2012, and (like many other FREE Ceon modules) the current keepers of Ceon Back In Stock Notifications has not given ANY indication that Ceon Back In Stock Notifications will be updated any time soon if at all.. I am trying to get some clarifications on the differences/similarities/migration path between Ajax Back In Stock and the Ceon Back In Stock Notifications which Ajax Back In Stock is based on.


Features/Functionality Questions:
The description for this only says the following:
This is a re-written version of Conor/Ceon's Back In Stock Module:
http://www.zen-cart.com/downloads.php?do=file&id=773

It offers the store owner the ability to offer customers a notification when a product is back in stock.
Additionally, this module offers many additional features.
1) Ajax pop-up style box for the customer to be added to the back in stock.
2) The ability to modify most of the box's text via the admin.
3) The ability to notify a customer every time a product is back in stock, or just once
4) Days of Lag: So you aren't spamming customers less than the days of lag when back in stock.
5) Ability to set a maximum emails per batch so you are not flagged and black listed


What the description doesn't say EXPLICITLY is does the module have the SAME features as the original "Ceon Back In Stock Notifications" along with the new features listed above?? Or is the feature set different?? Sorry if the answer may seem OBVIOUS to some, but it actually is not which is why I am posing the question..

Migration from original "Ceon Back In Stock Notifications" Questions:
Is there a migration path for those shop owners who already have Ceon Back In Stock Notifications installed?? Or will those who have the original Ceon Back In Stock Notifications have to uninstall the original to install the Ajax Back In Stock module?? I didn't see this explicitly stated in the readme docs for the Ajax Back In Stock module which is again why I am posing the question..
19 Jan 2015, 16:44
#2
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Thanks for creating a support thread!

It is a complete re-write, there is a VERY small portion of the code that is used to migrate from Conor/Ceon's Back In Stock to Ajax Back In Stock. To my understanding, I'm fairly certain all of the features of that module are included. To my understanding the "keepers" of Conor/Ceon's Back In Stock have no or little intention to continue development of Conor/Ceon's "free" modules. There are several stores that have been using this module for over about 6+ months.

While a uninstall of Conor/Ceon's Back In Stock Is not required it is certainly recommended since both modules have observers checking for products orders etc.

Over 60 hours of development have gone into this module. It corrects many of the "bugs" in his module. And offers much more robust abilities. Including NO core modifications, and only template modifications. Whereas the Conor/Ceon's Back In Stock was modifying the includes/functions/functions_general.php

Also there are several important features that are much needed in the days of spam blocking.

-Conor/Ceon's Back In Stock would continue to send emails until the customer "buy or died". Whereas this version allows a customer to be notified once or every time until they buy.

-Another issue was that several ISP have been blocking the bulk email batches sent by the module so it now limits the number of notifications sent per batch avoiding this issue.

-There is a function "Days of Lag" which appears to be confusing to some. A previous issue was store owners setting Conor/Ceon's Back In Stock to run nightly, however that was causing customers to get emails nightly. The Ajax Back In Stock module checks when an email notification for that entry (customer & product) wa last sent and than makes sure that this equation is true (last day sent + days of lag < Today). Example if a customer was sent an email notification was sent Sunday for product XYZ and the days of lag is set to 7 the customer can't receive another notification till the next Sunday. They may receive a notification that ABC is back in stock though.

Feel free to ask any more questions let me know.
20 Jan 2015, 16:03
#3
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Hi there,
Thanks for making an update to this module, Conor was great to work with and his passing was a shock. Such a great guy with lots of time for people.

I managed to install this module with no problem. Only when I went to import from the previous version. It went to a warning message atop a blank page, and a debug log as follows:-

I am on 1.5.4 version currently. Actually I found the debug for it amongst them all:-

[PHP][20-Jan-2015 10:32:09 America/New_York] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '***customer name****', false )' at line 2 :: INSERT INTO zen_back_in_stock (email, product_id, sub_date, sub_active, name, active_til_purch) VALUES
(***customer email with hyphens in *****', 548, NOW(), 1, '***customer name****', false ) ==> (as called by) /****/****/public_html/includes/functions/extra_functions/back_in_stock.php on line 84 <== in /****/****/public_html/includes/classes/db/mysql/query_factory.php on line 155
[/PHP]

I can see the email for this entry has about four hypens in it, followed by the usual @ symbol and email ending. I reckon if I remove that entry manually, then it will clear up the issue. This might help others in the future perhaps. At least I think it is that, but as you can tell I am not technically adept at all this lol http://www.zen-cart.com/images/smilies/dontgetit.gif

It did import 25% of the out of stock subs, so it must be getting stuck with something. I tried again and it gives the same partial amount. But apart from that, everything is great!!
20 Jan 2015, 16:27
#4
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Does the customer's name have a ' in it?
20 Jan 2015, 16:29
#5
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Yes it does, I just spotted it. Irish surname. Ah so that is it, no problem I can remove it as it is an old subscription
20 Jan 2015, 16:38
#6
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Also a quick couple things.

I looked at your site.

1.) In the Admin configuration-> Back In Stock Configuration
You can change the link text to an <img> to look more like your other buttons.

2.)
Also you may want to do something like:
[PHP]
<?php
if(zen_get_products_stock($products_id) > 0){
?>
<!--bof Add to Cart Box-->
***the stuff between these***
<!--eof Add to Cart Box-->
<?php
}
else{
if(BACK_IN_STOCK_ENABLE == "true"){ ?>
<a href="#back-in-stock-popup-wrapper" id="back-in-stock-popup-link"><?php echo BACK_IN_STOCK_LINK; ?></a>
<?php }
}
[/PHP]
Then it will only show when it is out of stock. I probably should add that to the docs for the next release.
20 Jan 2015, 16:39
#7
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

HeathenMagic:

Yes it does, I just spotted it. Irish surname. Ah so that is it, no problem I can remove it as it is an old subscription


I'll try to add a fix for that in the next version
20 Jan 2015, 17:57
#8
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Thanks for the tips, I will try and make an icon. I was struggling with the if sold out code, my php is not very good. But I will keep trying. I put the two additions in the right place, it just said unexpected end. Perhaps as I have a few modules.
20 Jan 2015, 18:12
#9
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Posts:
10,011
Plugin Contributions:
1

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

bislewl:

Thanks for creating a support thread!
You're welcome!!:laugh: I was hoping that you could use this thread as such..

bislewl:

It is a complete re-write, there is a VERY small portion of the code that is used to migrate from Conor/Ceon's Back In Stock to Ajax Back In Stock. To my understanding, I'm fairly certain all of the features of that module are included. To my understanding the "keepers" of Conor/Ceon's Back In Stock have no or little intention to continue development of Conor/Ceon's "free" modules. There are several stores that have been using this module for over about 6+ months.

While a uninstall of Conor/Ceon's Back In Stock Is not required it is certainly recommended since both modules have observers checking for products orders etc.

Over 60 hours of development have gone into this module. It corrects many of the "bugs" in his module. And offers much more robust abilities. Including NO core modifications, and only template modifications. Whereas the Conor/Ceon's Back In Stock was modifying the includes/functions/functions_general.php

Also there are several important features that are much needed in the days of spam blocking.

-Conor/Ceon's Back In Stock would continue to send emails until the customer "buy or died". Whereas this version allows a customer to be notified once or every time until they buy.

-Another issue was that several ISP have been blocking the bulk email batches sent by the module so it now limits the number of notifications sent per batch avoiding this issue.

-There is a function "Days of Lag" which appears to be confusing to some. A previous issue was store owners setting Conor/Ceon's Back In Stock to run nightly, however that was causing customers to get emails nightly. The Ajax Back In Stock module checks when an email notification for that entry (customer & product) wa last sent and than makes sure that this equation is true (last day sent + days of lag < Today). Example if a customer was sent an email notification was sent Sunday for product XYZ and the days of lag is set to 7 the customer can't receive another notification till the next Sunday. They may receive a notification that ABC is back in stock though.

Feel free to ask any more questions let me know.

Thanks sooooooo much for the detailed explanation.. Working on a v1.5.4 migration for a client, and she had the old Ceon "Back in Stock Notifications" module installed.. I had concerns about continuing to use ANY of Conor's modules for any of my clients given that JS Web has made it quite apparent that they have little to no intention to continue development of Conor/Ceon's "free" modules. I have no problem paying for premium modules, but I cannot support a "Freemium" module, where ONLY the premium bits are maintained while the free bits are done whenever or never.. Makes it HARD for me to get a client to BUY the premium version when they SEE that they can't reliably TRY the free version because it's not maintained..

Anyway.. thanks for the explanation.. Will give this a whirl and get my client's site converted..
21 Jan 2015, 16:12
#10
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Just been testing the module, I had an out of stock item that was in the list for a test account. I ran it just for that item and it sent me a back in stock email even when out of stock. I tested preview for all items and it seems it will send everybody an email for all items out of stock.
This could be as I imported subs, but not sure. I did upgrade Conor's module a few times, so maybe database got corrupt somehow? But I can confirm these items are out of stock.
21 Jan 2015, 16:47
#11
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Interesting,
What are your settings in configuration->Stock for Check Stock and Allow Checkout?
21 Jan 2015, 16:56
#12
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

I have:-

Allow customer to checkout even if there is insufficient stock - False
Check to see if sufficent stock is available - True
21 Jan 2015, 19:46
#13
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

I have discovered the issue and fixed in 4.0.3
21 Jan 2015, 22:48
#14
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Posts:
730
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

yep it definitely works! What an ace module and module maker!! :-DD Thanks so much!!!
27 Jan 2015, 16:00
#15
nightfly66 avatar

nightfly66

New Zenner

Join Date:
Oct 2008
Posts:
44
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Hi,

I have a blank page when I connect to the page administrator.
The problem seems to be in init_back_in_stock.php:

[PHP]PHP Fatal error: Call to undefined function plugin_version_check_for_updates() in /Applications/MAMP/htdocs/store/floriostore/includes/init_includes/init_back_in_stock.php on line 51[/PHP]

[PHP]line 51: $new_version_details = plugin_version_check_for_updates($zencart_com_plugin_id, $current_version);[/PHP]

Have you any suggestions?

I use Zen Cart v1.5.1
27 Jan 2015, 16:12
#16
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Nightfly66:

Hi,

I have a blank page when I connect to the page administrator.
The problem seems to be in init_back_in_stock.php:

[PHP]PHP Fatal error: Call to undefined function plugin_version_check_for_updates() in /Applications/MAMP/htdocs/store/floriostore/includes/init_includes/init_back_in_stock.php on line 51[/PHP]

[PHP]line 51: $new_version_details = plugin_version_check_for_updates($zencart_com_plugin_id, $current_version);[/PHP]

Have you any suggestions?

I use Zen Cart v1.5.1


Looks like the function is called before the function is declared (1.5.1 doesn't have that function standard)

Move[PHP]// Version Checking
if ($zencart_com_plugin_id != 0) {
$new_version_details = plugin_version_check_for_updates($zencart_com_plugin_id, $current_version);
if ($_GET['gID'] == $configuration_group_id) {
$messageStack->add("Version ".$new_version_details['latest_plugin_version']." of " . $new_version_details['title'] . ' is available at <a href="' . $new_version_details['link'] . '" target="_blank">[Details]</a>', 'caution');
}
}[/PHP]

to the bottom of the page, after the function.

Issue is resolved in 4.0.4
27 Jan 2015, 16:20
#17
nightfly66 avatar

nightfly66

New Zenner

Join Date:
Oct 2008
Posts:
44
Plugin Contributions:
0

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

Thanks for answer !
Now it works :-)
27 Jan 2015, 16:51
#18
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Posts:
10,011
Plugin Contributions:
1

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

DivaVocals:

You're welcome!!:laugh: I was hoping that you could use this thread as such..


Thanks sooooooo much for the detailed explanation.. Working on a v1.5.4 migration for a client, and she had the old Ceon "Back in Stock Notifications" module installed.. I had concerns about continuing to use ANY of Conor's modules for any of my clients given that JS Web has made it quite apparent that they have little to no intention to continue development of Conor/Ceon's "free" modules. I have no problem paying for premium modules, but I cannot support a "Freemium" module, where ONLY the premium bits are maintained while the free bits are done whenever or never.. Makes it HARD for me to get a client to BUY the premium version when they SEE that they can't reliably TRY the free version because it's not maintained..

Anyway.. thanks for the explanation.. Will give this a whirl and get my client's site converted..

One last thing/suggestion.. I haven't fully looked at the part of the coe that manages the conversion from Ceon Back in Stock Notifications.. But I'd like to suggest that perhaps your conversion code include the option of removing any tables and maybe even files from the old module as a part of the conversion process.. The process could also include making and storing backups of the files and database changes removed. Just thinking outloud about novice shopowners (and even seasoned pros..:laugh:) and how to make the conversion process seemless..

Heck.. maybe you already do this.. if so.. disregard.. Still haven't had coffee yet.. :laugh:
27 Jan 2015, 18:10
#19
bislewl avatar

bislewl

Totally Zenned

Join Date:
Dec 2011
Posts:
674
Plugin Contributions:
11

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

DivaVocals:

One last thing/suggestion.. I haven't fully looked at the part of the coe that manages the conversion from Ceon Back in Stock Notifications.. But I'd like to suggest that perhaps your conversion code include the option of removing any tables and maybe even files from the old module as a part of the conversion process.. The process could also include making and storing backups of the files and database changes removed. Just thinking outloud about novice shopowners (and even seasoned pros..:laugh:) and how to make the conversion process seemless..

Heck.. maybe you already do this.. if so.. disregard.. Still haven't had coffee yet.. :laugh:


This is for a couple reasons.

Tables-
1.) The table, really does do much harm however if something goes wrong it will!
2.) Maybe someday you may want to reference it.

Files-
1.) There is a core modification in CEON's module, so that would either have to be unmodified or overwritten. And since it is used on so many different versions it would make that script to un-modify very difficult and very problematic.
2.) Also there are several template modifications, and so those would need to be removed, and since every store is unique that would only further complicate a "automatic" and would certainly fail a very high percentage of the time. Leaving store owners with a broken site, and little records of what was done.
27 Jan 2015, 18:46
#20
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Posts:
10,011
Plugin Contributions:
1

Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

bislewl:

This is for a couple reasons.

Tables-
1.) The table, really does do much harm however if something goes wrong it will!
2.) Maybe someday you may want to reference it.

Files-
1.) There is a core modification in CEON's module, so that would either have to be unmodified or overwritten. And since it is used on so many different versions it would make that script to un-modify very difficult and very problematic.
2.) Also there are several template modifications, and so those would need to be removed, and since every store is unique that would only further complicate a "automatic" and would certainly fail a very high percentage of the time. Leaving store owners with a broken site, and little records of what was done.


I can see no reason why anyone would need to reference a table for a module that has not only been replaced by another, but the data migrated as well.. the data migration provides that "view back" as it were.. Not seeing the benefit of seeing it as it USED to be.. Even in corporate migration projects I've been a part of, we don't keep the old data hanging around once a successful migration has been completed..

Anyway.. I only suggested this as a possible future enhancement because there are module contributions for Zen Cart (by at least ONE or two contributors) which actually do just what I speak of in whole or in part.. (Image Handler for example does make and save file backups of modified files) So I know that functionally and technically it is doable.. but I understand if it's not something that will be included in the codebase.. Not a showstopper.. but truly a nice to have..:smile: