Automatically delete variations

roccocham

New Member
Hello!
When I delete one attribute and save it does not delete the variations associated with that attribute.
I really would like to delete automatically the variations associated with the attributes that i have deleted.
Any idea as to how I can do this for each product I want to change. Many thanks
 

chris37

Well-Known Member
Hello!
When I delete one attribute and save it does not delete the variations associated with that attribute.
I really would like to delete automatically the variations associated with the attributes that i have deleted.
Any idea as to how I can do this for each product I want to change. Many thanks

If you delete the attribute nothing is gonna work automatically in the product you do that,
1) You can rename attribute but not delete without problem in the auto - synchronized with aliexpress
2)You can delete variation but manual,( Anyway even our plugin don't automaticaly update the attribute and variation, if something change from the seller (aliexpress end) is gonna broke the connection for this product in your site and your stock in gonna set to zero 0 .

I wish this is clear enough ;)
 

the_lyall

Active Member
Even without questioning the reasons why you would want to do this, it is not currently possible in WordPress/WooCommerce to automatically delete variations associated with deleted attributes.

If you want to do that you would need to create some kind of custom function, although I would be careful as you could potentially accidentally break a load of products by deleting the wrong attribute and associated variations.
 

roccocham

New Member
Thank you friends for your coperation
My product range price have all prices of my variations, and I have three values of the Ship from attribute, I want to keep only China in order t show range price only of China Variations .
But when I delete US and Europe sela does not delete the others variations associated with US and Europe
of my case I will not break the synchronization of China.
 

roccocham

New Member
Oh no it's not possible, i have too many variations. I will wait for other members if they have an automatic solution
 

Mar

Moderator
Oh no it's not possible, i have too many variations. I will wait for other members if they have an automatic solution
There is no automatic solution. This function you are looking for never exist. The developers never think of it, the reason is why would a user want to delete an attribute in the first place? and want the variation associated with it deleted automatically. It is just unthinkable.
 

roccocham

New Member
this solution (manual) it is defined by default with woocommerce ? or alidropship which modified the functions of woocommerce so that they are deleted manually
 

the_lyall

Active Member
this solution (manual) it is defined by default with woocommerce ? or alidropship which modified the functions of woocommerce so that they are deleted manually

WooCommerce. There is no automatic deletion of variations as standard, it is not something that has been disabled by the AliDropship plugin.

Where I've needed to remove variations in the past (such as country of origin or 'colour' option which only had one choice) I've removed manually it at the point of adding the product, or shortly afterwards but I usually have less than a hundred products so it doesn't take long to do manually.
 

roccocham

New Member
WooCommerce. There is no automatic deletion of variations as standard, it is not something that has been disabled by the AliDropship plugin.

Where I've needed to remove variations in the past (such as country of origin or 'colour' option which only had one choice) I've removed manually it at the point of adding the product, or shortly afterwards but I usually have less than a hundred products so it doesn't take long to do manually.
you said you change taht it at the point of adding the product.
how are you going to do if you need rest product?
 

the_lyall

Active Member
emmm , if I uncheck "Used for variations" for ship from, will it break my connection?

If you remove the variation at all then it will 'break your connection' (by 'break your connection' I mean that you won't be able to automatically place the order on AliExpress - it will get as far as adding the product to the cart and won't be able to select the options, so it will ask you to continue the order manually and will open the order in AliExpress in a browser window for you to choose the right variations).

There are two other ways that I'm familiar with:

  1. Choose a product from a different supplier which doesn't have the extra option (not always possible)
  2. If the option only has one choice, set that choice as the default for the variation (i.e. so it's pre-selected when the page loads) and then use CSS to hide it so it doesn't show. The user will be selecting it without knowing. HOWEVER the option will still be visible to them as the product attributes in their cart, order details etc.
 

the_lyall

Active Member
you said you change taht it at the point of adding the product.
how are you going to do if you need rest product?

There used to be a way to remove them before adding the products in the Chrome plugin, but now it's not there. I can manually remove the variation, but that means I can't reset the product and I can't automatically place the order on AliExpress. So usually I find a different product.
 

roccocham

New Member
There used to be a way to remove them before adding the products in the Chrome plugin, but now it's not there. I can manually remove the variation, but that means I can't reset the product and I can't automatically place the order on AliExpress. So usually I find a different product.
Ah I understood well, so you have no idea to change my problem by php function from woocommerce!
 
Top