Home › Forums › WoodMart support forum › Duplicate product => additional variation images are not copied
Duplicate product => additional variation images are not copied
- This topic has 20 replies, 2 voices, and was last updated 4 years ago by Artem Temos.
-
AuthorPosts
-
November 15, 2020 at 12:07 am #241642
Jeriss Cloud CenterParticipantDear,
I made a duplicate of product (which has additional variation images) but the additional variation images are not there. Only the main variation image (from default woocommerce) is there, but the theme feature additional variation image isn’t available => please fix this
Thanks
November 16, 2020 at 7:55 am #241837
Artem TemosKeymasterHello,
It works only with the new method of storing variations data https://prnt.sc/vjvdzx
Note that if you will switch the method, you will have to edit your products and add variations images again.Kind Regards
November 16, 2020 at 11:29 am #241938
Jeriss Cloud CenterParticipantHi Artem,
I’ve been working on your theme for about 2 years now, I have about 600 products (simple & variables) + for those products that are variable I have like between 2 to 20 variations each of them. So imagine I have like maybe 1000 units in total. And I do have additional images for almost all my products, so I think that asking me to rework all of what I’ve worked on for 2 years is kind of a bit of a joke ๐
Also, if I switch methods => I suppose everything gets lost at once, so it’s not like as if I can perform the change slowly one by one, product by product, variation by variation => everything gets lost and I have to start all over, so that’s really an unworkable situation.
Kindlyl investigate on a method to perform an automatic query or generator system to automatically perfrom the transfer of images across storing method. I can’t suddenly re-do all the work I’ve done because you’ve created a new system that isn’t backward compatible, please do the necessary to fix such kind of situation.
Please put yourself as a user, this can’t happen…
Thanks a lot
GevcenNovember 17, 2020 at 7:54 am #242179
Artem TemosKeymasterHello,
Try to add the following PHP code snippet to the child theme functions.php file to run the automatic transfer. Then reload your website once, remove the code switch the method in Theme Settings.
add_action( 'wp', function() { $products = new WP_Query( array( 'post_type' => 'product', 'numberposts' => -1, 'meta_key' => 'woodmart_variation_gallery_data', 'meta_compare' => 'EXISTS', ) ); foreach ( $products as $product ) { $meta_data = get_post_meta( $product->ID, 'woodmart_variation_gallery_data', true ); if ( ! $meta_data ) { continue; } foreach ( $meta_data as $key => $value ) { update_post_meta( $key, 'wd_additional_variation_images_data', $value ); } } }, 10 );
Kind Regards
November 29, 2020 at 12:02 pm #245784
Jeriss Cloud CenterParticipantHi Artem,
If I apply this shortcode in a staging to test first, it won’t impact images on live site right?
Thanks
November 30, 2020 at 7:48 am #245976
Artem TemosKeymasterHello,
Yes, you can run it on the staging website first and your live one will not be impacted.
Regards
December 3, 2020 at 8:47 pm #247505
Jeriss Cloud CenterParticipantDear,
I tried this and process has failed unfortunately on staging where all customizations are disabled already there.
1) Add the shortcode in functions.php
2) Load the homepage of the staging
3) Remove the shortcode in functions.php
4) Switch the data storage to “variations”
5) Load a product page on the stagingAS IS : the variations images are not loading anymore
TO BE : there must be variations images loading
December 4, 2020 at 7:42 am #247616
Artem TemosKeymasterPlease, provide us your admin and FTP access so we would check.
December 4, 2020 at 8:40 am #247652
Jeriss Cloud CenterParticipantCredentials below. Please use only STAGING in the ftp (don’t touch live site please)
December 4, 2020 at 8:42 am #247656
Artem TemosKeymasterPut the code to the child theme please.
December 4, 2020 at 10:51 am #247727
Jeriss Cloud CenterParticipantIt’s already what I’ve done, but your process said that I must remove the code from the child theme after the homepage being loaded…
December 4, 2020 at 10:54 am #247731
Artem TemosKeymasterKeep the code for now. We will remove it when necessary.
December 4, 2020 at 10:56 am #247732
Jeriss Cloud CenterParticipantIt’s added
December 4, 2020 at 11:58 am #247733
Artem TemosKeymasterIt looks like the staging website works not in the way as live. Do you have some customizations or plugins there?
https://gyazo.com/86d6a025d47d390010e627c1c50a9b13
https://gyazo.com/ecb6a3e8cad93bbac8e5af0651ec6a5cDecember 4, 2020 at 12:37 pm #247801
Jeriss Cloud CenterParticipantI’ve deleted and recreated the staging. Same links & credentials. Try again.
December 4, 2020 at 12:40 pm #247804
Artem TemosKeymasterNothing changes. The staging is still different.
https://gyazo.com/86d6a025d47d390010e627c1c50a9b13
https://gyazo.com/ecb6a3e8cad93bbac8e5af0651ec6a5cDecember 4, 2020 at 1:34 pm #247834
Jeriss Cloud CenterParticipant????? Of course itโs different ! You re asking me to disable customization !!! So obviously staging wont be same as live site anymore !! Forget the live site and just look the staging, your process didnt work on staging without customization
December 4, 2020 at 1:36 pm #247836
Artem TemosKeymasterTry to add the following PHP code snippet to the child theme functions.php file
function wd_wc_ajax_variation_threshold( $qty, $product ) { return 350; } add_filter( 'woocommerce_ajax_variation_threshold', 'wd_wc_ajax_variation_threshold', 10, 2 );
December 4, 2020 at 7:33 pm #247931
Jeriss Cloud CenterParticipantSo I add the previous code + this one after too? or only this one alone?
December 4, 2020 at 7:34 pm #247933
Jeriss Cloud CenterParticipantI just added it after the first shortocode provided in functions.php
December 7, 2020 at 7:30 am #248459
Artem TemosKeymasterBe sure that you have activated the child theme to make the code work.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register