Forum Replies Created

Viewing 15 replies - 1 through 15 (of 40 total)
  • Thread Starter agenziae20

    (@agenziae20)

    Hi,
    I turned off lazyload option on W3 Total Cache but unfortunately the issue is still there.
    Regards.

    Thread Starter agenziae20

    (@agenziae20)

    That would be perfect. Do you know what code should I add there to retrieve the lazy loading script used by W3 Total Cache?

    Thread Starter agenziae20

    (@agenziae20)

    Thanks a lot @c0nst

    Thread Starter agenziae20

    (@agenziae20)

    Hi @wfpeter,

    thank you for your reply.

    Code snippet (extra code to filter the Fibosearch results, provided by the Fibosearch author) is manually added via Code Snippet plugin instead of modyfing functions.php.
    When testing on staging website (Wordfence inactive) it works as expected, but when testing on live website it doesn’t work.

    Test results on live website:
    1) Wordfence ON + WAF ON learning mode + Code Snippet ON -> no Fibosearch result is displayed, it keeps searching
    2) Wordfence ON + WAF OFF + Code Snippet ON -> no Fibosearch result is displayed, it keeps searching
    2) Wordfence OFF + Code Snippet ON -> Fibosearch results as expected (with extra filtering added by the code snippet)
    3) Wordfence ON + Code Snippet OFF -> Fibosearch results as plugin default (obviosly without extra filtering option, since the script is off)

    Check on Wordfence> Tools> Live Traffic> no event related to this actions is displayed

    So there is some sort of incompatibility between this extra code and Worfence, but Firewall doesn’t seem to get involved.

    Piece of code which seems to be involved is:

    add_filter( 'dgwt/wcas/scripts/custom_params', function ( $params ) {
    	$author = fibosearch_get_product_author();
    	$params['author'] = $author; 
    	return $params; 
    } ); 

    If I comment this piece of code and keep Wordfence ON I get no issue (but of course I got no extra filtration).

    The fibosearch_get_product_author() function is also called by an add_action but gives no issue.

    Thread Starter agenziae20

    (@agenziae20)

    Hello @c0nst
    thank you for this snippet, but unfortunately it did not work, it removed categories everywhere, not only on the vendor store page.

    I tried to modify:
    if ( isset( $_REQUEST['author'] ) && 'false' != $_REQUEST['author'] && $product_cats ) {
    with:
    if ( isset( $_REQUEST['author'] ) && ! empty( $_REQUEST['author']) && $product_cats ) {
    and it now works as expected.

    So, do you think it is better to also keep the following line as it was originally?
    if ( isset( $_REQUEST['author'] ) && ! empty( $_REQUEST['author'] ) ) {

    Regards.

    Thread Starter agenziae20

    (@agenziae20)

    The script worked on the staging site, doesn’t work on live site. Tested and found out it is blocked by Wordfence (that is inactive on staging site).

    Thread Starter agenziae20

    (@agenziae20)

    Hello @c0nst
    first of all, THANK YOU VERY MUCH for this snippet!
    I tested on the Vendor Store Page but it was not working, I don’t quite understand your code but fibosearch_get_product_author was searching in a wrong way (maybe searching in a product page?). Anyway, this is how I edited the function and now it gets the correct author_id

    // Check if we are in vendor store page and return author ID
    function fibosearch_get_product_author() {
    	global $post;
    	if(wcfm_is_store_page()){
    		$page_author = get_userdata( $post->post_author );
    		$author =  $page_author->ID ;
    	}
    	return $author;
    }

    Anyway I can see other products in the search autocomplete, it is due to the fact that all the catalogue Categories are displayed, we need to restrict this search as well.
    In fact, if I disable Show Categories (Fibosearch Settings> Autocomplete> Non-products in autocomplete) it works as expected.

    Thread Starter agenziae20

    (@agenziae20)

    Ok, thanks. Is there a hook list or can you give me a hook name that I can use to insert a function and filter the results just before being printed?

    Thread Starter agenziae20

    (@agenziae20)

    Hello,
    I created a new language (Italian) and translated “Loading…” and “No more products” with Loco Translate.
    Two new files have been created:
    BeRocket_LMP_domain-it_IT.mo
    BeRocket_LMP_domain-it_IT.po

    Strings are in BeRocket_LMP_domain-it_IT.po:

    #: main.php:323
    msgid "Loading..."
    msgstr "Caricamento in corso..."
    
    #: main.php:324
    msgid "No more products"
    msgstr "Fine Catalogo"

    The website language is Italian, I checked general settings:
    Dashboard> Settings> General> Site Language> Italian

    In fact all other plugins are translated, but those two strings by “Load More Products for WooCommerce” are still displayed in English.

    Thread Starter agenziae20

    (@agenziae20)

    In case someone else need it, this is how I solved:

    – add this code to functions.php or via plugin like Code Snippets

    add_action( 'woocommerce_archive_description', function() {
    	 echo do_shortcode('[fe_chips mobile="yes"]');
    }, 50 );

    – removed every hook (empty field) in
    Filters> Settings> General> Selected Filters (Chips) integration
    to prevent duplication

    Thread Starter agenziae20

    (@agenziae20)

    Ok, thank you very much.

    Thread Starter agenziae20

    (@agenziae20)

    Hi @stepasyuk
    thanks for your prompt reply but I think there is a misunderstanding.
    I need the chips to be displayed before the results (Products) in the main content area of the Shop Page.

    These are my settings:
    – Widgets> Shop Page> Filter Everything — Filters> Show selected terms (Chips)> OFF
    – Filters> Settings> General> Selected Filters (Chips) integration> Woocommerce before Shop loop

    Results on Shop Page after filtering:
    Desktop> Sidebar: no chips (ok) & Main content: chips before products (ok)
    Mobile > Sidebar: no chips (ok) & Main content: no chips (error, I am expecting to see them here too)

    If I add a “Filter Everything — Chips” widget in the Shop Page Sidebar I will just add the chips in the sidebar but not in the main content.
    Same if I activate Widgets> Shop Page> Filter Everything — Filters> Show selected terms (Chips)> ON, they will be in the sidebar (inside the filter widget, which is also collapsed on mobile to have a better scrolling) but not in the main content.

    So, how can I make the Chips to be visible on mobile in the main content (before products) area?
    Why the “Woocommerce before Shop loop” doesn’t work on mobile? Is there a different hook for mobile view?

    • This reply was modified 2 years, 8 months ago by agenziae20.
    Thread Starter agenziae20

    (@agenziae20)

    Sorry to hear about that. Anyway it could be achieved passing an attribute with the author ID to the shortcode, something like [fibosearch author=”4″] to restrict results to only products added by author with userID “4”.

    Thread Starter agenziae20

    (@agenziae20)

    Thank you so much Aldo! I already left a five star review a few months ago, I just edited the text right now.

    Thread Starter agenziae20

    (@agenziae20)

    Yes Aldo, it definitely works as expected! Thank you very much!

Viewing 15 replies - 1 through 15 (of 40 total)