Home Forums WoodMart – Premium Template URGENT – DATA NOT SAVED – ADDING VARIATION IMAGES GALLERY

This topic contains 38 replies, has 2 voices, and was last updated by  gevcen 2 weeks, 5 days ago.

Viewing 30 posts - 1 through 30 (of 39 total)
  • Author
    Posts
  • #94438

    gevcen
    Customer

    When I add variation images to one specific product, it keeps disappearing when saving!
    Please fix this ASAP!

    Accesses in private > Go to this product
    https://gevcen.be/wp-admin/post.php?post=1492&action=edit
    https://gevcen.be/cordonnerie/recolorant-daim-et-textile-en-applicateur/

    Go into the variation sceens and add variation images for the variation that don’t have pictures yet. Save and you will see it’s not getting saved.

    I have already disactivated all external plugins, so the problem is in your theme!

    Private Content Hidden
    #94467

    Hello,

    Could you please disable all plugins that are not related to our theme and switch to the parent theme so we can check it?

    Thank you in advance

    #94526

    gevcen
    Customer

    You seriously never read people’s ticket till the end?
    I told you that I have already disactivated all external plugin, read please!
    And I refuse to switch to parent theme because then I lose theme settings parameters.

    #94527

    We wrote this because you had one plugin still active when we checked https://gyazo.com/a12225e000dc6bdd52a91859bbbef9a5
    But you are right, this plugin can’t harm this function. Please, send us your FTP access so we can troubleshoot it.

    #94528

    gevcen
    Customer

    Accesses in private

    Private Content Hidden
    #94533

    We don’t see WoodMart theme there https://gyazo.com/d503620b8d596f976a8ebb7a6c54d37e

    #94537

    gevcen
    Customer

    Try this file

    #94538

    gevcen
    Customer

    File

    #94549

    And what is the password to this data?

    #94764

    gevcen
    Customer

    Same as sent above…

    #94766

    gevcen
    Customer

    Those data are the only ones shared to me by my host contact
    Please check, the issue occurs everywhere in my store and I can’t work like this..

    #94767

    Please, post full information in the private content. I have removed that file for security reasons.

    #94769

    gevcen
    Customer

    Accesses

    Private Content Hidden
    #94772
    #94773

    gevcen
    Customer

    But that’s my access! That’s the FTP of my website. There are no other…

    #94775

    But as you can see on the screenshot, there is no WoodMart theme there. Only Basel theme. So we can’t check the problem if there are no our theme files there.

    #95249

    gevcen
    Customer

    Try this

    Private Content Hidden
    #95316

    This data seems to be incorrect https://gyazo.com/74fe01cc0ee5d55f4fb6591346910b4c

    #95530

    gevcen
    Customer

    Can you please retry?

    #95555
    #95626

    gevcen
    Customer

    My dev gave me this file now. Can you try?

    #95628

    gevcen
    Customer

    File attachment

    #95629

    gevcen
    Customer

    See attachment

    #95642

    You already sent us this file and it doesn’t contain the password.

    #95930

    gevcen
    Customer

    Ok try this now

    Private Content Hidden
    #95933

    FTP is working now. We are checking the product you sent initially and can’t reproduce the problem now. Could you please describe where we can check it now?

    #95943

    gevcen
    Customer

    The product which I reported in the original post is indeed working fine for unknown reason.

    However, I do have 2 other products (so far) where the issue still exist :

    1) Product “Pâte de luxe pour le glaçage du cuir lisse” > Variation “09 Acajou”
    https://gevcen.be/cordonnerie/pate-de-luxe-pour-le-glacage-du-cuir-lisse/

    2) Product “Cirage en pot pour chaussures” > Variations 27, 901, 902, 904, 913, 914
    https://gevcen.be/cordonnerie/cirage-en-pot-pour-chaussures/

    Here is a video made on the product n°1
    https://showmore.com/fr/u/kovr86s

    #95954

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

    function woodmart_remove_unnecessary_vg_data( $post_id ) {
    		if ( ! woodmart_woocommerce_installed() ) {
    			return;
    		}
    
    		$product = wc_get_product( $post_id );
    
    		if ( ! $product ) {
    			return;
    		}
    
    		$available_variations = array();
    
    		foreach ( $product->get_children() as $child_id ) {
    			$available_variations[] = $product->get_available_variation( wc_get_product( $child_id ) );
    		}
    
    		$available_variations = array_values( array_filter( $available_variations ) );
    		
    		$variations             = $product->get_type() == 'variable' ? $available_variations : '';
    		$variations_ids         = array();
    		$variation_gallery_data = get_post_meta( $post_id, 'woodmart_variation_gallery_data', true );
    
    		if ( ! $variations || ! $variation_gallery_data ) {
    			return;
    		}
    
    		foreach ( $variations as $variation ) {
    			$variations_ids[] = $variation['variation_id'];
    		}
    
    		foreach ( $variation_gallery_data as $key => $data ) {
    			if ( ! in_array( $key, $variations_ids ) && isset( $variation_gallery_data[ $key ] ) ) {
    				unset( $variation_gallery_data[ $key ] );
    			}
    		}
    
    		update_post_meta( $post_id, 'woodmart_variation_gallery_data', $variation_gallery_data );
    	}
    
    	add_action( 'save_post', 'woodmart_remove_unnecessary_vg_data' );
    #95983

    gevcen
    Customer

    How am I supposed to modify the file functions.php ?

    #95984

    gevcen
    Customer

    Is it in this file? If yes, at which line?

Viewing 30 posts - 1 through 30 (of 39 total)

The topic ‘URGENT – DATA NOT SAVED – ADDING VARIATION IMAGES GALLERY’ is closed to new replies.