Page 15 of 15 FirstFirst ... 5131415
Results 141 to 147 of 147
  1. #141
    Join Date
    Sep 2013
    Location
    Devon, UK
    Posts
    56
    Plugin Contributions
    0

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

    P.S. Using PHP 7.1 on the new server, if that makes a difference. I can't see anything in the logs.

  2. #142
    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 pages use a single game box the image, name, and product are populated upon clicking the link. My guess is that the template being used isn't using the same classes as what it's set up for.

    Could you please copy and paste the HTML as <code> from a single product on the product listing page into a reply here?

  3. #143
    Join Date
    Sep 2013
    Location
    Devon, UK
    Posts
    56
    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
    Could you please copy and paste the HTML as <code> from a single product on the product listing page into a reply here?
    Thanks for the quick response, bislewl. This is the code I think you're asking for:

    HTML Code:
      <tr  class="productListing-even">
       <td class="productListing-data"><a href="http://saabitstest.saab9000.com/saabits">SAABits</a></td>
       <td class="productListing-data" align="center"><a href="http://saabitstest.saab9000.com/all/saab-9000-turbo-service-kit-1992-1993-a-c?cPath=256_260&amp;"><img src="images/svk312a.png" alt="Saab 9000 Turbo service kit 1992-1993 (A/C)" title=" Saab 9000 Turbo service kit 1992-1993 (A/C) " width="150" height="113" class="listingProductImage" /></a></td>
       <td class="productListing-data"><h3 class="itemTitle"><a href="http://saabitstest.saab9000.com/all/saab-9000-turbo-service-kit-1992-1993-a-c?cPath=256_260&amp;">Saab 9000 Turbo service kit 1992-1993 (A/C)</a></h3><div class="listingDescription"></div></td>
       <td class="productListing-data" align="right"><span class="productBasePrice">&pound;27.92</span><br /><br /><a href="http://saabitstest.saab9000.com/all/saab-9000-turbo-service-kit-1992-1993-a-c?cPath=256_260&amp;">... more info</a><br /><span class="cssButton normal_button button  button_sold_out" onmouseover="this.className='cssButtonHover normal_button button  button_sold_out button_sold_outHover'" onmouseout="this.className='cssButton normal_button button  button_sold_out'">&nbsp;Sold Out&nbsp;</span><div class="product_detail"><a class="back-in-stock-listing-popup-link" href="#back-in-stock-popup-wrapper">Email me when back in stock</a><input type="hidden" name="bis-product-id" value="611" class="bis-product-id" /></div><br /><br /></td>
       <td class="productListing-data">SVK312A</td>
      </tr>
    Note that I have modified the code slightly so it always shows the "Sold Out" button even when BIS is enabled. The problem shows up whether or not my modification is in place. I suspect you are correct - the template is based on the "Responsive All Business" template, which is quite old now.

  4. #144
    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 BillJ View Post
    Note that I have modified the code slightly so it always shows the "Sold Out" button even when BIS is enabled. The problem shows up whether or not my modification is in place. I suspect you are correct - the template is based on the "Responsive All Business" template, which is quite old now.
    You appear to be correct. Below is the JavaScript that is called when the link is clicked.

    Code:
      $('a.back-in-stock-listing-popup-link').click(function (event) {
            event.preventDefault();
            var productDiv = $(this).parent();
            $('#contact_messages').empty();
            $('#back-in-stock-product-image img').attr('src', $(productDiv).find('.listingProductImage').attr('src'));
            if ($(productDiv).find('h3.itemTitle')) {
                $('#productName').html($(productDiv).find('h3.itemTitle').text());
            } else {
                $('#productName').html($(productDiv).find('span.itemTitle').text());
            }
            $('input[name="product_id"]').attr('value', $(productDiv).find('input[name="bis-product-id"]').attr('value'));
            $.fancybox({
                href: '#back-in-stock-popup-wrapper',
                afterShow: function () {
                    $(document).on('submit', '#back-in-stock-popup-wrapper form[name="back_in_stock"]', function () {
                        $.post('ajax/back_in_stock_subscribe_pop_up.php', $('#back-in-stock-popup-wrapper form[name="back_in_stock"]').serialize(), function (data) {
                            $('#contact_messages').html(data);
                            if ($('.messageStackSuccess').length) {
                                $('.back-in-stock-popup-wrapper-button-row').hide();
                                $('.back-in-stock-popup-content-wrapper').hide();
                            }
                        });
                        return false;
                    });
                }
            });
        });
    So personally I would first try is in: catalog/includes/templates/YOUR_TEMPLATE/jscript/jquery/jquery_back_in_stock.js

    Change:
    Code:
    var productDiv = $(this).parent();
    To:
    Code:
    var productDiv = $(this).parent().parent().parent();

  5. #145
    Join Date
    Sep 2013
    Location
    Devon, UK
    Posts
    56
    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
    So personally I would first try is in: catalog/includes/templates/YOUR_TEMPLATE/jscript/jquery/jquery_back_in_stock.js

    Change:
    Code:
    var productDiv = $(this).parent();
    To:
    Code:
    var productDiv = $(this).parent().parent().parent();
    Thanks, bislewl! That sorted it out. And now I understand where it's getting the image and description from, I can remember to revisit that Javascript if I ever change the listing template.
    So to summarise, it wasn't a bug in the module but rather it was due to my template being non-standard.

  6. #146
    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 BillJ View Post
    Thanks, bislewl! That sorted it out. And now I understand where it's getting the image and description from, I can remember to revisit that Javascript if I ever change the listing template.
    So to summarise, it wasn't a bug in the module but rather it was due to my template being non-standard.
    No Problem!

    I think, yes it's part the template, but I should have a better way to call the name and image, because each template may change that. I made a note to add that in the next release. Along with a few other improvements!

  7. #147
    Join Date
    Oct 2020
    Location
    australia
    Posts
    31
    Plugin Contributions
    0

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

    Does this work with zen cart 1.5.7?

 

 
Page 15 of 15 FirstFirst ... 5131415

Similar Threads

  1. Ceon Back In Stock Notifications 3.0.0
    By conor in forum Addon Admin Tools
    Replies: 196
    Last Post: 8 Dec 2022, 08:32 AM
  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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR