Home Forums WoodMart support forum Stucky sidebar column on shop archive

Stucky sidebar column on shop archive

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #550849

    FreeRiderNSK
    Participant

    Hello!
    I started completely redesigning the site and acquired support.
    1) On the archives page I made a sticky column for computers. But if an Ajax event occurs, the column stops being sticky. How to fix it.

    2) I need hooks for product archives if I use layouts. Since I don’t need to display categories if a filter is applied, since there is a scrolling up after applying the filter. I added a working hook to the file \woodmart\inc\modules\layouts\wpb\maps\woocommerce\hook.php — (‘woocommerce_archive_description’ => ‘woocommerce_archive_description’,)

    For display I use this code. Unfortunately, when using the layout, I cannot configure the conditions. Maybe in the next update you will add the ability to set conditions for layout elements?

    if(strpos($_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'], '/c/'))
    add_action( 'woocommerce_archive_description', 'woocommerce_archive_custom', 15 );
    
    function woocommerce_archive_custom(){
    	$server_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    	if(( is_product_category(75) ) && strpos($server_url, 'filter_') == false && strpos($server_url, 's=') == false && strpos($server_url, '/page/') == false ) {
    	?>
    	<?php echo do_shortcode( '[html_block id="9783"]' );
    	?>
    	<?php
    }
    }
    • This topic was modified 8 months, 4 weeks ago by FreeRiderNSK.
    • This topic was modified 8 months, 4 weeks ago by FreeRiderNSK.
    #550854

    FreeRiderNSK
    Participant

    PS
    1) For example, if you apply any filter…

    #551074

    FreeRiderNSK
    Participant

    Hello! Have you seen the bug?

    #551107

    Hello,

    1. I did not see any issue on the archive page, the sidebar is still sticky after loading more products on the page with Ajax loading. The sidebar is always sticky.

    2. For this, I will check with the lead developer and give you a possible solution to this issue.

    Best Regards.

    #551118

    FreeRiderNSK
    Participant

    1. Please check video, I use incognito mode to Chrome.
    2. Thank You!

    #551137

    FreeRiderNSK
    Participant

    2) Perhaps this problem can be solved very simply. Allow the user to add their own hooks that do not exist in WordPress. Maybe it’s better this way?

    3) Product filter element. Needs to select conditions, for example we have 2 attributes.
    1. serial (arg. = MSC, MCF, KFC)
    2. model (arg. = DGB-100MSC, DGB-130MSC, DGB-100MCF, DGB-130MCF, DGB-100KFC, DGB-130KFC…..)

    IF I choose serial MSC, In the second column of the filter, show only DGB-100MSC, DGB-130MSC.
    IF I choose serial KFC, In the second column of the filter, show only DGB-100KFC, DGB-130KFC….

    I know how to implement this based on ntml blocks, duplicating hidden attributes, as well as php if (strpos($server_url, ‘?filter_serial=MSC’))……..

    Maybe there’s something easier to do? Many Woodmart buyers sell spare parts. This is very important for the spare parts industry. I don’t want to install third-party plugins, they bad work with Woodmart.

    ThankYou!

    • This reply was modified 8 months, 3 weeks ago by FreeRiderNSK.
    #551165

    Hello,

    Sorry to hear about the inconvenience. Kindly, please share your Site WP-ADMIN Login details in the Private Content field so that we can check this concern on your Site and help you out accordingly.
    Best Regards

    #551166

    FreeRiderNSK
    Participant

    Ok, can we find a solution to questions 2 and 3?

    #551173

    FreeRiderNSK
    Participant

    I’m sorry. Changed it to administrator status….

    #551413

    Hello,

    Please try to use the following custom JS code. This code needs to be placed inside Custom JS-> On document ready field in theme settings. This issue will also be fixed in the next theme update:

    (function($) {
    	$(document).on('pjax:success', function() {
    		woodmartThemeModule.stickyColumn();
    	});
    })(jQuery);

    Best Regards.

    #552828

    FreeRiderNSK
    Participant

    Hello!
    The problem is not completely solved!
    If I press the back button in the header or browser – the block stops being sticky!
    Watch a video.

    #552830

    FreeRiderNSK
    Participant

    Please watch the second video. Found more bugs. After applying the filter, if you press the back button, a bug occurs.

    #553039

    Hello,

    Add this code to the previous one and it will fix the column stick problem when you go back.

    window.addEventListener('popstate', function() {
    	woodmartThemeModule.stickyColumn();
    });

    Unfortunately, the problem associated with the filter product element when you go back cannot be solved with the help of custom code alone, but we will consider how to solve it in our next updates.

    Best Regards.

    #557798

    FreeRiderNSK
    Participant

    Hello!
    I updated to 7.5.
    If I delited this custom JS

    (function($) {
    	$(document).on('pjax:success', function() {
    		woodmartThemeModule.stickyColumn();
    	});
    })(jQuery);
    window.addEventListener('popstate', function() {
    	woodmartThemeModule.stickyColumn();
    });

    Bug remains

    #557799

    FreeRiderNSK
    Participant

    Unfortunately, the problem associated with the filter product element when you go back cannot be solved with the help of custom code alone, but we will consider how to solve it in our next updates.

    Bug remains

    #557934

    Hello,

    Sorry for the inconvenience. This issue will be fixed in 7.5.1 update which will be released soon.

    Best Regards.

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