Forums / Addon Admin Tools / Ceon Back In Stock Notifications 3.0.0

Ceon Back In Stock Notifications 3.0.0

Views: 59,614

Results 161 to 180 of 205
4 Nov 2019, 12:55 AM
#161
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
428
Plugin Contributions:
0

Ceon Back In Stock Notifications 3.0.0

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/function.mysql-affected-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

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

27 May 2020, 11:16 PM
#162
snakes7575 avatar

snakes7575

New Zenner

Join Date:
Apr 2020
Location:
italia
Posts:
19
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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

6 Aug 2020, 7:36 AM
#163
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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

12 Aug 2020, 8:51 PM
#164
ericwu001 avatar

ericwu001

New Zenner

Join Date:
Apr 2004
Posts:
33
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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?

13 Aug 2020, 9:27 AM
#165
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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.

13 Aug 2020, 7:17 PM
#166
ericwu001 avatar

ericwu001

New Zenner

Join Date:
Apr 2004
Posts:
33
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

Thanks.

26 Aug 2020, 11:52 PM
#167
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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:

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

  • Jeff
27 Aug 2020, 8:27 AM
#168
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Ceon Back In Stock Notifications 3.0.0

Just add public static to the functions in the class.CeonEmailValidation

public static function isValid($email)

public static function isHeaderInjection($header)

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

7 Sep 2020, 2:11 PM
#169
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Ceon Back In Stock Notifications 3.0.0

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.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

7 Sep 2020, 3:33 PM
#170
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,875
Plugin Contributions:
7

Re: Ceon Back In Stock Notifications 3.0.0

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.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

7 Sep 2020, 3:53 PM
#171
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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.

29 Sep 2020, 10:15 AM
#172
digitalshadow avatar

digitalshadow

Totally Zenned

Join Date:
Mar 2009
Posts:
616
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

What is causing the constant to not be defined?

[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.
9 Oct 2020, 8:28 PM
#173
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

I am not sure if this is causing the spam issue, it seems to be a php 7.2 warning:-

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.

18 Nov 2020, 4:01 AM
#174
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
428
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

DigitalShadow:

What is causing the constant to not be defined?

[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
define('EMAIL_TEXT_HEADER',' ');
define('EMAIL_TEXT_FROM',' ');

that warning will go away.
dev: php 7.4.9

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

18 Nov 2020, 6:38 AM
#175
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
428
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

21 Nov 2020, 3:13 AM
#176
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
428
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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

OldNGrey
ZC222 PHP 8.4.16
MySQL 11.8.5-MariaDB

21 Nov 2020, 9:56 PM
#177
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Ceon Back In Stock Notifications 3.0.0

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

$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..

Dave
Always forward thinking... Lost my mind!

30 Apr 2021, 1:31 AM
#178
nishajh avatar

nishajh

Zen Follower

Join Date:
May 2009
Posts:
105
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

Hi
How can I show Products_model also in the subscription emails?

Thank you

19 Jun 2021, 11:46 PM
#179
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Ceon Back In Stock Notifications 3.0.0

I'm going to add a switch to the configuration so that you can set this mod to work for logged in users only.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

5 Oct 2021, 5:13 PM
#180
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: Ceon Back In Stock Notifications 3.0.0

Submitted a bunch of fixes for 157 and PHP 7.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.