ArtcoInc Posted July 9, 2014 Share Posted July 9, 2014 http://addons.oscommerce.com/info/8750 This add-on adds a button to the 'product_info.php' page that, when clicked, pops up a box allowing the customer to request a notification when an out-of-stock item is back in stock. I have installed this add-on, and everything works *except* for the pop up :wacko: Instead, when clicked, the customer is taken back to 'index.php'. Has anyone else tried this and got it to work? Thanks! Malcolm Quote Link to comment Share on other sites More sharing options...
Bobber Posted April 8, 2015 Share Posted April 8, 2015 I was hoping to use this contribution as well... Has anyone ever used a Out of Stock Product Notification Add-on before? Any advise when using this in your store? Has anyone else had this problem like @@ArtcoInc or found the solution to this problem? Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 9, 2015 Author Share Posted April 9, 2015 @@Bobber With (lots of) help from @@Tsimi, we were able to get this to work ... sort of ... (going off of memory here .. ) 1) Since we were using the Bootstrap version of osC, we re-wrote this add-on to use a Bootstrap Modal instead of a pop-up. That solved the 'return to index.php' problem. 2) Once that was working, I noticed that when the administrator sent an email to the customer regarding an out-of-stock item, the code used the mailto: function, which used the email client on the administrator's workstation. I had to re-write the admin notification to use the site's email service. 3) Once I got that working, I then learned that, when a product is brought back into stock, the code *automatically* emailed the customer, and deleted the record in the admin's side. Not wanting this automatic functionality, I realized I needed to re-write the automatic notification *and* the record deletion. At that point, I shelved this project, and moved onto other things. I never did implement this in my store. I do see value in this idea, and may go back and work on this more later (time permitting). Good luck! Malcolm Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 10, 2015 Share Posted April 10, 2015 @@ArtcoInc Your memory serves you very well, that is how I remember it too. At the end we just left it aside and went to other things. It would be interesting though to get back to it and see what can be done (again). Now thinking back, to send manually E-Mails from the admin area is not really necessary since it will send out one the second you update the quantity. That again would make this add-on super light with very few code changes. Unfortunately, it requires you to amend the application_top.php file which is a core file. In Bobbers case I think he has trouble getting this to work in a regular, non-BS shop. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted April 10, 2015 Share Posted April 10, 2015 @@Bobber Just out of curiosity I installed this quickly into a fresh, new osC 2.3.4 shop and the Pop Up shows just fine. Did you add all new files to your shop? Files like catalog/ext/jquery/ui/notify_Check.js And did you add this code <!-- // http://www.linuxuk.co.uk - Notify when back in stock. Start --> <script type="text/javascript" src="ext/jquery/ui/notify_Check.js"></script> <!-- // http://www.linuxuk.co.uk - Notify when back in stock. End --> inside the template_top.php just right above <?php echo $oscTemplate->getBlocks('header_tags'); ?> </head> The only thing that doesn't work with this add-on is when a product has a ' or any other special character inside it it will give you an SQL 1064 error message. Haven't looked deeper into it yet though.... Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 10, 2015 Author Share Posted April 10, 2015 (edited) @@Tsimi I agree that it may not be necessary to manually send emails from the Admin area. But, this feature is built into the add-on, and when/if the situation were to arise (say, a product was being discontinued, or replaced with another product), I could theoretically be on any workstation (mine, yours, my Mom's ... ) administering my store. In this case, I would want the email to come from my store, not from the identity of the computer I was using at the time. Let's say that my store is located at: www.MyStuffyStore.com, and I was using your computer o:) to answer a customer, and your email identity is: SexyStudMuffin@@me.com (w00t) Malcolm Edited April 10, 2015 by ArtcoInc Quote Link to comment Share on other sites More sharing options...
Bobber Posted April 18, 2015 Share Posted April 18, 2015 I have not installed this yet @@Tsimi I was researching it and there does not seem to be many addons for this area. Thank you for your help! Quote Link to comment Share on other sites More sharing options...
Patty Posted July 14, 2015 Share Posted July 14, 2015 I'm having the same problem with the version for v2.3.4 http://addons.oscommerce.com/info/8555 Whenever I click the name field on the pop up window, it takes me to index.php Has anybody found a fix for this? Maybe the developer @@FIMBLE can help? TIA for any clue. Quote Patty Link to comment Share on other sites More sharing options...
Patty Posted July 16, 2015 Share Posted July 16, 2015 I've found another bug: Alerts are being sent without user's email and even if the product is in stock. I'm not sure how it happens, if it's caused by spam attempt or just by clicking on the pop up window, which is redirecting to the index.php page I tried to contact the developer FIMBLE, but he's not active in the forum since March and haven't replied to my contact in his own site yet. Can somebody help with that? Pleeeease!!!! :) Quote Patty Link to comment Share on other sites More sharing options...
Patty Posted July 19, 2015 Share Posted July 19, 2015 I still can't find a fix for this. Can somebody help? Quote Patty Link to comment Share on other sites More sharing options...
Dan Cole Posted July 21, 2015 Share Posted July 21, 2015 @@Tsimi Lambros...did this contribution ever get updated for BS? It's one that I used in 2.2 and is now on my list to take a look at. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 21, 2015 Share Posted July 21, 2015 @@Dan Cole It has never been completed for BS. Malcom and i started a while back but we never really finished it. The major problems with this addon is not the catalog side but the admin area. We tried to improve some of the mail sending functions and somehow it got lost there and we went to other things. I still might have the files from that time somewhere around if i should find them i'll let you know. Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 21, 2015 Author Share Posted July 21, 2015 @@Tsimi I still have the PM you sent with the code bits ... Malcolm Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted July 22, 2015 Share Posted July 22, 2015 @@Tsimi @@ArtcoInc can one of you either post it or PM me with it. I hate reinventing the wheel...maybe I can add to it as well. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 22, 2015 Share Posted July 22, 2015 As soon i get back to the office this afternoon i'll check for the files. In approx. 2 hours i know more... Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted July 22, 2015 Share Posted July 22, 2015 @@Tsimi No hurry...I'm off to bed. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 22, 2015 Share Posted July 22, 2015 (edited) @@Dan Cole Hi Dan I re-edited the whole thing and now it is a simple module that you can install through the admin area. No SQL changes, no CSS additions necessary, all done automatically. Unfortunately core code changes are necessary, only very, very few though. So here is the package and if anything is write here. Known Bugs is inside the install manual. Edited July 22, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted July 22, 2015 Share Posted July 22, 2015 @@Tsimi Thanks Lambos...I will have a go at it and let you know how it goes....you just put a smile on my face....I noticed your TM. :) Thanks again... Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 22, 2015 Share Posted July 22, 2015 (edited) @@Dan Cole :D Be aware that this is just beta phase and needs more testing. Especially the E-Mail stuff needs more testing. You can either send E-Mails through the Stock Alerts page in the admin area or it will send an E-Mail automatically when you restock the product quantity. The code responsible for the auto E-Mail function is inside the application_top.php file. Edited July 22, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 22, 2015 Share Posted July 22, 2015 (edited) @@Dan Cole Just found a typo inside the install manual. Inside step 3.6 find 3 instances of TABLE_STOCK_ALERT and replace them with stock_notification Edited July 22, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted July 22, 2015 Share Posted July 22, 2015 @@Tsimi Thanks Lambros...I'm just playing with it...I mean working on it now. B) Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Dan Cole Posted July 22, 2015 Share Posted July 22, 2015 @@Tsimi Lambros...just a quick update and a question if I might. First of all, I have the module installed and it went pretty smoothly...I then did a quick test....just on the front end at this point and it generates the appropriate email box and emails so from what I can tell it's doing what it should. I then started to mess around with the placement of the Out of stock, get notified message...I wanted it positioned closer to the top of the page rather than at the bottom so I moved the form tags around to get that issue out of the way and them moved the <?php echo $oscTemplate->getContent('product_info'); ?> call to where I wanted the message and realized that it moves any other product_info content modules as well...for example your wishlist message, so I guess what my question is.... Iis it possible to just call one module and not all of them or can multiple getContent calls be used with some of a sort order. I can see that as content modules are added especially to busy pages like product_info that we'll need some way to do this. I'm guessing that the function exists but perhaps we're just not using it here. Any idea... Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
ArtcoInc Posted July 22, 2015 Author Share Posted July 22, 2015 @@Dan Cole Just as a point of clarification... In the *original* add-on, the admin page used the mailto: function to notify the customer. As I explained here ... http://www.oscommerce.com/forums/topic/397505-pop-up-customer-stock-alert/?p=1726364 I thought that any emails to the customer should come from the store, and not from the identity of the computer that the store owner was using (at that time) to administer the store. So, (with *lots* of help) I re-wrote /admin/stock_alert.php to generate the email, and send it from the store. This is included in the package from Lambros. The code is crude, and there are still 'testing bits' left in. I am not saying this for the acknowledgement, but rather to emphasize that the email code was one of my first such efforts, and thus is a bit crude, and not up to Lambros' typically high standard. B) I'll also point out that in the stock osC code, the following files also use the mailto: function, and (imho) should also be changed: /admin/packing_slip.php /admin/invoice.php /admin/orders.php One more point: The original add-on also *automatically* sends an email to the customer when the item is added back to stock, *and* automatically deletes the notification request from the database once the notification has been sent. Lastly, there is no ability for the store administrator to manage the database of notification requests. There are all areas that I felt needed to be addressed, but I didn't have the time to work on. Malcolm Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted July 22, 2015 Share Posted July 22, 2015 @@ArtcoInc Thanks Malcolm....the old version I have on my 2.2 shop uses the shop email routine to send emails so I wonder why that got changed in 2.3....in any case, I agree...they should come directly from the shop and in that regard I owe you and Lambros a big thank you for sorting that out. I'll also keep that in mind with respect to the emails generated by those other files as well. I'm still back in the dark agges so I did not know that. With regards to the notifications being generated automatically I'm going to need to sort that out...my stock is updated directly to the database so it won't generate an email unless I actually touch the backend product page....that doesn't work in my case so that'll definitely need sorting. Thanks for the head ups for your work on this. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 23, 2015 Share Posted July 23, 2015 (edited) @@Dan Cole I thought that might be a bit tricky there especially when other modules are already installed. There is an easy solution though, you just create a new folder structure under the content/ folder. Example: inside the catalog/includes/modules/content/ folder create a new folder named stock_alert. Then inside the stock_alert folder create a new folder named templates. Then move the cm_pi_stock_alert.php inside the stock_alert folder. Then move the stock_alert.php from the templates folder to the new templates folder. Do the same for the catalog/includes/languages/english/ folder. Create a new folder with the name stock_alert and move the language cm_pi_stock_alert.php file inside it. Make sense so far? Inside the product_info.php you should have this code <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?> and this one </form> I don't know why the first code is so far up inside that product_info.php file even though you only need it for the add to cart button. So you could just move the codes and wrap only the buttons with it so that they look like this. <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?> <div class="buttonSet row"> <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'glyphicon glyphicon-comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?></div> <div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'glyphicon glyphicon-shopping-cart', null, 'primary', null, 'btn-success'); ?></div> </div> </form> then place the following code where ever you like inside that file (except between the form codes shown above.) <div class="row"> <?php echo $oscTemplate->getContent('stock_alert'); ?> </div> after all that you might have to re-install the module in the admin section. Edited July 23, 2015 by Tsimi Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.