Splitting Variations When Importing Products

To take again your example:

Let's say you have 1 Tshirt with 4 colors and 4 sizes. You want to separate this product in 4 unique red, blue, white, black product.

For the red product:

1) Edit attributes first.

Attribute 1: color = red, blue, white, black

Attribute 2: size = S, M , L

In the product edit tab ------> attribute color: you delete blue, white, black BUT YOU LEAVE IN PLACE red.

In the product edit tab ------> attribute size: You just leave it as it is and delete nothing.

2) Edit variations.

In the variation tab: SELECT DEFAULT VARIATIONS RED AT THE TOP

i.g variation 1 = "RED" and for variation 2 = size, set "no default" (will be chosen by customer).

Then deleted all other variation couples lines i.g (blue/ S, M, L ; white/ S, M, L ; black/ S, M, L).

Again I don't think sync in Alidropship relates to SKU but only product page url so I don't think the problem comes from this.

Hey @Arnaldo
This was exactly what I did and the synchonization didn't work. This method will not put products into draft if the product is no longer available from aliexpress. I tested this personally when I used the above method 3 months ago. Now the product is no longer available, I am able to test it and realize the problem. I didn't read this thread before I used this approach so I am not blaming anyone. Just hope if someone is reading this, they don't have to make the same mistakes as I did. Right now, there is no solution to split variation. I am still trying new methods but again, it might take another month or so to see if it really works, that is, if a seller does wish to unpublish their listing from Aliexpress.
 

Arnaldo

Active Member
Hello @Victoria Kudryashova how are you dear? Do you encounter a similar issue?

Can you add up your experience? I didn't have this issue so far but maybe @Raymond621 found a potential bug here.

Raymond, if you are ok with it Victoria could test it directly on your site maybe.

Cheers.
 
Hello @Victoria Kudryashova how are you dear? Do you encounter a similar issue?

Can you add up your experience? I didn't have this issue so far but maybe @Raymond621 found a potential bug here.

Raymond, if you are ok with it Victoria could test it directly on your site maybe.

Cheers.

Hello @Arnaldo , I don't think Victoria is around anymore or at least I heards from another staff member that she is on her leave at the moment.
 

Arnaldo

Active Member
Don't hesitate to pm them with temporary admin access with problem explanation or link to this thread/post.

Patience is the key.
 

Victoria Kudryashova

Administrator
Hey @Arnaldo
This was exactly what I did and the synchonization didn't work. This method will not put products into draft if the product is no longer available from aliexpress. I tested this personally when I used the above method 3 months ago. Now the product is no longer available, I am able to test it and realize the problem. I didn't read this thread before I used this approach so I am not blaming anyone. Just hope if someone is reading this, they don't have to make the same mistakes as I did. Right now, there is no solution to split variation. I am still trying new methods but again, it might take another month or so to see if it really works, that is, if a seller does wish to unpublish their listing from Aliexpress.
We will check this issue , thank you!
 
If you want an easy way to split out variation and you want to keep more than one use this plugin

https://iconicwp.com/products/woocommerce-show-single-variations/

Makes it easy and works without breaking anything.

If you do not want to use the plugin, but still want to split it, you can. But do not turn it to a simple product, it will not sync. Instead, do this.

Duplicate as you normally do. Say you have Red and Blue. On the red product delete the blue variation. Now, in the red variation set the default to red and add this to your functions file. If a variation is 1 and default is set, then display it as a normal simple product on the front. I use this and no issues.

Here is the link to the context.

https://stackoverflow.com/questions...elected-variation-in-woocom/52565307#52565307

// ************************************* FOR ALIEXPRESS / ALIDROPSHIP TO SYNC **************************
add_action( 'woocommerce_before_add_to_cart_form', 'single_unique_variation_ui', 10 );

function single_unique_variation_ui(){
global $product;

if( ! $product->is_type('variable') )
return; // Only variable products

$available_variations = $product->get_available_variations(); // Get available variations
$default_attributes = $product->get_default_attributes(); // Get default attributes

// Only for a unique selected variation by default
if( ! ( sizeof($available_variations) == 1 && sizeof($default_attributes) == 1 ) )
return;

// Get the unique variation
$variation = reset($available_variations);

// Loop through
if( reset($variation['attributes']) == reset($default_attributes) ) :
// Styles
?>
<style>
div.woocommerce-variation-price, table.variations { display:none; }
</style>
<?php
endif;
}
// ************************************* FOR ALIEXPRESS / ALIDROPSHIP TO SYNC **************************
 
Last edited:
As I read through this thread I do have a question on renaming variations. I have a variation called Metal_color and the names are so random that I cannot show them on the UI, hence I split them out as above and hide it. But can I rename the variations or will that break the sync? Or can I create a new attribute, called color for example and map the aliexpress attribute in the variation to the nice new one I create? Then I use mine for the variation and uncheck the aliexpress one, but keep it there. That should still allow me to sync, right? I have only had this plugin for a few days now.
 
If you want an easy way to split out variation and you want to keep more than one use this plugin

https://iconicwp.com/products/woocommerce-show-single-variations/

Makes it easy and works without breaking anything.

If you do not want to use the plugin, but still want to split it, you can. But do not turn it to a simple product, it will not sync. Instead, do this.

Duplicate as you normally do. Say you have Red and Blue. On the red product delete the blue variation. Now, in the red variation set the default to red and add this to your functions file. If a variation is 1 and default is set, then display it as a normal simple product on the front. I use this and no issues.

Here is the link to the context.

https://stackoverflow.com/questions...elected-variation-in-woocom/52565307#52565307

// ************************************* FOR ALIEXPRESS / ALIDROPSHIP TO SYNC **************************
add_action( 'woocommerce_before_add_to_cart_form', 'single_unique_variation_ui', 10 );

function single_unique_variation_ui(){
global $product;

if( ! $product->is_type('variable') )
return; // Only variable products

$available_variations = $product->get_available_variations(); // Get available variations
$default_attributes = $product->get_default_attributes(); // Get default attributes

// Only for a unique selected variation by default
if( ! ( sizeof($available_variations) == 1 && sizeof($default_attributes) == 1 ) )
return;

// Get the unique variation
$variation = reset($available_variations);

// Loop through
if( reset($variation['attributes']) == reset($default_attributes) ) :
// Styles
?>
<style>
div.woocommerce-variation-price, table.variations { display:none; }
</style>
<?php
endif;
}
// ************************************* FOR ALIEXPRESS / ALIDROPSHIP TO SYNC **************************

Hey @seattledude
how about the attributes? Do you do anything under the attribute tab?
 
I delete the ones I do not need for a variation. An example I had a product that had two metal colors. One was multi-color black and the other was black. Under attributes, I deleted multi-color black. Then in variation, I deleted the multi-color black variation. I set the default to black that matched the variation I wanted to keep. Do not switch to a simple product, it will not sync. I saved it and it sync. To test it I set the count values to 1 and then updated it. It updated and matched what was on aliexpress.
 
Hey
I delete the ones I do not need for a variation. An example I had a product that had two metal colors. One was multi-color black and the other was black. Under attributes, I deleted multi-color black. Then in variation, I deleted the multi-color black variation. I set the default to black that matched the variation I wanted to keep. Do not switch to a simple product, it will not sync. I saved it and it sync. To test it I set the count values to 1 and then updated it. It updated and matched what was on aliexpress.

Hey @seattledude
I actually did the exact same method except I didn't set any default values. The testing method you used will only work if the product is still available on Aliexpress. What happen to me right now is, the product is no longer listed on Aliexpress. When this happens, update will not run properly. It will say product is no longer available but does not move to draft automatically.
 
I hope the dev team can add this functionality as so many people want to split out variations into single products. I haven't had any products go out of stock completely which is why I haven't hit that issue yet.
 
Quick question and I am not sure if this has been answered. But can you rename the variation? Example, I already have color as part of my other product that is not from aliexpress. Now I noticed that ali also uses color but some horrible names. I use color to filter by on my front end. Can I change the name on import? Or do I need to keep it as is? I do need to sync..
 
Quick question and I am not sure if this has been answered. But can you rename the variation? Example, I already have color as part of my other product that is not from aliexpress. Now I noticed that ali also uses color but some horrible names. I use color to filter by on my front end. Can I change the name on import? Or do I need to keep it as is? I do need to sync..
Changing names of variation is ok. You can do it at the import process
 
Yes, you can do it at import or of course after the fact. I need to change a few that I already imported as the color is, skeleton. I have no idea what that even means lol.
 

Direct Webstore

Well-Known Member
I hope the dev team can add this functionality as so many people want to split out variations into single products.
You'd have to write to the Woocommerce dev team for that. The Alidropship dev team have no control over Woocommerce.

However in the Original Alidropship plugin they do have control ... and it already has variation splitting functions.
 
However in the Original Alidropship plugin they do have control ... and it already has variation splitting functions.

That is kind of the point as this is an integration plugin end to end. It is something that should have been added. It is not a woocommerce dev thing as it is custom code on the way in, to the sync of the items on Aliexpress. The woo dev team cannot control that. Alidropship should cover this and they have everything they need to do it. If I could edit the code I would have given the fix, but it is obfuscated. They already have the store id, product id, variation name, etc.... All they need to do is map it in a table and on sync match the SKU, StoreID, VariationID (productId) and bam, sync even if it is split out. It is not that hard to implement. I bought two copies of this plugin as I was under the impression these features were already there. We should not have to have to do all these workarounds as this is marketed as an end to end solution.

I am still impressed with it's offering so I am not complaining, just giving an honest critic. I think the team here did an amazing job. But to make it even better, these are the types of things they should add to make this an enterprise solution.
 

Direct Webstore

Well-Known Member
It is not a woocommerce dev thing
I'm afraid it is. I wish it wasn't...but it is.

The woo dev team cannot control that.
They can if they wanted too ... but they are not going to bloat it out with every little function that some people want.

That's why there are Woo plugins. It's a modular system designed to have plugins for tailor made functionality. (Like the "Show Single Variation" plugin you mentioned above.) It's not an "all in one system" (like the Alidropship Original plugin ... almost) ... and I'm glad of that. I can pick and choose what functions I want rather than having a gigantic bloated dinosaur with every possible function on the planet slowly dragging itself through the swamp ... lol :)

But having said that ... I'd also like this particular function myself. Perhaps as an optional add-on. But in the meantime ... the manual method only takes an extra minute or two, and is only a pain in the arse for the initial importing of products to a new site. And even then it's not required for every product. Once that's done and you're only adding new products a few times a month ... it's not really worth stressing about.

:)
 
Last edited:
Top