Results 1 to 10 of 147

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    I'm trying to make a modification so that the POPUP will only work in the product page and not in the various product listing (also becouse the add-on only work in the product page) but till now i've no luck... any help would be appreciated

  2. #2
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    Quote Originally Posted by izar74 View Post
    I'm trying to make a modification so that the POPUP will only work in the product page and not in the various product listing (also becouse the add-on only work in the product page) but till now i've no luck... any help would be appreciated
    Remove the code that adds the fancy box in the TPL_footer or whoever you put it and add it to the TPL_product_info_default.

  3. #3
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    Quote Originally Posted by bislewl View Post
    Remove the code that adds the fancy box in the TPL_footer or whoever you put it and add it to the TPL_product_info_default.
    Thanks bislew, it was quite simple... (the file should be tpl_product_info_display.php, right?).

    Maybe this is not related to the Back in stock add on so if i'm out of the box please tell me... I've modified the function_general.php so that it show a button instead of the simple text, and i was trying to modify the "out of stock" button to be able to be pressed and work exactly like the "Details" button opening the product info page from where you can click on the "out of Stock" button and it will correctly open the Fancybox. I know that clicking on the image just do the same, but having a button is simplier for customer.

    Here the function_general.php modification i've made:

    PHP Code:
    // cannot be added to the cart
        
    case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
          return 
    $additional_link;
          break;
        case (
    $button_check->fields['product_is_call'] == '1'):
          
    $return_button '<a href="' zen_href_link(FILENAME_CONTACT_US'''SSL') . '">' TEXT_CALL_FOR_PRICE '</a>';
          break;
        case (
    $button_check->fields['products_quantity'] <= and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
          if (
    $_GET['main_page'] == zen_get_info_page($product_id)) {
            if(
    BACK_IN_STOCK_ENABLE == "true"){
                    
    $return_button '<div class="product_detail"><a class="back-in-stock-listing-popup-link" href="#back-in-stock-popup-wrapper">' zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALLBACK_IN_STOCK_LINK) . '</a></div>';
                    
    $return_button .= zen_draw_hidden_field('bis-product-id', (int) $product_id'class="bis-product-id"');
                    }
                    else{
                        
    $return_button zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALLBUTTON_SOLD_OUT_SMALL_ALT);
                    }

          } else {
            
    $return_button '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image_button(BUTTON_SOLD_OUT_ALTBUTTON_SOLD_OUT_SMALL_ALT) . '</a>';
          }
          break;
        default:
          
    $return_button $link;
          break;
        }
        if (
    $return_button != $link and $additional_link != false) {
          return 
    $additional_link '<br />' $return_button;
        } else {
          return 
    $return_button;
        }
      } 
    The part responsible for the link should be:

    PHP Code:
    $return_button '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' $listing->fields['products_id']) . '">' zen_image_button(BUTTON_SOLD_OUT_ALTBUTTON_SOLD_OUT_SMALL_ALT) . '</a>'
    but the link doesn't work, it miss the pruduct_id.

    in this image You can see the link (lower left corner) with the mouse pointer on the image:
    link2.jpg

    and this with the mouse pointer on the button:
    link1.jpg

  4. #4
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    The product listing box is slightly different as the fancy box is populated by jquery. Otherwise there would need to be a fancy box for each product.

  5. #5
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    Quote Originally Posted by bislewl View Post
    The product listing box is slightly different as the fancy box is populated by jquery. Otherwise there would need to be a fancy box for each product.
    Thanks for the info. I corrected the function so that now it work

    Here the PHP code of function_general.php, this way whae a product is out of stock it will show a CSS button that link to the product page.
    Finde the first line and replace with this code:

    PHP Code:
    // cannot be added to the cart
        
    case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
          return 
    $additional_link;
          break;
        case (
    $button_check->fields['product_is_call'] == '1'):
          
    $return_button '<a href="' zen_href_link(FILENAME_CONTACT_US'''SSL') . '">' TEXT_CALL_FOR_PRICE '</a>';
          break;
        case (
    $button_check->fields['products_quantity'] <= and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
          if (
    $_GET['main_page'] == zen_get_info_page($product_id)) {
            if(
    BACK_IN_STOCK_ENABLE == "true"){
                    
    $return_button '<div class="product_detail"><a class="back-in-stock-listing-popup-link" href="#back-in-stock-popup-wrapper">' zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALLBACK_IN_STOCK_LINK) . '</a></div>';
                    
    $return_button .= zen_draw_hidden_field('bis-product-id', (int) $product_id'class="bis-product-id"');
                    }
                    else{
                        
    $return_button zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALLBUTTON_SOLD_OUT_SMALL_ALT);
                    }

          } else {
            
    $return_button '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . (int) $product_id) . '">' zen_image_button(BUTTON_SOLD_OUT_ALTBUTTON_SOLD_OUT_SMALL_ALT) . '</a>';
          }
          break;
        default:
          
    $return_button $link;
          break;
        }
        if (
    $return_button != $link and $additional_link != false) {
          return 
    $additional_link '<br />' $return_button;
        } else {
          return 
    $return_button;
        }
      } 
    Hope it will help

  6. #6
    Join Date
    Jul 2007
    Posts
    2,169
    Plugin Contributions
    16

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    Quote Originally Posted by izar74 View Post
    Thanks for the info. I corrected the function so that now it work

    Here the PHP code of function_general.php, this way whae a product is out of stock it will show a CSS button that link to the product page.
    Finde the first line and replace with this code:

    PHP Code:
    // cannot be added to the cart
        
    case (zen_get_products_allow_add_to_cart($product_id) == 'N'):
          return 
    $additional_link;
          break;
        case (
    $button_check->fields['product_is_call'] == '1'):
          
    $return_button '<a href="' zen_href_link(FILENAME_CONTACT_US'''SSL') . '">' TEXT_CALL_FOR_PRICE '</a>';
          break;
        case (
    $button_check->fields['products_quantity'] <= and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1'):
          if (
    $_GET['main_page'] == zen_get_info_page($product_id)) {
            if(
    BACK_IN_STOCK_ENABLE == "true"){
                    
    $return_button '<div class="product_detail"><a class="back-in-stock-listing-popup-link" href="#back-in-stock-popup-wrapper">' zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALLBACK_IN_STOCK_LINK) . '</a></div>';
                    
    $return_button .= zen_draw_hidden_field('bis-product-id', (int) $product_id'class="bis-product-id"');
                    }
                    else{
                        
    $return_button zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALLBUTTON_SOLD_OUT_SMALL_ALT);
                    }

          } else {
            
    $return_button '<a href="' zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > and $_GET['filter_id']) > ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > $_GET['cPath'] : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . (int) $product_id) . '">' zen_image_button(BUTTON_SOLD_OUT_ALTBUTTON_SOLD_OUT_SMALL_ALT) . '</a>';
          }
          break;
        default:
          
    $return_button $link;
          break;
        }
        if (
    $return_button != $link and $additional_link != false) {
          return 
    $additional_link '<br />' $return_button;
        } else {
          return 
    $return_button;
        }
      } 
    Hope it will help
    izar74 this worked very well thank you. Thank you for a nice mod too bislewl....
    Is your site Upgraded to the current version 1.5.4 Yet?
    zencart-upgrades-website-installation

  7. #7
    Join Date
    Jan 2016
    Location
    Florida, USA
    Posts
    1
    Plugin Contributions
    0

    Default Re: Ajax Back In Stock (re-written version of Conor/Ceon's Back In Stock Module)

    I installed the latest version of this plugin to my site running 1.5.4. The newest version claims to fix the admin getting copied on all emails, even when Admin copy = false. I checked false in Configure menu and I am still getting emails. I verified that the DB says false using phpMyAdmin. My temporary solution is that I changed the admin email field created by the plugin to a new email that I created just for the notifications at this time. I did this using phpMyAdmin as well because the field is not included in the admin menu, even though the DB field is created during installation. Is this module still being supported? A fix to the bug and the ability to change the email address for this module would be great.

    Thanks.

 

 

Similar Threads

  1. Ceon Back In Stock Notifications 3.0.0
    By conor in forum Addon Admin Tools
    Replies: 204
    Last Post: 8 Apr 2025, 05:19 PM
  2. Replies: 4
    Last Post: 14 Feb 2013, 09:33 PM
  3. back in stock notification - buttons 'back' and 'update' not working
    By flix in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Mar 2010, 10:02 PM
  4. "Notify me when Out of Stock items is back in stock" Mod?
    By mes7000 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 21 Aug 2008, 06:04 PM
  5. Module: Back to Stock Items like this one how to?
    By explorer1979 in forum General Questions
    Replies: 0
    Last Post: 12 Aug 2008, 04:47 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