Home › Forums › WoodMart support forum › Stucky sidebar column on shop archive
Stucky sidebar column on shop archive
- This topic has 15 replies, 2 voices, and was last updated 7 months, 1 week ago by Aizaz Imtiaz Awan.
-
AuthorPosts
-
March 20, 2024 at 8:45 pm #550849
FreeRiderNSKParticipantHello!
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 ago by FreeRiderNSK.
- This topic was modified 8 months ago by FreeRiderNSK.
March 20, 2024 at 8:53 pm #550854
FreeRiderNSKParticipantPS
1) For example, if you apply any filter…March 21, 2024 at 1:37 pm #551074
FreeRiderNSKParticipantHello! Have you seen the bug?
March 21, 2024 at 2:26 pm #551107
Aizaz Imtiaz AwanKeymasterHello,
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.
March 21, 2024 at 2:38 pm #551118
FreeRiderNSKParticipant1. Please check video, I use incognito mode to Chrome.
2. Thank You!March 21, 2024 at 3:07 pm #551137
FreeRiderNSKParticipant2) 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 ago by FreeRiderNSK.
March 21, 2024 at 3:56 pm #551165
Aizaz Imtiaz AwanKeymasterHello,
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 RegardsMarch 21, 2024 at 3:59 pm #551166
FreeRiderNSKParticipantOk, can we find a solution to questions 2 and 3?
March 21, 2024 at 4:12 pm #551173
FreeRiderNSKParticipantI’m sorry. Changed it to administrator status….
March 22, 2024 at 1:06 pm #551413
Aizaz Imtiaz AwanKeymasterHello,
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.
March 27, 2024 at 6:37 pm #552828
FreeRiderNSKParticipantHello!
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.March 27, 2024 at 6:47 pm #552830
FreeRiderNSKParticipantPlease watch the second video. Found more bugs. After applying the filter, if you press the back button, a bug occurs.
March 28, 2024 at 1:09 pm #553039
Aizaz Imtiaz AwanKeymasterHello,
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.
April 16, 2024 at 9:56 pm #557798
FreeRiderNSKParticipantHello!
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
April 16, 2024 at 9:57 pm #557799
FreeRiderNSKParticipantUnfortunately, 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
April 17, 2024 at 11:54 am #557934
Aizaz Imtiaz AwanKeymasterHello,
Sorry for the inconvenience. This issue will be fixed in 7.5.1 update which will be released soon.
Best Regards.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register