Home Forums WoodMart support forum URGENT – DATA NOT SAVED – ADDING VARIATION IMAGES GALLERY

URGENT – DATA NOT SAVED – ADDING VARIATION IMAGES GALLERY

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

    Jeriss Cloud Center
    Participant

    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!

    #94467

    Artem Temos
    Keymaster

    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

    Jeriss Cloud Center
    Participant

    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

    Artem Temos
    Keymaster

    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

    Jeriss Cloud Center
    Participant

    Accesses in private

    #94533

    Artem Temos
    Keymaster

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

    #94537

    Jeriss Cloud Center
    Participant

    Try this file

    #94538

    Jeriss Cloud Center
    Participant

    File

    #94549

    Artem Temos
    Keymaster

    And what is the password to this data?

    #94764

    Jeriss Cloud Center
    Participant

    Same as sent above…

    #94766

    Jeriss Cloud Center
    Participant

    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

    Artem Temos
    Keymaster

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

    #94769

    Jeriss Cloud Center
    Participant

    Accesses

    #94772

    Artem Temos
    Keymaster
    #94773

    Jeriss Cloud Center
    Participant

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

    #94775

    Artem Temos
    Keymaster

    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

    Jeriss Cloud Center
    Participant

    Try this

    #95316

    Artem Temos
    Keymaster

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

    #95530

    Jeriss Cloud Center
    Participant

    Can you please retry?

    #95555

    Artem Temos
    Keymaster
    #95626

    Jeriss Cloud Center
    Participant

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

    #95628

    Jeriss Cloud Center
    Participant

    File attachment

    #95629

    Jeriss Cloud Center
    Participant

    See attachment

    #95642

    Artem Temos
    Keymaster

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

    #95930

    Jeriss Cloud Center
    Participant

    Ok try this now

    #95933

    Artem Temos
    Keymaster

    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

    Jeriss Cloud Center
    Participant

    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

    Artem Temos
    Keymaster

    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

    Jeriss Cloud Center
    Participant

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

    #95984

    Jeriss Cloud Center
    Participant

    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.