Your account expired support, please renew to get your support.

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: Simple Product Pages Not Loading #31889
    bankzy
    Support Expired
    in reply to: Simple Product Pages Not Loading #31888
    bankzy
    Support Expired

    Ahh I have found what the issue is.

    I am using the below snippet in functions.php to show out of stock variations and the stock levels still remaining.

    When I remove this snippet the simple product pages load but fail when it’s active.

    add_action( ‘woocommerce_after_add_to_cart_form’, ‘dropdown_waitlist_label’ );
    function dropdown_waitlist_label() {
    echo ”
    <script>
    jQuery(document).ready(function($) {
    var variation_data = $(‘form.variations_form’).attr(‘data-product_variations’);
    var variation_data = JSON.parse(variation_data);
    $(‘#pa_size > option’).each(function() {
    for (var i = 0; i < variation_data.length; i++) {
    var variation = variation_data;
    if ($(this).val() == variation.attributes.attribute_pa_size) {
    if ( false == variation.is_in_stock ) {
    $(this).text( variation.attributes.attribute_pa_size + ‘\u00A0\u00A0\u00A0–\u00A0\u00A0\u00A0\u00A0Out of Stock’);
    }
    if ( variation.min_qty == 1 && variation.max_qty == 1 ) {
    $(this).text( variation.attributes.attribute_pa_size + ‘\u00A0\u00A0\u00A0–\u00A0\u00A0\u00A0\u00A01 left in stock’ );
    }
    }
    }
    });
    });
    </script>”;
    }

    in reply to: Simple Product Pages Not Loading #31887
    bankzy
    Support Expired

    I actually don’t know what I have done to fix this issue.

    I am unsure if the theme issue mentioned in my previous reply was due to you perhaps enabling the wrong theme.

    I did remove information from functions.php to the child theme functions.

    What is the correct method to update this theme ? Is the method I use above incorrect ? I do it that way so that I can retain the original files before updating just in case I altered some files.

    in reply to: Simple Product Pages Not Loading #31886
    bankzy
    Support Expired

    Hello, I seem to have an issue with the theme loading information from two theme folders ?

    When updating I added the new files to “claue-NEW” in wp-content > theme then changed the folder called “claue” to claue-OLD.

    The theme I have activated now isn’t correct as it’s missing the currency module I added to the top left header.

    in reply to: Simple Product Pages Not Loading #31881
    bankzy
    Support Expired

    Hello,

    I have no idea why this is happening as I left for work and it was working fine and just come back to the site not working.

    I have enabled debug mode and showing errors on the frontend.

    Do you still need FTP access ?

     

    bankzy
    Support Expired

    Ahh fantastic! Had no idea vendor products were tagged as archive.

    Thank you for the swift responses!

    bankzy
    Support Expired

    Hello,

    Yes I have tried that and thought it would work as I had hoped, however, when you click into a child category I still want the category bar to show so that customers can switch to another category very easily.

    bankzy
    Support Expired

    Sorry I have just added the following JS but it’s also hiding it on every other WooCommerce category page which isn’t what I want. It seems to be ignoring my URL all together…

     

    window.onload = function() {
    if (window.location.href.indexOf(‘www.bdtesting.co.uk/club’)) {
    //Hide the element.
    document.querySelectorAll(‘.shop-top-sidebar’)[0].style.display = ‘none’;
    }
    };

Viewing 8 posts - 1 through 8 (of 8 total)