Home Forums Basel support forum Quick view shows wrong currency with (WPML multi currency)

Quick view shows wrong currency with (WPML multi currency)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #69263

    Baxo
    Participant

    Hi
    I have two currency on my website (USD, GEL)When i check product with (quick view) the currency is US Dollar (default currency) in both case.
    I asked wpml for support but there were not able to solve the issue. Did you guys ever had similar case?
    Maybe you could help out?
    I have found a similar code, maybe you could do some modification

    /**
     * Add this code to the functions.php file of your theme.
     */
    add_filter( 'wcml_load_multi_currency_in_ajax', 'do_not_load_multi_currency_in_ajax', 10, 1 );
     
    function do_not_load_multi_currency_in_ajax( $load ) {
     
        if ( is_checkout() ) { 
            $load = false; // If this is the checkout page, do not load multi-currency filters in AJAX actions
        }
     
        return $load;
    }
     

    Thank you in advance best regards
    Merabi

    #69299

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    	function woodmart_wpml_compatibility( $ajax_actions ) {
    	   $ajax_actions[] = 'woodmart_ajax_add_to_cart';
    	   $ajax_actions[] = 'woodmart_quick_view';
    	   return $ajax_actions;
    	}
    	add_filter( 'wcml_multi_currency_ajax_actions', 'woodmart_wpml_compatibility', 10, 1 );

    Regards

    #69394

    Baxo
    Participant

    Hi
    Im using Basel theme, so should i use this code?

    	function woodmart_wpml_compatibility( $ajax_actions ) {
    	   $ajax_actions[] = 'woodmart_ajax_add_to_cart';
    	   $ajax_actions[] = 'woodmart_quick_view';
    	   return $ajax_actions;
    	}
    	add_filter( 'wcml_multi_currency_ajax_actions', 'woodmart_wpml_compatibility', 10, 1 );
    #69397

    Artem Temos
    Keymaster

    Sorry, replace with this one

    	function basel_wpml_compatibility( $ajax_actions ) {
    		$ajax_actions[] = 'basel_ajax_add_to_cart';
    		$ajax_actions[] = 'basel_quick_view';
    		return $ajax_actions;
    	}
    	add_filter( 'wcml_multi_currency_ajax_actions', 'basel_wpml_compatibility', 10, 1 );
    #69403

    Baxo
    Participant

    Thank you very muck for quick response

    #69405

    Artem Temos
    Keymaster

    You are welcome.

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