Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Product Notifications Sidebox: Display IF Global checked + item is Out of Stock only

    I am trying to figure out a way to email my customers when a product is back in stock.

    I like the product notification sidebox, and would change the wording from "Notifications - Notify me of updates" to "Out of Stock? please click here to Add to Backorder List and receive email notification when back in stock" via the english file. Great! But, if this box appears with every product it will be confusing/unnecessary to see unless a product is out of stock.

    Is there some way or code to have the Product Notifications Sidebox Appear only if the product is out of stock?

    perhaps an If statement?

    more importantly.......as my back orders range from a week to months....is there a way then to keep the Product Notifications Sidebox appearing even if the customer checks "Global Product Notifications" of all products?

  2. #2
    Join Date
    Nov 2006
    Posts
    512
    Plugin Contributions
    0

    Default Re: Product Notifications Sidebox: Display IF Global checked + item is Out of Stock o

    I managed to get this far on my own, but am stuck because I don't know how to code ZC php....can anyone help me:

    from modules/sideboxes/YOUR_TEMPLATE/product_notifications.php:

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


    1. Have the notifications side box appear even if global notification is checked.

    I would like to take out this line,
    PHP Code:
         and global_product_notifications '1'"; 
    but do not know how to end (;) this statement:
    PHP Code:
         where customers_info_id '" . (int)$_SESSION['customer_id'] . "' 
    2. Have sidebox appear only IF out of stock

    need to add something like this to the false statement above:
    PHP Code:
    if ($_SESSION['cart']->count_contents() <= 0) { 
    but do not know how to describe "out of stock" as it is in ZC, Is even possible?

    Am on the right track? Is there a better way?



    BTW Good Reference: http://www.zen-cart.com/forum/showpo...61&postcount=3
    Last edited by dharma; 17 Feb 2007 at 07:08 PM.

  3. #3
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: Product Notifications Sidebox: Display IF Global checked + item is Out of Stock o


 

 

Similar Threads

  1. v139h Back In Stock Notifications only notify customers ONE time?
    By SRQHoyas in forum General Questions
    Replies: 0
    Last Post: 9 Jun 2012, 01:58 PM
  2. Editing Shopping Cart Sidebox to display only last item added
    By shakes222 in forum General Questions
    Replies: 1
    Last Post: 26 Oct 2010, 05:23 PM
  3. Replies: 1
    Last Post: 31 Oct 2008, 07:19 PM
  4. Not display input If a product is out of stock
    By wiggst3r in forum Basic Configuration
    Replies: 0
    Last Post: 4 Aug 2008, 10:16 AM
  5. Item disappear after out of stock in certain catagory only
    By kevnj in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 7 Jun 2007, 04:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg