-
Re: Warning: an error occurred
Hi Erin,
Quote:
Originally Posted by
ecclescake
I see "Warning: an error occurred, please refresh the page and try again." This usually seems to crop up on a database error, but there's nothing in my myDEBUG cache.
The debug cache is indeed the first place I'd look. It does sound like the sort of problem that is caused by a file being corrupt or missing. I'd reupload all the files again, and also check that the value for DIR_FS_CATALOG is correct in your configure.php file.
Hope that helps!
All the best...
Conor
ceon
-
Re: Warning: an error occurred
Hi Conor, and thanks so much for your quick response!
So I triple-checked all the files, re-downloaded the mod and copied the new version of all the files across, to no avail. This was all on my local machine, so I figured I'd try uploading and installing on my dev store and see what happened. Same error message when I tried to access the link from the notification-subscribe email, only now there was also a message in the debug cache. Turns out that subscription_code, name, and email_address were created with the latin_swedish_ci collation and the rest of my DB is in latin_general_ci! I changed the collation of those columns and tried subscribing to another product. Works great!
However! The dev store isn't sending content in the subscription notification emails. In the HTML email I just get $EMAIL_HTML_MESSAGE, and the text-only email is completely blank. My local install sends these messages fine, and the dev store sends other emails fine. I'm a little fuzzy on the email system--is the email being constructed in admin/functions/back_in_stock_notifications_functions.php? Any debugging tips?
Thanks again,
erin.
-
Re: Warning: an error occurred
Hi,
Quote:
Originally Posted by
ecclescake
Hi Conor, and thanks so much for your quick response!
No problem.
Quote:
Originally Posted by
ecclescake
Turns out that subscription_code, name, and email_address were created with the latin_swedish_ci collation and the rest of my DB is in latin_general_ci! I changed the collation of those columns and tried subscribing to another product. Works great!
I'm glad you've got that sorted now.. it's strange that your local environment doesn't create the debug files.. obviously they are very handy so I'd do what I could to have it work "as well as" the development server, make problems like this easier to identify in the future.
Quote:
Originally Posted by
ecclescake
However! The dev store isn't sending content in the subscription notification emails. In the HTML email I just get $EMAIL_HTML_MESSAGE, and the text-only email is completely blank. My local install sends these messages fine, and the dev store sends other emails fine. I'm a little fuzzy on the email system--is the email being constructed in admin/functions/back_in_stock_notifications_functions.php? Any debugging tips?
The e-mail is actually constructed in includes/modules/pages/back_in_stock_notification_subscribe/header_php.php
It would appear you do indeed have a problem with your e-mail system.. $EMAIL_HTML_MESSAGE is built by Zen Cart with the content sent to it by the zen_mail() function used within sendBackInStockNotificationSubscriptionEmail(). Trace your e-mail function (zen_mail()) and see why it isn't taking the input given to it and building the e-mail properly!
Hope that helps!
All the best..
Conor
ceon
-
Re: Warning: an error occurred
Thanks for the tips, Conor. Here's what I found:
The output of sendBackInStockNotificationSubscriptionEmail() seems to be correct: it's an array like the following:
Code:
[EMAIL_TEXT_HEADER] => Order Confirmation
[EMAIL_TEXT_FROM] => from
[INTRO_STORE_NAME] => Store Name
[GREETING] => Dear
[CUSTOMER_NAME] => My Name
[INTRO1] => You have successfully subscribed to the Back In Stock Notification List for:
[PRODUCT_NAME] => Product A
[INTRO2] => We shall send you an e-mail when it is back in stock!
[URL_INTRO] => If you did not request to be subscribed to this list or have simply changed your mind and don't want to be informed when this product is back in stock, please log into your Account and unsubscribe yourself:
[URL_TEXT] => Go to My Account
[URL_VALUE] => https://www.shopurl.com/index.php?ma..._notifications
[EXTRA_INFO] =>
That same array ends up inside zen_mail(). Anytime I log the value of $ErrorInfo within the zen_mail() function, it's an empty string. When I log $email_text or $text just before line 148 of functions_email() (just before //eof: body of the email cleanup) I just get an empty string. My functions_email() is identical to the stock 1.5 file.
Also, when I look in the email_archive table in my DB, I see $EMAIL_MESSAGE_HTML in place of the body of the email. It looks like the mod is outputting correctly, zen_mail() is taking the array and not generating an error string, yet the email that is archived and arrives in my inbox is incorrect.
I will send you more details privately and hopefully we can get this sorted!
Conor, I've sent you a donation as a token of thanks for your great mods and helpful support. (I know you know that already, but I hope to encourage others to do the same--the Ceon mods and support really are top-notch! They are more than worth a few bucks!)
erin.
-
Re: Warning: an error occurred
Very useful mod, Conor.
Just installed it on a (heavily modified) 1.3.9h store and it works a treat.
Donation is on its way - I encourage all fellow zenners who are using this mod to make a donation to the author.
Thanks again / Frank
-
Re: Warning: an error occurred
Hi Frank,
Quote:
Originally Posted by
frank18
Very useful mod, Conor.
Just installed it on a (heavily modified) 1.3.9h store and it works a treat.
Donation is on its way - I encourage all fellow zenners who are using this mod to make a donation to the author.
Thanks again / Frank
Thanks so much for that, it's so good of you to have done that!
I'm really glad you like the module and that it is useful to your store.. I hope it increases your sales dramatically, you certainly deserve it! :)
Hopefully I can get an even nicer new version released for you soon and it can help your store further again. ;)
All the best...
Conor
ceon
-
Re: Warning: an error occurred
Hi Kjetil,
Quote:
Originally Posted by
kjetilhansen
I would like to install this, but it said in the plugin thread that it changes the buy now, with notify when back in stock. On my page people can still buy products that is out of stock, and they will be first in line when the items are back in stock. Is there an option that there is just the box beneath the product description that customers can be mailed when they are back in stock, and other can still buy things that is not in stock?
It adds a form to subscribe as well as a link to this form underneath the Buy Now button.
You can have the Buy Now button continue to work but it is a case of one or the other in terms of what customers do.. they can subscribe to the list or buy but not both at the same time. If they want to both subscribe and buy then they need to go to the product page twice.
Best way to see if this is fine for you (which I think it would be) is to just install the software and try it out, it doesn't take long.
All the best..
Conor
ceon
-
Re: Warning: an error occurred
Thank you. Will do, great work btw :)
-
Re: Warning: an error occurred
On the admin side on the list of Products with Subscriptions, is it possible to add a column showing the model number? This would definitely help when I'm reordering products. I am using Zen 1.5. Thanks.
-
Re: Warning: an error occurred
Hi,
Quote:
Originally Posted by
KathyG
On the admin side on the list of Products with Subscriptions, is it possible to add a column showing the model number? This would definitely help when I'm reordering products. I am using Zen 1.5. Thanks.
Yes, it certainly is possible. Just update the SQL in admin/back_in_stock_notifications.php to load the products' model data and modify the output code to add in a new column/cells/header cell for product model.
All the best..
Conor
ceon
-
Re: Warning: an error occurred
Conor has kindly been working with me behind the scenes to sort out my issues, described upthread. It looks like it was an issue of not uploading the email templates. I have a local version of the site on my computer which automatically synchs with the live version. The email templates were present in my local install, so I'd assumed they were in the live version too, but they weren't. Now I just have to sort out why they weren't being synched--it's not an issue with the mod at all.
Thanks again, Conor, for your helpful mods and kind support!
erin.
-
Re: Warning: an error occurred
If this has been asked before, kindly point me to the thread.
I've been using this module religiously on our old 1.3.9h installation. Works great!
Recently, we upgraded our entire site to 1.5.1, and I reinstalled this CEON Module with the latest version. It appears to have picked up all of my previous subscriptions because I see a lot of entries waiting to be emailed with our new stock.
However, when I send out the emails, I am getting blank product descriptions. It's just saying this:
Quote:
Dear E C Erwin,
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
As you can see, no product is listed! Any idea what could be wrong?
-
Re: Warning: an error occurred
Just to touch on my post above, this graphic may help. When I go to perform a TEST send of the notifications, you can see that many emails are coming up with no products associated with it. That is why the emails are not giving them links to anything, but how come they are still showing up on the list?
Is this something that has to do with upgrading from 1.3.9 to 1.5.1 in zencart? Do I need to purge these blank listings from the database?
Attachment 11714
Also, if I look up one of these records in the database, this is what I see:
Attachment 11715
As you can see, it does contain a product id, but also no email address (even though the email is displayed on the first screenshot I posted). Any ideas?
-
Re: Ceon Back In Stock Notifications 3.0.0
Nevermind my post above. I think it was something modified on our side which was causing the issue.
-
Re: Ceon Back In Stock Notifications 3.0.0
Installed this mod on my store the other day and wow it is great! This has been the #1 requested feature by my customers and now they have it, and it has already resulted in sales coming in that would not have come in before (or so soon).
I would like to automate the checking and sending of emails now. Stocking status on many of the items on my store is set via a script (running via cron job outside of the zencart environment) that checks my supplier's database every few minutes and generates SQL to update the zencart database. So items can come in stock at 3AM even while I sleep. I would like to email the customer as soon as possible after a stock status change, and a cron job running every few minutes and invoking certain Ceon functions would do the trick.
Conor hints in the back_in_stock_notifications_functions.php that you could use a cron job to call these functions, specifically expungeOutdatedSubscriptionsFromBackInStockNotificationsDB() and sendBackInStockNotifications();. How exactly would that be done? Anyone have any clues or examples? I'm a software engineer by training so don't sugar coat it. Just trying to avoid reinventing the wheel in case anyone has already done this. I'm guessing that at least I'd need to call some sort of zencart main function to let these functions know what database they are to use, etc.
Thanks!
-Mark
President/CEO
Exile Machine LLC
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
Exile Machine
Installed this mod on my store the other day and wow it is great! This has been the #1 requested feature by my customers and now they have it, and it has already resulted in sales coming in that would not have come in before (or so soon).
I would like to automate the checking and sending of emails now. Stocking status on many of the items on my store is set via a script (running via cron job outside of the zencart environment) that checks my supplier's database every few minutes and generates SQL to update the zencart database. So items can come in stock at 3AM even while I sleep. I would like to email the customer as soon as possible after a stock status change, and a cron job running every few minutes and invoking certain Ceon functions would do the trick.
Conor hints in the back_in_stock_notifications_functions.php that you could use a cron job to call these functions, specifically expungeOutdatedSubscriptionsFromBackInStockNotificationsDB() and sendBackInStockNotifications();. How exactly would that be done? Anyone have any clues or examples? I'm a software engineer by training so don't sugar coat it. Just trying to avoid reinventing the wheel in case anyone has already done this. I'm guessing that at least I'd need to call some sort of zencart main function to let these functions know what database they are to use, etc.
Thanks!
-Mark
President/CEO
Exile Machine LLC
Here you go:
http://www.zen-cart.com/showthread.p...34#post1144934
-
Re: Ceon Back In Stock Notifications 3.0.0
Not sure what has changed now, but my 'back in stock notification' emails are missing my domain name in the link that gets sent out?!!?!
Any one run into this before I start digging around?
-
Re: Ceon Back In Stock Notifications 3.0.0
Can I change the location of the "Notify Me" button? I'd like to put it inside the FieldSet so it shows inside the form border.
Thanks for the mod, just what we needed!!!
-
Product Notification button not working
Not sure if this was covered somewhere else and I missed it but, when I click on the button to be notified when a product will be back in stock, the link just takes me to the product page and that's it. Anyone have an idea what I might be missing here? I installed the mod as per instructions and it seems like it's working all right until i get to that. Any help would be greatly appreciated. Thanks in advance.
Link to site with a product out of stock:
http://www.thecuterie.com/index.php?...ath=1?xyzallow
-
Re: Product Notification button not working
Hello all! This is a great plugin and I have tried following the thread and have tried setting up a cron job to auto run the script but I get nothing. I am using v1.5.0 of zen cart and cannot add administrative levels or restrict them to a certain area. The latest for the admin profiles is for 1.3.9 and some of the files to edit do not exist in zen v1.5.0.
Does anyone have a solution so that I can run cron jobs and send out automatic notification of products back in stock? We have over 15,000 products and our inventory is updated every 10 minutes so it would be very nice to have this automated.
Any help would be appreciated.
Clint
-
Re: Product Notification button not working
This module could be modified to allow it to be executed as a Cron job. I would recommend you contact a ZenCart Developer to modify this, and make that change.
-
Re: Ceon Back In Stock Notifications 3.0.0
I have installed this model but it does not provide the functionality I need. How can I uninstall it?
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
godt
I have installed this model but it does not provide the functionality I need. How can I uninstall it?
revert back to the back-up you made before beginning the install.
-
Re: Product Notification button not working
Quote:
Originally Posted by
clint6998
Hello all! This is a great plugin and I have tried following the thread and have tried setting up a cron job to auto run the script but I get nothing. I am using v1.5.0 of zen cart and cannot add administrative levels or restrict them to a certain area. The latest for the admin profiles is for 1.3.9 and some of the files to edit do not exist in zen v1.5.0.
Does anyone have a solution so that I can run cron jobs and send out automatic notification of products back in stock? We have over 15,000 products and our inventory is updated every 10 minutes so it would be very nice to have this automated.
Any help would be appreciated.
Clint
http://www.zen-cart.com/showthread.p...34#post1144934
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
Limitless
Not sure what has changed now, but my 'back in stock notification' emails are missing my domain name in the link that gets sent out?!!?!
Any one run into this before I start digging around?
Hi,
I have the same problem. Did you manage to solve it? I have v3.2.0 installed on ZenCart 1.5.1. Also using CEON URI mapping. The link in notification e-mails looks like this: /category/product
Can you help?
Thank you in advance.
-
Re: Ceon Back In Stock Notifications 3.0.0
Hi!
I just installed this plugin on our test server. I like that the unique files and the potentially-colliding files were in separate folders in the zip, it made the install mostly painless.
Once I got it installed I was a bit surprised. When I'm already a registered customer on this site it's frustrating to have to type in my name and email (twice!) to get put on a list. Give me a one-click to subscribe and I'm far more likely to do it. Let me unsubscribe from the same page instead of hidden down in "my account" and I'm even happier. Are these things possible, or should I be looking for another similar plugin?
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
i-make-robots
Hi!
I just installed this plugin on our test server. I like that the unique files and the potentially-colliding files were in separate folders in the zip, it made the install mostly painless.
Once I got it installed I was a bit surprised. When I'm already a registered customer on this site it's frustrating to have to type in my name and email (twice!) to get put on a list. Give me a one-click to subscribe and I'm far more likely to do it. Let me unsubscribe from the same page instead of hidden down in "my account" and I'm even happier. Are these things possible, or should I be looking for another similar plugin?
When I am logged in as a customer ( I am assuming you were trying this logged in as a customer) the form is pre-populated with the name and email in both email fields. Sounds like you might not have uploaded/edited everything if wasn't working after logging in.
You should be able to embed the unsubscribe code from the account page into anywhere you want, but personally I think it's 6 to 1, half dozen the other. They are still going to have to go somewhere to unsubscribe which means clicking to get there, and on the account page it shows all of the subscriptions and is a central place to unsubscribe to multiple products without having to go all over the site to do it.
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
dee_d_lady
Hi,
I have the same problem. Did you manage to solve it? I have v3.2.0 installed on ZenCart 1.5.1. Also using CEON URI mapping. The link in notification e-mails looks like this: /category/product
Can you help?
Thank you in advance.
I have not been able to track this down yet.
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
lankeeyankee
When I am logged in as a customer ( I am assuming you were trying this logged in as a customer) the form is pre-populated with the name and email in both email fields. Sounds like you might not have uploaded/edited everything if wasn't working after logging in.
You should be able to embed the unsubscribe code from the account page into anywhere you want, but personally I think it's 6 to 1, half dozen the other. They are still going to have to go somewhere to unsubscribe which means clicking to get there, and on the account page it shows all of the subscriptions and is a central place to unsubscribe to multiple products without having to go all over the site to do it.
ditto, my installation works just fine.
-
Re: Ceon Back In Stock Notifications 3.0.0
Well... I'll copy the unsubscribe to the product page as well. I don't see why there would need to be a form *at all* when the data ceon needs is already in the membership info.
-
Re: Ceon Back In Stock Notifications 3.0.0
hello there ,i just read all the thread (o.k almost all of it ) and i couldn't find answers.
there is 2 problems.
1.when you click on (To be notified when this product is back in stock please click here.) so it stay on the same page and the url look like that (-tr-073-p-17948.html#back_in_stock_notification_form
2.when i submit the form by clicking the notify me button so from here on nothing working ,there isn't any new in database ,and the no notification that i submit the form.
please help .
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
Scott Benton
hello there ,i just read all the thread (o.k almost all of it ) and i couldn't find answers.
there is 2 problems.
1.when you click on (To be notified when this product is back in stock please click here.) so it stay on the same page and the url look like that (-tr-073-p-17948.html#back_in_stock_notification_form
2.when i submit the form by clicking the notify me button so from here on nothing working ,there isn't any new in database ,and the no notification that i submit the form.
please help .
What happens if you disable your 'SEO' rewriting?
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
picandnix
What happens if you disable your 'SEO' rewriting?
thanks a lot for your replay.
this is a very good question, but i dont have answer for ,because i just understood that i can't disable the Ultimate SEO in using.
every time i try to change Enable SEO URLs? to false so it don't let me and return to true.
but let say it because of the rewriting , what can i do to fix this issue?
thanks again.
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
dee_d_lady
Hi,
I have the same problem. Did you manage to solve it? I have v3.2.0 installed on ZenCart 1.5.1. Also using CEON URI mapping. The link in notification e-mails looks like this: /category/product
Can you help?
Thank you in advance.
Still trying to track this down.
I see in the admin/includes/functions/back_in_stock_functions.php it builds the 'STORE_URL' and 'PRODUCT_DETAIL' variables with the following function:
function sendBackInStockNotificationEmail($name, $email, $plain_text_msg, $html_msg,
$more_than_one = false, $test_mode = false)
{
global $messageStack, $ENABLE_SSL;
$plain_text_msg_parts['EMAIL_GREETING'] = sprintf(EMAIL_GREETING, $name);
$html_msg_parts['EMAIL_GREETING'] =
htmlentities(sprintf(EMAIL_GREETING, $name), ENT_COMPAT, CHARSET);
if (!$more_than_one) {
$plain_text_msg_parts['EMAIL_INTRO_1'] .= EMAIL_INTRO_SINGULAR1;
$plain_text_msg_parts['EMAIL_INTRO_2'] .= EMAIL_INTRO_SINGULAR2;
$html_msg_parts['EMAIL_INTRO_1'] .= EMAIL_INTRO_SINGULAR1;
$html_msg_parts['EMAIL_INTRO_2'] .= EMAIL_INTRO_SINGULAR2;
} else {
$plain_text_msg_parts['EMAIL_INTRO_1'] .= EMAIL_INTRO_PLURAL1;
$plain_text_msg_parts['EMAIL_INTRO_2'] .= EMAIL_INTRO_PLURAL2;
$html_msg_parts['EMAIL_INTRO_1'] .= EMAIL_INTRO_PLURAL1;
$html_msg_parts['EMAIL_INTRO_2'] .= EMAIL_INTRO_PLURAL2;
}
$ssl_status = "NONSSL";
if ($ENABLE_SSL) {
$ssl_status = "SSL";
}
$plain_text_msg_parts['STORE_URL'] = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
$plain_text_msg_parts['STORE_ACCOUNT_URL'] =
zen_catalog_href_link(FILENAME_ACCOUNT, '', $ssl_status);
$plain_text_msg_parts['STORE_CONTACT_URL'] =
zen_catalog_href_link(FILENAME_CONTACT_US, '', 'NONSSL');
$html_msg_parts['STORE_URL'] = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
$html_msg_parts['STORE_ACCOUNT_URL'] = zen_catalog_href_link(FILENAME_ACCOUNT, '', $ssl_status);
$html_msg_parts['STORE_CONTACT_URL'] = zen_catalog_href_link(FILENAME_CONTACT_US, '', 'NONSSL');
if (!$more_than_one) {
$plain_text_msg_parts['PRODUCTS_DETAIL_TITLE'] = PRODUCTS_DETAIL_TITLE_SINGULAR;
$html_msg_parts['PRODUCTS_DETAIL_TITLE'] = PRODUCTS_DETAIL_TITLE_SINGULAR;
} else {
$plain_text_msg_parts['PRODUCTS_DETAIL_TITLE'] = PRODUCTS_DETAIL_TITLE_PLURAL;
$html_msg_parts['PRODUCTS_DETAIL_TITLE'] = PRODUCTS_DETAIL_TITLE_PLURAL;
}
$plain_text_msg_parts['PRODUCTS_DETAIL'] = $plain_text_msg;
$html_msg_parts['PRODUCTS_DETAIL'] =
'<table class="product-details" border="0" width="100%" cellspacing="0" cellpadding="2">' .
$html_msg . '</table>';
Contents of the email template that gets sent out:
<p>$EMAIL_GREETING</p>
<p>$EMAIL_INTRO_1</p>
<p>$EMAIL_INTRO_2</p>
<fieldset>
<legend>$PRODUCTS_DETAIL_TITLE</legend>
$PRODUCTS_DETAIL
</fieldset>
In testing, I prepended $STORE_URL to $PRODUCT_DETAIL and sent a test message.
It sent me an html email, formatted properly, but laid out like this:
www.domain.com
/category/subcategory/product
Both of which are html links.
So getting closer, but I don't want to hack up this module when it is something else that 'broke' it, not the module itself.
I am missing where it actually 'creates' the <a href= $STORE_URL . $PRODUCT_DETAIL > that goes out in the email.
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
Scott Benton
hello there ,i just read all the thread (o.k almost all of it ) and i couldn't find answers.
there is 2 problems.
1.when you click on (To be notified when this product is back in stock please click here.) so it stay on the same page and the url look like that (-tr-073-p-17948.html#back_in_stock_notification_form
2.when i submit the form by clicking the notify me button so from here on nothing working ,there isn't any new in database ,and the no notification that i submit the form.
please help .
I am having the same problem pretty much. The link is showing up fine but when I click the link it just adds #back_in_stock_notification_form to the end of the link and nothing happens.
-
Re: Ceon Back In Stock Notifications 3.0.0
Never mind, I'm an idiot. Simple error in copying code.
-
Re: Ceon Back In Stock Notifications 3.0.0
I am upgrading from ZC 1.3.9h to ZC 1.5.1. Back in Stock Notifications has been an excellent tool in 1.3.9h. "Ceon Back in Stock Notifications" appears as an entry on the Admin menu under Catalogue and seems to work. Should there be an entry under Admin Configuration to Enable/Disable the plugin as occurred in the previous version?
Also when the modified core file, 1.5.0\includes\functions\functions_general.php is used it conflicts with password_funcs.php.
[30-Nov-2013 21:27:28] PHP Fatal error: Cannot redeclare zen_create_random_value() (previously declared in (snip)\includes\functions\functions_general.php:613) in (snip)\includes\functions\password_funcs.php on line 86
Are there known problems with ZC1.5.1?
-
Re: Ceon Back In Stock Notifications 3.0.0
EDIT:... nevermind, figured it out.
-
Re: Ceon Back In Stock Notifications 3.0.0
Re upgrading from ZC 1.3.9h to ZC 1.5.1.
The install works correctly on a new database. Because I am upgrading, the database tables and entries already exist. I can invoke the back in stock notifications setting screen by manually entering the configuration id of the old page (this still exists in the database).
The install program adds an entry in "admin_pages" table for the catalog menu but does not add a new entry for the configuration menu.
I have manually added a new entry in the "admin_pages" table with the values page_key = 'ceon_bisn_cg', language_key = 'BOX_CEON_BACK_IN_STOCK_NOTIFICATIONS_CONFIG_GROUP', main_page = 'FILENAME_CONFIGURATION', page_params = 'gID=32' [ NOTE this value point s to you existing value], menu_key = 'configuration', display_on_menu = 'Y'
The menu item is now correctly displayed on the admin configuration menu.
-
Re: Ceon Back In Stock Notifications 3.0.0
When customer receive email about back in stock notification, the link is broken.
Instead of showing www.xxx.com/bracelet/k0121
it is showing /bracelet/k0121
may i know how can i rectify that?
-
Re: Ceon Back In Stock Notifications 3.0.0
juneloweelyn, I took a look at the Ceon back in stock notifications module. You're going to need to add the 'additional reference' whatever URI mapping plugin you have used to this code:
admin/includes/functions/back_in_stock_notifications_functions.php
Code:
function buildLinkToProductAdminPage($name, $id, $products_type)
{
global $zc_products;
$type_admin_handler = $zc_products->get_admin_handler($products_type);
$name_length = 55;
$new_name = '<a href="' . zen_href_link($type_admin_handler, 'pID=' . $id . '&product_type=' .
$products_type . '&action=new_product', 'NONSSL', true, true, false, false) . '" title="' .
htmlentities($name, ENT_COMPAT, CHARSET) . '" target="_blank">' .
htmlentities(substr($name, 0, $name_length), ENT_COMPAT, CHARSET) .
(strlen($name) > $name_length ? '...' : '') . '</a>';
return $new_name;
}
I'm assuming this is the global function that builds the product id and link.
You may need to add the same type of reference to handle the extra output on a number of other files related to what the customer can see in 'my account'.
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
Scott Benton
hello there ,i just read all the thread (o.k almost all of it ) and i couldn't find answers.
there is 2 problems.
1.when you click on (To be notified when this product is back in stock please click here.) so it stay on the same page and the url look like that (-tr-073-p-17948.html#back_in_stock_notification_form
2.when i submit the form by clicking the notify me button so from here on nothing working ,there isn't any new in database ,and the no notification that i submit the form.
please help .
Was this ever solved?
I have an zc 1.50 upgraded from 1.39
I also have ultimate SEO 2.212 installed that is rewriting the form submit URL.
if i turn off SEO it works fine and url for action="" is below
index.php?main_page=back_in_stock_notification_subscribe&products_id=
if i turn on SEO then it just throws in the url of the product page that i am on.
anyone have anything on this?
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
speedmaxtor
Was this ever solved?
I have an zc 1.50 from 1.39
I also have ultimate SEO 2.212 installed that is rewriting the form submit URL.
if i turn off SEO it works fine and url for action="" is below
index.php?main_page=back_in_stock_notification_subscribe&products_id=
if i turn on SEO then it just throws in the url of the product page that i am on.
anyone have anything on this?
If you believe you need an URL rewriter then try installing the one from Ceon. Try then together in a test environment but I *think* they play well together.
http://www.zen-cart.com/downloads.php?do=file&id=889
-
Re: Ceon Back In Stock Notifications 3.0.0
I have thousands of products listed in search engines using those urls. Changing SEO now would be certain sales death for indexing and placement just for back in stock location button. Plus I am sure the problem seems to be in the .htaccess file. There is something missing from the htaccess file to rewrite the form url. I am trying to locate ceon seo .htaccess now to compare the differance.
-
Re: Ceon Back In Stock Notifications 3.0.0
I figured it out!
I would have never guessed it but developer left out basic form tag. I guess zen-cart is just throwing a default one in making it work with no seo. Turn on SEO and there is no url and SEO puts in page that its on.
Added this line to tpl_product_info_display.php and bingo it works great. now it has the correct url to submit form to. Now just have to add in to all the other templates.
echo '<form name="back_in_stock_notification" action="http://www.mysite.com/index.php?main_page=back_in_stock_notification_subscribe&products_id=' .$_GET['products_id']. '" method="POST">';
-
Re: Ceon Back In Stock Notifications 3.0.0
This is causing mysql error in account_back_in_stock_notifications.html coming from account_back_in_stock_notifications/header_php.php most likely because of the "';"; that is not allowed with my version of mysql anyway. there are two places in the script that have this coding error. but once i fix this i only get a blank page.
$subscribed_notification_lists_query = "
SELECT
bisns.id, bisns.product_id, pd.products_name, bisns.date_subscribed
FROM
" . TABLE_BACK_IN_STOCK_NOTIFICATION_SUBSCRIPTIONS . " bisns
LEFT JOIN
" . TABLE_PRODUCTS_DESCRIPTION . " pd
ON
bisns.product_id = pd.products_id
LEFT JOIN
" . TABLE_CUSTOMERS . " c
ON
c.customers_id = bisns.customer_id
WHERE
(bisns.customer_id = '" . (int) $customer_id . "'
OR
c.customers_email_address = bisns.email_address)
AND
pd.language_id = '" . (int)$_SESSION['languages_id'] . "';";
-
Re: Ceon Back In Stock Notifications 3.0.0
what are 'fixing' that query with?
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
speedmaxtor
I figured it out!
I would have never guessed it but developer left out basic form tag. I guess zen-cart is just throwing a default one in making it work with no seo. Turn on SEO and there is no url and SEO puts in page that its on.
Added this line to tpl_product_info_display.php and bingo it works great. now it has the correct url to submit form to. Now just have to add in to all the other templates.
echo '<form name="back_in_stock_notification" action="http://www.mysite.com/index.php?main_page=back_in_stock_notification_subscribe&products_id=' .$_GET['products_id']. '" method="POST">';
I would think that the correct way to do this is to use the "zen_draw_form()" function.. but someone can correct me if I am wrong..
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
DivaVocals
I would think that the correct way to do this is to use the "
zen_draw_form()" function.. but someone can correct me if I am wrong..
Using zen_draw_form, as DivaVocals indicated, will also automatically include the hidden input for the session variable ... without which forms using the 'post' method will fail on Zen Cart versions later than v1.5.0.
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
I would have never guessed it but developer left out basic form tag.
Since I have been using this plugin for ages with no issues, as is usually the case with Conor's code...this line finally got me annoyed enough to look in the plugin code for tpl_product_info_display.php.
I find these snippets which build the form:
PHP Code:
$form_start_tag = zen_draw_form('back_in_stock_notification', zen_href_link(FILENAME_BACK_IN_STOCK_NOTIFICATION_SUBSCRIBE, zen_get_all_get_params(), $request_type), 'POST'); $back_in_stock_notification_form->setVariable('back_in_stock_notification_form_start_tag', $form_start_tag);
followed by
PHP Code:
print $back_in_stock_notification_form->getXHTMLSource();
So if you are having to manually add in the form code/reinvent this particular wheel, that means the plugin code is not being output as per design, so you need to investigate the conditions:
PHP Code:
if (isset($back_in_stock_notification_build_form) && $back_in_stock_notification_build_form) {
and find out why.
-
Re: Ceon Back In Stock Notifications 3.0.0
Does anyone know how the subscriber's IP address/email address and info can be attached to the bottom on the admin emails? For example the "For Office Use Only" part. Is there something that can be added to the email code or something that can add this stuff?
-
Re: Ceon Back In Stock Notifications 3.2.2
I have updated this module to allow for sending emails in the language that corresponds to the clients subscription language.
It's also tested on PHP7 with mysqli using Zen Cart 1.5.5a, it should drop straight in.
I will be uploading it shortly but would welcome some feedback/testing first:
https://dl.dropboxusercontent.com/u/...3.2.2alpha.zip
-
Re: Ceon Back In Stock Notifications 3.2.2
Quote:
Originally Posted by
torvista
I have updated this module to allow for sending emails in the language that corresponds to the clients subscription language.
It's also tested on PHP7 with mysqli using Zen Cart 1.5.5a, it should drop straight in.
I will be uploading it shortly but would welcome some feedback/testing first:
https://dl.dropboxusercontent.com/u/...3.2.2alpha.zip
:thumbsup: - BTW, I have version 3.2.0 working without a single glitch in a store which I just upgraded to ZC 1.5.5a (PHP 5.6.20)
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
Originally Posted by
BolinFirearms
I am having the same problem pretty much. The link is showing up fine but when I click the link it just adds #back_in_stock_notification_form to the end of the link and nothing happens.
Bolin: I'm having the same issue. It is probably stupidity no my part as well, but do you remember what code had been miscopied?
Thanks.
-
Re: Ceon Back In Stock Notifications 3.0.0
Hi there,
I just wondered if is possible to migrate the Ajax back in stock SQL data to this version? I can see the SQL heading are a bit different. Thanks in advance.
-
Re: Ceon Back In Stock Notifications 3.0.0
Hi,
When I try to send out emails of back in stock products it returns this 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 ')' at line 4
in:
[ DELETE FROM back_in_stock_notification_subscriptions WHERE id IN ();]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
How could I manager it and fix it?
Thanks
-
Re: Ceon Back In Stock Notifications 3.0.0
I suddenly get this, perhaps after 1.5.5b update, when doing test run or live run:-
Quote:
PHP Fatal error: Call to undefined function zen_get_info_page() in /home/******/classes/usu.php on line 324
usu.php is for ultimate urls I think.
**Figured out, but for anybody else experiencing it you add this to the end of that file***
Quote:
// This function is available for use on the catalog side of Zen Cart and
// needed on the admin side for Ultimate URLs to lookup the product_info page.
if(!function_exists('zen_get_info_page')) {
function zen_get_info_page($zf_product_id) {
global $db;
$sql = "select products_type from " . TABLE_PRODUCTS . " where products_id = '" . (int)$zf_product_id . "'";
$zp_type = $db->Execute($sql);
if ($zp_type->RecordCount() == 0) {
return 'product_info';
}
else {
$zp_product_type = $zp_type->fields['products_type'];
$sql = "select type_handler from " . TABLE_PRODUCT_TYPES . " where type_id = '" . (int)$zp_product_type . "'";
$zp_handler = $db->Execute($sql);
return $zp_handler->fields['type_handler'] . '_info';
}
}
}
-
Re: Ceon Back In Stock Notifications 3.0.0
I've downloaded version 3.2.1 to install on a version 1.5.3 zen cart. When it comes to the modified core files I'm thinking I should go with the 1.5.0 folder which contains the functions_general.php file. Would someone kindly confirm if this is the correct choice rather than the 1.5.5 folder?
-
Re: Ceon Back In Stock Notifications 3.0.0
Hi,
My name is Neil Kerr, I am Conor's younger brother.
My family and I are in the process of relaunching Ceon, in memory of Conor and would appreciate if you could have a look at the following post;
https://www.zen-cart.com/showthread....ing-assistance
Many thanks,
Neil
-
Re: Ceon Back In Stock Notifications 3.0.0
Quote:
[20-Jul-2019 11:12:15] PHP Fatal error: Uncaught Error: Call to undefined function mysql_affected_rows() in /.../admin/includes/functions/back_in_stock_notifications_functions.php:271
Stack trace:
#0 /.../admin/back_in_stock_notifications.php(244): expungeOutdatedSubscriptionsFromBackInStockNotificationsDB()
#1 {main}
thrown in /.../admin/includes/functions/back_in_stock_notifications_functions.php on line 271
[20-Jul-2019 11:12:15] Request URI: /admin/back_in_stock_notifications.php?action=send&option=5, IP address: 175.136.46.196
--> PHP Fatal error: Uncaught Error: Call to undefined function mysql_affected_rows() in /.../admin/includes/functions/back_in_stock_notifications_functions.php:271
Stack trace:
#0 /.../admin/back_in_stock_notifications.php(244): expungeOutdatedSubscriptionsFromBackInStockNotificationsDB()
#1 {main}
thrown in /.../admin/includes/functions/back_in_stock_notifications_functions.php on line 271.
Having above issue select "Remove subscriptions for deleted products from database" after upgraded to version 10.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
mysql_affected_rows was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used. [Refer: https://www.php.net/manual/en/functi...cted-rows.php]
On your web server, if you have PHP Extensions mysqli ticked simply change
mysql_affected_rows($db->link)), 'back_in_stock_notifications'); to
mysqli_affected_rows($db->link)), 'back_in_stock_notifications');
at approx line 273 in \admin\includes\functions\back_in_stock_notifications_functions.php
---------------------------
environment Dev: Zen Cart 156c; Apache 2.4.33; PHP 7.3.1; MySQL 5.7.21; Windows 10
environment Test: Zen Cart 156a; Apache 2.4.29; PHP 7.2.4; MySQL 5.7.24; Linux 4.15.0
packages / add-ons:
ckeditor ; clone template 1.2.0; payment module fee; Direct bank Deposit V1.5.revised; zencart155 securepayxml (modified); ozpost v4.2.7; ceon_back_in_stock_notifications.9 (modified); export_shipping_information_V1.3.5; edit_orders-4.3.5; master password 4; admin log in as customer; ZCA bootstrap template-for-156-v2.0.0c; image checker 2.0; sales report 3.2.2; email archive manager 1-8e; zenNoncaptcha v0.5
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Good evening everyone
i speak italian sorry my english i am using google traslator,
I have a problem with the installation of this module just downloaded I arrive from an Italian version of zen cart 1.3.9H and I have updated everything to the latest Italian version 1.5.5 and I have always used this module in the old version it was all ok,
in this new version if I go to catalog -> Ceon Back in stock notification to install it it gives me a blank page with this writing WARNING: An Error occurred, please refresh the page and try again.
I downloaded the log file that I paste below:
[28-May-2020 01:02:00 Europe/Rome] Request URI: /ADMIN/back_in_stock_notifications.php, IP address: 151.20.250.123
#1 trigger_error() called at [/web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/web/htdocs/www.miosito.com/home/ADMIN/includes/classes/class.CeonBISNInstallOrUpgrade.php:124]
#5 CeonBISNInstallOrUpgrade->_checkCreateDatabase() called at [/web/htdocs/www.miosito.com/home/ADMIN/includes/classes/class.CeonBISNInstallOrUpgrade.php:82]
#6 CeonBISNInstallOrUpgrade->CeonBISNInstallOrUpgrade() called at [/web/htdocs/www.miosito.com/home/ADMIN/back_in_stock_notifications.php:38]
[28-May-2020 01:02:00 Europe/Rome] PHP Fatal error: 1067:Invalid default value for 'date_subscribed' ::
CREATE TABLE IF NOT EXISTS
`back_in_stock_notification_subscriptions`
(
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`product_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`customer_id` int(10) UNSIGNED DEFAULT NULL,
`subscription_code` VARCHAR(10) DEFAULT NULL,
`name` varchar(64) NOT NULL DEFAULT '',
`email_address` VARCHAR(96) DEFAULT NULL,
`date_subscribed` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
); ==> (as called by) /web/htdocs/www.miosito.com/home/ADMIN/includes/classes/class.CeonBISNInstallOrUpgrade.php on line 124 <== in /web/htdocs/www.miosito.com/home/includes/classes/db/mysql/query_factory.php on line 167
I hope I have provided all the information to be able to receive help, thank you all for your time
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Hello there,
I have been using this fantastic for a long time. I just noticed since last week I get spam signups, but there's no actual item linked, where usually it mentions the item name. I realise Captcha isn't recommended for this moduel, is there perhaps a page where it might be a blank item page or similar? Thanks in advance :-)
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
HeathenMagic
Hello there,
I have been using this fantastic for a long time. I just noticed since last week I get spam signups, but there's no actual item linked, where usually it mentions the item name. I realise Captcha isn't recommended for this moduel, is there perhaps a page where it might be a blank item page or similar? Thanks in advance :-)
Have you solved this problem? We are getting the same problem that spammers are getting onto this module to send spam emails. Care to share your thought?
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
ericwu001
Have you solved this problem? We are getting the same problem that spammers are getting onto this module to send spam emails. Care to share your thought?
No wasn't able to solve this. Unless there is a way to add captcha somehow.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
I'm not sure if this module is being updated anymore, but I wanted to report something I'm seeing in the log files.
Apparently, with the PHP 7.x, the current module is throwing this error:
Code:
--> PHP Deprecated: Non-static method CeonEmailValidation::isValid() should not be called statically in /home/userdir/public_html/store/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 78.
Not sure how to get around it. Online, it talks about having to call the class function like this: $CeonEmailValidation->get(isValid()); However, I don't know if that is correct, or if I should just go around changing the code all willy-nilly!
Any workaround for adapting the module to be compatible with this deprecated code structure?
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Just add public static to the functions in the class.CeonEmailValidation
public static function isValid($email)
public static function isHeaderInjection($header)
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
One of my clients has started getting spam signups on this too. I'm considering a few options - maybe limiting it to logged in customers only. I'll post back with notes on what I did.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
limiting it to logged in customers only
I don't think that would be the best option for this particular feature...in my experience it is mainly used by potential customers.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
swguy
One of my clients has started getting spam signups on this too. I'm considering a few options - maybe limiting it to logged in customers only. I'll post back with notes on what I did.
Hello there, I am still struggling to figure this out too, it looks like I have a phantom product as I have a blank product with 657 subscribers when I look at all subscriptions. Or maybe the spam is finding another way in.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
What is causing the constant to not be defined?
Code:
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_HEADER - assumed 'EMAIL_TEXT_HEADER' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 251.
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_FROM - assumed 'EMAIL_TEXT_FROM' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 252.
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_HEADER - assumed 'EMAIL_TEXT_HEADER' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 278.
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_FROM - assumed 'EMAIL_TEXT_FROM' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 279.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
I am not sure if this is causing the spam issue, it seems to be a php 7.2 warning:-
Quote:
PHP Deprecated: Non-static method CeonEmailValidation::isHeaderInjection() should not be called statically in /chroot/***/html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 91.
also the same error for line 78 81 and 88.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
DigitalShadow
What is causing the constant to not be defined?
Code:
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_HEADER - assumed 'EMAIL_TEXT_HEADER' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 251.
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_FROM - assumed 'EMAIL_TEXT_FROM' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 252.
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_HEADER - assumed 'EMAIL_TEXT_HEADER' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 278.
[29-Sep-2020 06:03:22 Europe/London] Request URI: /back-in-stock-notification?products_id=34294&cPath=29150_7373_7741_7986_21569&, IP address: removed
#1 sendBackInStockNotificationSubscriptionEmail() called at [/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php:211]
#2 require(/home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php) called at [/home/store/public_html/index.php:36]
--> PHP Warning: Use of undefined constant EMAIL_TEXT_FROM - assumed 'EMAIL_TEXT_FROM' (this will throw an Error in a future version of PHP) in /home/store/public_html/includes/modules/pages/back_in_stock_notification_subscribe/header_php.php on line 279.
If you define the constants in /includes/languages/english/extra_definitions/back_in_stock_notifications.php
HTML Code:
define('EMAIL_TEXT_HEADER',' ');
define('EMAIL_TEXT_FROM',' ');
that warning will go away.
dev: php 7.4.9
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
The spam issue on my production server started this week and is coming from a range of IP addresses which are probably that are even faking their host id.
As a quick band-aid fix I have disabled sending emails to any subscriber who is not a registered customer. The BIS notifications are still logged and I can delete the trash subscriptions via PHPMyAdmin.
====
prod env: zc 156a; Apache 2.4.29; PHP 7.2.24; MySQL 5.7.32
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
A minor mistake in BIS is the time format for a subscription is incorrect.
Most admins would not notice this as the date displayed on the "List all subscription" page is in long format eg (DAY dd Month YYYY ) and minutes and seconds are not displayed. I am displaying my dates in universal date_time format eg (YYYY-MM-DD hh:mm:ss)
In ceon_back_in_stock_notifications
in \files\includes\modules\pages\back_in_stock_notification_subscribe
Line 175: change 'date_subscribed' => date('Y-m-d H:m:i', time()) TO 'date_subscribed' => date('Y-m-d H:i:s', time())
Line 202: change 'date_subscribed' => date('Y-m-d H:m:i', time()) TO 'date_subscribed' => date('Y-m-d H:i:s', time())
Just change the red bit to record minutes and seconds correctly
prod env: 156a
dev env: 157a
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Quote:
Originally Posted by
swguy
One of my clients has started getting spam signups on this too. I'm considering a few options - maybe limiting it to logged in customers only. I'll post back with notes on what I did.
in observers/class.back_in_stock_notificationsProductInfo.php you could add a product ID verification to stop false product creation.
For info, this is based on ZC1.5.7 and not been fully tested... added the red section
Code:
$already_to_be_notified_query = "
SELECT
id
FROM
" . TABLE_BACK_IN_STOCK_NOTIFICATION_SUBSCRIPTIONS . "
WHERE
product_id = '" . (int) $_GET['products_id'] . "'
AND
(
customer_id = '" . (int) $_SESSION['customer_id'] . "'
OR
email_address = '" .
$customer_details->fields['customers_email_address'] . "'
);";
$already_to_be_notified = $db->Execute($already_to_be_notified_query);
$productID = $_GET['products_id'];
if ($productID == '') {
//no product ID used die
$back_in_stock_notification_build_form = false;
$product_back_in_stock_notification_form_link =
BACK_IN_STOCK_NOTIFICATION_TEXT_ALREADY_SUBSCRIBED;
} else if ($already_to_be_notified->RecordCount() > 0) {
// Customer is already subscribed to the notification list for this product
In ZC157a I could not create a record by adding a non-existing product ID, it just kicks out a can't find product message. However, I could create one with no product ID..
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Hi
How can I show Products_model also in the subscription emails?
Thank you
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
I'm going to add a switch to the configuration so that you can set this mod to work for logged in users only.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Submitted a bunch of fixes for 157 and PHP 7.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Updates:
- PHP 7 style constructors
- Fixed pagination on List all products with subscriptions page
- Added product ID to List all products with subscriptions, List all subscriptions pages
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Over the years I have made a lot of modifications to this (multilanguage and attribute-handling to name the only things I can remember offhand), that I never got round to adding into the plugin. I hope to do it at some point, so there is now a GitHub repository for this:
https://github.com/torvista/Zen_Cart..._Notifications
The url should be added to the entry for this in the Plugins.
At the moment there are no changes from the Plugin v12 version.
Please report any new issues in GitHub.
-
Re: Ceon Back In Stock Notifications 3.0.0 - mysql_affected_rows
Thanks for doing this. The Github link in Plugins has been set to your repo.
-
Ceon Back In Stock Notifications 3.0.0 - product_info_display duplicate message
Using zc157c
On the product_info_display page I am seeing two messages for the notification reminder. These messages are defined as
BACK_IN_STOCK_NOTIFICATION_TEXT_PRODUCT_LISTING_FORM_LINK (Line 26) and
BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_LINK (Line 36) in the file
includes\languages\english\extra_definitions\back_in_stock_notifications.php
Code:
Line 26 To be notified when this product is back in stock please click here.
Line 36 To be notified when this product is back in stock please click here.
With the Back In Stock Notifications settings: Enable/Disable Back In Stock Notification = 1 + Back in Stock requires login= 1
the outcome is correct and only the value of BACK_IN_STOCK_NOTIFICATION_TEXT_FORM_LINK from line 34 is displayed.
With the Back In Stock Notifications settings: Enable/Disable Back In Stock Notification = 1 + Back in Stock requires login= 0 the outcome is as listed above.
I have been through the files multiple times and cannot work out were the second value, possibly a concatenation, i s coming from.
Environment: zc157c, vanilla
-
Re: Ceon Back In Stock Notifications 3.0.0 - product_info_display duplicate message
My solution is to change the Back In Stock code block number 1 which is required in tpl_product_info_display.php after
Code:
echo $display_qty;
echo $display_button;
from
Code:
// BEGIN CEON BACK IN STOCK NOTIFICATIONS 1 of 2
if (!is_null($product_back_in_stock_notification_form_link)) {
echo '<p>' . $product_back_in_stock_notification_form_link . '</p>';
}
// END CEON BACK IN STOCK NOTIFICATIONS 1 of 2
to
Code:
// BEGIN CEON BACK IN STOCK NOTIFICATIONS 1 of 2
if ((BACK_IN_STOCK_REQUIRES_LOGIN == '1') AND (!is_null($product_back_in_stock_notification_form_link)) ) {
echo '<p>'. $product_back_in_stock_notification_form_link . '</p>';
}
// END CEON BACK IN STOCK NOTIFICATIONS 1 of 2
This plug-in generates a lot of returning purchases.
-
Re: Ceon Back In Stock Notifications 3.0.0 - product_info_display duplicate message
The double output is indeed a bug
https://github.com/torvista/Zen_Cart...tions/issues/5
to be fixed shortly.
-
Re: Ceon Back In Stock Notifications 3.0.0 - product_info_display duplicate message
On GitHub I've made some changes, including a bug fix for the above.
These should, as always, be tested on a development site by those who are interested...
Some files are removed in the current download, as are no longer necessary for Zen Cart 1.5.7.
Users of other versions should not try this out before upgrading as no support will be given for obsolete versions of Zen Cart.
-
Re: Ceon Back In Stock Notifications 3.0.0 - product_info_display duplicate message
Any update or progress on adding a CAPTCHA or something to prevent anonymous users from abusing the form?
What is happening is that anonymous people are entering a real email address in the TO field, but they're formatting in a way to send their spam links as part of the name.
See this screenshot example:
https://i.postimg.cc/c15tMdZj/screenshot-132.png
So what is happening is that the module is still sending these notification emails from our authorized domain and IP.......but it has the abusive spam link in the person's name being sent to another email address.
We were getting BOMBARDED with a ton of this happening and temporarily had to remove the module. But we love it and want it back, so is there anyway to either 1) prevent the form from sending without a CAPTCHA or B) prevent it from sending spam links in the name field?
NOTE: We do have a simple captcha script that we use, but I didn't know how to add it to the existing module since the form appears to be created in the CeonXHTMLHiTemplate and I didn't want to mess with that and break it!
-
Re: Ceon Back In Stock Notifications 3.0.0 - product_info_display duplicate message
To add to my post above, maybe a solution could be to insure that there are no links (www. or http strings) in the Name field before submitting. That is how these scammers seem to be getting around it.
Of course, that wouldn't prevent someone from still using the form to just spam Out Of Stock emails to people, but it would prevent them from distributing malicious links in the Name field which show up in the body of the recipients message.
-
Ceon Back In Stock Notifications
Quote:
maybe a solution could be to insure that there are no links (www. or http strings) in the Name field before submitting
I think that would be the first step.
Post the issue on the Github
https://github.com/torvista/Zen_Cart...cations/issues
and if you could add a screenshot image of a list of example bad urls to filter, that would help.
-
Re: Ceon Back In Stock Notifications
Quote:
Originally Posted by
torvista
Done! Although I should note, and I'm ashamed to say......I was using an older version of the module. I just updated it to the latest and I noticed that it's now mandatory to be signed into a real account in order to sign up for the In Stock Notification......and it also appears that this new module does away with the ability to enter both a Name and Email on the form.
So you might be able to ignore the GITHUB issue that I posted since this might just accomplish everything that the updated mod is doing.
-
Re: Ceon Back In Stock Notifications
Quote:
it's now mandatory to be signed into a real account in order to sign up for the In Stock Notification
Not my version!
But, the history of this is me customising it to death long ago for multi-language, attributes (almost) and better admin, before only recently opening a Github with the intention of incorporating these changes and updating it for php8.1 and ZC158. Which has not happened.
So, it appears I am not familiar with the functionality of what is in Github.
But, I would be suprised if it demanded an account for a subscription, that is a customer killer.
-
Re: Ceon Back In Stock Notifications
Quote:
Originally Posted by
torvista
Not my version!
Your version doesn't require the signing in with a real account? The version I installed was "Ceon Back In Stock Notifications" from the Plugin page. It's the version that now has the "modules/ceon_bis_form.php" file. The older version I had didn't have this.
All I did was install this latest version listed under the Plugin page and by default, it requires you to now be signed into an account before you can sign up for an In Stock Notification.
Quote:
Originally Posted by
torvista
But, I would be suprised if it demanded an account for a subscription, that is a customer killer.
I agree that this is inconvenient to new (non-registered) users......but it also seems to address the issue of anonymous users who use the ungated form to send the In Stock Emails to whatever email they want, and whatever name they want to use.
-
Problem with Ceon Back In Stock Notifications
Hi All
I have recently upgraded my website to ZC v157. I have been using Ajax BIS with the old version but it seems it has not been upgraded for v157 and therefore I switched to CEON BIS. (Which I also think is better as it deletes notifications from the db after being sent)
I did all the necessary file merging and everything installed well. However, I have encountered a strange problem: When I run the notification for a product that is back in stock, it not only deletes that specific notification, but all the data (ie for other products and customers) in the back_in_stock_notification_subscriptions table! (Luckily I made backups before testing).
Has anyone encountered this? (Searching on the forum did not provide any results?). Or does anyone know where I can start looking for the problem (I am only an amateur-grade pHp coder).
Any help will be appreciated!
-
Re: Problem with Ceon Back In Stock Notifications
That is not a problem I have ever seen.
I have a heavily-modified version in use on my site, and a lightly-debugged Plugin version on my Github which you should try.
-
Re: Problem with Ceon Back In Stock Notifications
Quote:
Originally Posted by
torvista
That is not a problem I have ever seen.
I have a heavily-modified version in use on my site, and a lightly-debugged Plugin version on my Github which you should try.
Thanks for the reply, I will have a look at the Github version...
-
Re: Problem with Ceon Back In Stock Notifications
Update on the above:
I noticed that all the 'id' values in the back_in_stock_notification_subscription database table were set to 0. Ticking the Auto Increment box for the 'id' field in database table solved the problem.
Still have no idea how the problem happened in the first place....
-
Ceon Back In Stock Notifications
If you are getting spam through the BISN form on the product page, either you can force customers to login first or try a Captcha.
I have recently updated
BISN
https://github.com/torvista/Zen_Cart..._Notifications
and Google ReCaptcha
https://github.com/torvista/Zen_Cart-Google_reCAPTCHA
to work together.
-
Re: Ceon Back In Stock Notifications
What is the purpose of all the '200 for compare.php' files located in the 'files\includes\templates\responsive_classic CLONE\templates' directory?
-
Re: Ceon Back In Stock Notifications
This "plugin" is like most "plugins": it is not plug-in...it needs modifications to core files.
Those core files change as development moves on...so the modified plugin file becomes a mixture of old code and plugin code.
The "200 for compare" file is a snapshot of the core file used at the time (Zen Cart 200) as the base before adding the plugin code....so in the future you can compare to the current core file and see what was added just for the plugin and what should be updated due to development.