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.