Hi Folks,
Thanks for the tips on coding the sidebox, and i've been trying for a fair bit, but the coding still seems to not work. I think it has to do with what i am trying to do:
I'll try to explain a little better:
I am trying to modify the existing 'Product Notification sidebox', to only show, so that when the item is out of stock, that sidebox appears, and i can let clients know when the item will come back in stock... I've searched all over and couldn't find the answer. So hoping to make the sidebox work the way i want it to, i tried modifying the existing code of:
PHP Code:
// test if box should show
$show_product_notifications = false;
if (isset($_GET['products_id']) and zen_products_id_valid($_GET['products_id'])) {
if (isset($_SESSION['customer_id'])) {
$check_query = "select count(*) as count
from " . TABLE_CUSTOMERS_INFO . "
where customers_info_id = '" . (int)$_SESSION['customer_id'] . "'
and global_product_notifications = '1'";
$check = $db->Execute($check_query);
if ($check->fields['count'] <= 0) {
$show_product_notifications= true;
}
} else {
$show_product_notifications= true;
}
}
to this:
PHP Code:
$show_product_notifications = false;
if ($_GET['main_page'] == 'product_info' && isset($products_quantity) && $products_quantity <= 0) { $show_product_notifications = true; }
else {
$show_product_notifications= false;
}
It doesn't seem to work.... Sorry to sound stupid , but its my first time trying to do any coding work....
Looking at it, i should have left the globals back in there, shouldn't i?
Any help would be greatly appreciated!!!
Thanks
Bookmarks