Home Forums Basel support forum Variation Gallery on RTL languages

Variation Gallery on RTL languages

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #137540

    raqy
    Participant

    Hi,
    I was very glad to learn a few updates ago (after I’ve suggested that early on) that you have incorporated in the theme a variation gallery, a feature supported previously only by a 3rd party plugin.
    Much preferable to have it as part of the theme to avoid any kind of conflicts. So cheers for that!
    This works great in my installation’s default language – English. When clicking a swatch the thumbnails below the main pic, are of the chosen swatch’s (variation’s) gallery only.
    Unfortunately, this is not the case with my secondary language – Hebrew, which is a RTL language, ie with a RTL interface. In this case, thumbnails are showing ALL product pics of ALL swatches, when clicking the swatch only change the main pic, as if the variation gallery does not exist. This is the case with the same product when switching to the other language with the language switcher (WPML). (There are some products, I didn’t yet set the variation gallery pics for, that show this behavior also in English, but the RTL problem exists also for the products that works fine in English)
    All other features are reversed and function correctly in the RTL interface.
    Can you pls check/advice?
    Cheers!

    #137602

    Hello,

    Please provide the site admin access to the private area so that we could check and suggest.

    Best Regards

    #137677

    raqy
    Participant

    It seems that variation gallery doesn’t work all together in translation: not in Quick View and not when swiping main pic of product. You see all pics of all variations in all those cases. In default language all work fine.
    At first I’ve thought this is because field-basel_variation_gallery_data-0 etc. was not translated in translation editor. Don’t understand why it is defined as Translatable and not Copy or else.
    But coping the content of those fields to translation didn’t solve the problem.

    I suspect it gets stuck here:

    if ( ( $product && $product->get_type() !== 'variable' ) || ! $variation_gallery_data ) {
    			return;
    		}
    

    in function basel_get_vg_data() in inc/woocommerce/variation-gallery.php

    Simply doesn’t recognize a variation gallery exists for trans products.

    Can you pls check?

    #137761

    raqy
    Participant

    Pls also notice that the var basel_variation_gallery_data at the end of each rendered Hebrew product page is rendered in English, instead of Hebrew, which led me to believe that

    function basel_single_product_vg_data() {
    		if ( ! basel_get_opt( 'variation_gallery' ) ) {
    			return;
    		}
    
    		$images_data = basel_get_vg_data();
    
    		wp_localize_script( 'basel-functions', 'basel_variation_gallery_data', $images_data );
    		wp_localize_script( 'basel-theme', 'basel_variation_gallery_data', $images_data );
    	}
    
    	add_action( 'wp_enqueue_scripts', 'basel_single_product_vg_data', 1000001 );
    }

    is creating the wrong script and that something is wrong with function basel_get_vg_data()

    I think it points to the default product id and it should point to the translated product id, or that something is wrong with product/variation gallery association in trans products.

    #137935

    Artem Temos
    Keymaster

    Hi,

    We reviewed the problem and noticed that WPML doesn’t have any hook that will allow us to copy this meta data to the translated product. Unfortunately, we can’t fix this from our side at the moment. So you will need to attach images for translated products separately.

    Regards

    #138027

    raqy
    Participant

    Hi,
    Thanks for checking this out.
    Unfortunately your offered hack is out of the question, as editing the translated product directly will break the sync between the original and translated product all together and can erase the translation every time a new. I’ve had my experience with that on other matters and it’s causing a mess.
    As your answer imply, this quite requested feature is currently not WPML supported.
    IMHO it shouldn’t have been released in the first place if it is not WPML supported, as your theme claims to fully support WPML.
    At least – this should come with a big warning to your clients!
    I know this thing can be done as I’ve previously used a plugin that handle this quite fine.
    Maybe it uses different programming approach, but it deliver.
    You can try custom fields or custom XML WPML configuration, as used to translated your custom WPBakery elements.
    I’ll appreciate a timeline for fixing this, so I can made a business decision whether to use the theme feature or a dedicated plugin (least favorable option).
    I really urge you to solve this as soon as you can, because my client is pressing me to finish development soon and the option to be chosen (theme’s or plugin’s) would kind of be final, as switching later to the other option will necessitate re-enter all variation gallery associations a new for all products, which is a cumbersome amount of work.
    Hoping you’ll get to it and fix it soon,
    Cheers!

    #138054

    Artem Temos
    Keymaster

    Hello,

    We have spent a lot of time investigating this issue even before your topic. But we still can’t find the solution. You can try to contact WPML for help also. Maybe they have some instruction for such cases.

    Kind Regards

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