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

Ceon Back In Stock Notifications 3.0.0

Views: 59,614

Results 141 to 160 of 205
18 Dec 2013, 6:02 AM
#141
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

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

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

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

28 Jan 2014, 2:34 PM
#142
speedmaxtor avatar

speedmaxtor

New Zenner

Join Date:
Jan 2014
Location:
nc
Posts:
5
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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?

28 Jan 2014, 3:04 PM
#143
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon Back In Stock Notifications 3.0.0

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

28 Jan 2014, 5:03 PM
#144
speedmaxtor avatar

speedmaxtor

New Zenner

Join Date:
Jan 2014
Location:
nc
Posts:
5
Plugin Contributions:
0

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.

28 Jan 2014, 7:21 PM
#145
speedmaxtor avatar

speedmaxtor

New Zenner

Join Date:
Jan 2014
Location:
nc
Posts:
5
Plugin Contributions:
0

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">';

30 Jan 2014, 12:26 PM
#146
speedmaxtor avatar

speedmaxtor

New Zenner

Join Date:
Jan 2014
Location:
nc
Posts:
5
Plugin Contributions:
0

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'] . "';";

30 Jan 2014, 1:44 PM
#147
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Ceon Back In Stock Notifications 3.0.0

what are 'fixing' that query with?

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

31 Jan 2014, 2:26 PM
#148
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon Back In Stock Notifications 3.0.0

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

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

31 Jan 2014, 2:39 PM
#149
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,111
Plugin Contributions:
56

Re: Ceon Back In Stock Notifications 3.0.0

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.

2 Feb 2014, 9:24 PM
#150
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

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:

  $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

  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:

if (isset($back_in_stock_notification_build_form) && $back_in_stock_notification_build_form) {

and find out why.

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

28 Dec 2014, 7:34 PM
#151
pricediscrimination avatar

pricediscrimination

Zen Follower

Join Date:
May 2008
Posts:
401
Plugin Contributions:
0

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?

11 May 2016, 2:01 PM
#152
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

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/57111073/ceon_back_in_stock_notifications_3.2.2alpha.zip

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

12 May 2016, 6:19 AM
#153
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Ceon Back In Stock Notifications 3.0.0

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/57111073/ceon_back_in_stock_notifications_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)

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

10 Jul 2016, 6:25 AM
#154
utefan avatar

utefan

New Zenner

Join Date:
Feb 2016
Posts:
28
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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.

3 Aug 2016, 2:27 PM
#156
ilmarchez avatar

ilmarchez

Zen Follower

Join Date:
Aug 2009
Posts:
128
Plugin Contributions:
0

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

9 Dec 2016, 11:47 PM
#157
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 suddenly get this, perhaps after 1.5.5b update, when doing test run or live run:-

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*

// 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';
}
}
}

11 Jan 2017, 4:04 AM
#158
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

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?

19 Jan 2017, 4:00 PM
#159
neil_kerr_ceon avatar

neil_kerr_ceon

New Zenner

Join Date:
Mar 2015
Location:
Belfast
Posts:
7
Plugin Contributions:
1

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.php?221738-CEON-Relaunch-Conor-s-family-seeking-assistance

Many thanks,
Neil

20 Jul 2019, 3:20 AM
#160
hamagawa avatar

hamagawa

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: Ceon Back In Stock Notifications 3.0.0

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