Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Hi, I upgraded to the latest and found the following issue. It seems a whole number of langauge file updates are missing?
Will have to re-install older 4.1.1 version again.
What did you change to get the product name displayed in the mail when the item is BACK in stock? These mails do not show the product name.
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
Louis
Hi, I upgraded to the latest and found the following issue. It seems a whole number of langauge file updates are missing?
Will have to re-install older 4.1.1 version again.
What did you change to get the product name displayed in the mail when the item is BACK in stock? These mails do not show the product name.
Hi, there is still a bug so that when something is back in stock the mail would not display the item name, if You want to have the picture yet be sure to use HTML mail not simple text.
As regards the error You are reporting, there are some miss in the language define file, simply go to the language file and add the various define like:
PHP Code:
define ('BACK_IN_STOCK_MAIL_GREETING', ' Welcome ');
This should fix it.
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
izar74
Ok seem i found out the error in /includes/templates/YOUR_TEMPLATE/tlp_modules_back_in_stock_fancybox.php Line 22 is:
PHP Code:
echo '<script type="text/javascript">if (typeof jQuery == \'undefined\') {document.write(\'<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>\');}
</script>'."\n";
it seems there ere some characters more than needed -->"');}"
I modified the line as follow:
PHP Code:
echo '<script type="text/javascript">if (typeof jQuery == \'undefined\') {document.write(\'<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>\</script>'."\n";
Now the problem seems gone, just check it to be sure i didn't make any mistake.
The solution posted leaves behind a stray slash on the page. Should be:
Code:
echo '<script type="text/javascript">if (typeof jQuery == \'undefined\') {document.write(\'<script type="text/javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script></script>'."\n";
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
I do have to say that I second a sentiment expressed by a couple posters that the readme file instructions aren't super clear.. I've figured most of this out, but there is one thing left.. This code didn't work for me..
Quote:
Originally Posted by
bislewl
PHP Code:
<?php
if(zen_get_products_stock($products_id) > 0){
?>
<!--bof Add to Cart Box-->
***the stuff between these***
<!--eof Add to Cart Box-->
<?php
}
else{
if(BACK_IN_STOCK_ENABLE == "true"){ ?>
<a href="#back-in-stock-popup-wrapper" id="back-in-stock-popup-link"><?php echo BACK_IN_STOCK_LINK; ?></a>
<?php }
}
I made the following changes, and now it works as expected. Now the only thing I can't figure out is why this is showing as a text link versus a button..
This did work:
PHP Code:
<?php if(zen_get_products_stock($products_id) > 0){ ?>
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
<?php } else{ ?>
<?php if(BACK_IN_STOCK_ENABLE == "true"){ ?>
<a href="#back-in-stock-popup-wrapper" id="back-in-stock-popup-link"><?php echo BACK_IN_STOCK_LINK; ?></a>
<?php } ?>
<?php } ?>
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Hello, just installed the plugin and it is great but when i try to run notification
the following error apears:
The server can not find the requested page:
site.com/cron/send_back_in_stock_notifications.php?product_id=0&key=8675309&bis_id=0 (port 443)
Please forward this error screen to site's WebMaster.
Any idea what can cause this?
And also what does that mean "File to add to your cron in cpanel:"
Best regrds.
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
perfumbg
Hello, just installed the plugin and it is great but when i try to run notification
the following error apears:
The server can not find the requested page:
site.com/cron/send_back_in_stock_notifications.php?product_id=0&key=8675309&bis_id=0 (port 443)
Please forward this error screen to site's WebMaster.
Any idea what can cause this?
And also what does that mean "File to add to your cron in cpanel:"
Best regrds.
I'm getting a similar result except in my case I'm being re-directed to the "Page Not Found" page..
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
DivaVocals
I'm getting a similar result except in my case I'm being re-directed to the "Page Not Found" page..
Yes I am redirected to the not found page too.
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
DivaVocals
I'm getting a similar result except in my case I'm being re-directed to the "Page Not Found" page..
Does this file exist? site.com/cron/send_back_in_stock_notifications.php
Is there a rewrite rule preventing it?
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
DivaVocals
I do have to say that I second a sentiment expressed by a couple posters that the readme file instructions aren't super clear.. I've figured most of this out, but there is one thing left.. This code didn't work for me..
I made the following changes, and now it works as expected. Now the only thing I can't figure out is why this is showing as a text link versus a button..
This did work:
PHP Code:
<?php if(zen_get_products_stock($products_id) > 0){ ?>
<!--bof Add to Cart Box -->
<?php
if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
// do nothing
} else {
?>
<?php
$display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
// hide the quantity box and default to 1
$the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
} else {
// show the quantity box
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
$display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
?>
<?php if ($display_qty != '' or $display_button != '') { ?>
<div id="cartAdd">
<?php
echo $display_qty;
echo $display_button;
?>
</div>
<?php } // display qty and button ?>
<?php } // CUSTOMERS_APPROVAL == 3 ?>
<!--eof Add to Cart Box-->
<?php } else{ ?>
<?php if(BACK_IN_STOCK_ENABLE == "true"){ ?>
<a href="#back-in-stock-popup-wrapper" id="back-in-stock-popup-link"><?php echo BACK_IN_STOCK_LINK; ?></a>
<?php } ?>
<?php } ?>
The documentation for this was improved in 4.3.0
Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)
Quote:
Originally Posted by
bislewl
Does this file exist? site.com/cron/send_back_in_stock_notifications.php
Is there a rewrite rule preventing it?
File exists.. No re-write rule blocking it.. It didn't work even before I install Ultimate URLs
Quote:
Originally Posted by
bislewl
The documentation for this was improved in 4.3.0
Excellent.. I have more to share about using this module with a stock manager module like POSM or SBA.. (Hint: requires a slightly different set of conditions for the if statements)