Home Forums Basel support forum integration of Yith recently viewed products plugin

integration of Yith recently viewed products plugin

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23965

    raqy
    Participant

    Hi,
    I’d like to integrate this plugin which seems to suit perfectly my client needs. However, as you have changed default WooCommerce hooks the row of ‘recently viewed products’ does not show up as it should after ‘related products’ but right after the tabs, inheriting their background color. In short – a mess.
    I’ve tried to change the hooks placement in my child theme function.php but although it did put ‘recently viewed’ after ‘related products’, it pushed both into the wrong hook.

    can you pls help fixing my function:

    if( ! function_exists( 'basel_woocommerce_hooks' ) ) {
    	function basel_woocommerce_hooks() {
            global $basel_prefix;
    		remove_action( 'woocommerce_after_single_product_summary', array( $this, 'print_shortcode' ), 30 );
    		
    		add_action( 'basel_woocommerce_after_sidebar', array( $this, 'print_shortcode' ), 30 );
    	}
    }

    (they didn’t give their section a name, just array( $this, 'print_shortcode' ). I guess this is a bit problematic.)
    cheers

    #23985

    Artem Temos
    Keymaster

    Hello,

    We are glad to know that you considered using Basel for your web-site. I hope you will be happy with it.

    You can’t use this array( $this, 'print_shortcode' ) in the child theme since it can work only in its plugin PHP class. So in this case, you may need to change the code of the plugin and change this hook there and not on our child theme.

    Kind Regards
    Xtemos

    #24003

    raqy
    Participant

    I’ve tried to avoid that in order to avoid upgrade issues, but for now I’ll change the plugin itself.
    I’ll try to contact Yith suggesting a rewrite of their code, so it would be possible to integrate smoothly with your theme or any other theme that changes the hooks.
    As some of Yith plugins are already integrated in your theme, it would be nice if you and Yith would consider collaborating on this plugin as well, as it seems to be a much needed addition.
    Cheers

    #24012

    Artem Temos
    Keymaster

    OK, we will consider checking our theme with this plugin also.

    #24426

    raqy
    Participant

    FYI. I’ve managed to fully integrate this Yith plugin making some minor changes in one of the plugin files, also incorporating the recently viewed products in the Basel slider used to display the adjunct related and crossell products.

    #24429

    Artem Temos
    Keymaster

    We are glad that you have solved this. But if you did your changes in the plugin files, we are not able to include this fix in our theme updates.

    Regards

    #24433

    raqy
    Participant

    I’ve asked Yith to help me include this on a theme-child so if they would provide me with a script, it would be possible. There was a problem with the $this mentioned above that prevented me from writing a function in the theme.

    #24442

    Artem Temos
    Keymaster

    OK, contact us about with the result.

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