How i can hide attribute "Ships From" in product page

Status
Not open for further replies.

Arnaldo

Active Member
You should delete this option (Ship from" when importing products subsequently. For products already added/published, edit item (product). Under product options, select Attributes and hit the delete icon for "Ship from".

But if you do this way, you will lose stock synchronization ;-) A no go for me, personally.
 

Arnaldo

Active Member
Really? Have you tested a stock update between days to see if it really updates stocks accordingly? I have scratched my head around this many days.

But still what I don't get with what you said is: on Aliexpress stock quantities only appears if you select these ship from variations.
So back in woocommerce, if they don't appear anywhere as attributes i don't see how stocks can be updated on our site.

Some product pages make the global stock appearing, others only appears if you tick all the boxes (size, ship from, material, color, etc...) So i guess it also depends on the page.

Ex: some product have 10 color variations.

Also on the page all share the same unique size like "45 cm"

If you tick one color variation without doing the same for size (or metal or whatever that unique useless variation is)
Stocks will never appear.

Also if you have 2 ship from variations it complicates even more the issue.
 
Last edited:

Arnaldo

Active Member
Also i imagine you have to deleted these variations at import stage when you first import the product.

But how do you manage this afterwards in woocommerce?

I tested many times that if i deleted these attributes on woocommerce, i completly lose stock sync update.
 

Arnaldo

Active Member
I guess there is confusion on one point:

On Woocommerce, if you don't want to see these variations you have 2 ways doing it:

1) delete the attributes

2) hide attributes (untick "used as variation")

I just hide them, not delete them.

I tested deleting them and stocks didn't update, like between 2 days a product was sold on Ali and on my site the quantity remained unchanged.

I may be wrong but I pretty sure it works like that.

Can someone from the staff @Victoria Kudryashova @Ekaterina Sayapina @Igor or @Yaros can provide a definitive answer to this "hide variation" issue, please?
 

luxatrel

New Member
Yes, I am able to update stock after deleting the "Ship From" attribute. Wherever you decide to purchase/ship the product from is up to the dropshipper. The delete function simply gives you the option to "hide" that information of the product from the customer but the product stock still updates with the supplier as per the update frequency you set in your settings
 

Arnaldo

Active Member
Thanks for your input, but any clear answer from the developer is more than welcomed here... I'm still very doubtful.

please @Victoria Kudryashova can you explain once and for all and make a definitive statement on how your software is supposed to work with such pages.

The question has been asked hundred of times and we still debate it...
 

Victoria Kudryashova

Administrator
Hello, as it was said before somewhere in this Forum , you can't delete the whole attribute on AliDropship Woo plugin, because it will effect update. You can only hide it or rename.
 

Arnaldo

Active Member
Ok thanks Victoria, so that's what I thought Any plan to put this detail info in the ressource center for newcomers? This will aleviate the forum a lot lol Look how many of us asked the same question (including me).

Thanks.
 

anstoyanov

New Member
Guys, what do you think about this solution - https://catapultthemes.com/display-stock-variations-unavailable-woocommerce/
Instead of deleting, hide/disable variation when out of stock for let's say USA or other variation. This way when eventually this ships from gets the stock in, this will automatically be enabled when site is being synced with aliexpress...i tried it with my demo site and it still shows all the options, but disables all who are out of stock.
 

Arnaldo

Active Member
Guys, what do you think about this solution - https://catapultthemes.com/display-stock-variations-unavailable-woocommerce/
Instead of deleting, hide/disable variation when out of stock for let's say USA or other variation. This way when eventually this ships from gets the stock in, this will automatically be enabled when site is being synced with aliexpress...i tried it with my demo site and it still shows all the options, but disables all who are out of stock.

Basically it is already what alidropship woo does

But it won't hide variations like "ship from" usa or china.

Check the method I found to hide these that keeps stock sync with Aliexpress.

If someone has better solution I'm still interested.
 

JasonP

Member
You should delete this option (Ship from" when importing products subsequently. For products already added/published, edit item (product). Under product options, select Attributes and hit the delete icon for "Ship from".


I'd be careful about deleting "Ship from" option when importing. I did that for a couple of variable products but when they were imported into my store, they all became simple product. A better solution would be to just import the shipping option and then do like what @Maxx suggested: just untick "use for variations".
 

Direct Webstore

Well-Known Member
OK, I guess I don't understand all of these "workarounds" to get something to work that is already a core function of the software that "should already be working"
Actually it IS working ... but some of us don't like the "way" it is working and want to "customise" it. If you just leave it the way it is ... you'll have no problems. As you gain more experience you will probably want to step outside of the "off the shelf comfort zone" and do a bit of customisation yourself. But until that day comes ... you can safely use it the way it is. :)

Why is this thread still going? Support should have already been in here and fixed the issue
Basically because there isn't really any issue to be "fixed". Only "customised" for people who wish to customise it ... that's why the thread is still going.

Besides ... it's really the Woocommerce developers domain ... not the Alidropships. The Woocommerce developers have no idea that some people would be embarrassed about the shipping location being displayed ... lol :)

Yes, support team documenting this workaround would have been good and welcomed indeed, but it's a core Woocommerce feature, not Alidropship.
Exactly. :)
 
Last edited:

Direct Webstore

Well-Known Member
Anyone has found a solution? Clients don't need to know where it comes from. I use the woocommerce plugin... it has an option to not show on product page but still shows up... not sure why... please help
There is a "tick" box (as you all know) to hide the attribute from your product page that does absolutely nothing! Why Not? Also not working is the option for a dropdown box with the product options, I tick this, preview, looks great, "save attributes", and it reverts back to the defaults. Why is this?
Untick BOTH ...

- Visible on the product page
- Used for variations

You can still select the shipping origin when you process the order.
 
Last edited:

MisterMay

New Member
OK, I have found a solution that works for me, but it does require a bit of simple coding.

Firstly, you need to create a child theme, as any changes you make will be lost if there are any woocommerce or theme updates. It's a fairly easy thing to do, and there are plenty of youtube tutorials on the subject. Once you've created your child theme, make sure it is activated in the wordpress theme admin (you will need to keep your original theme installed, but don't activate it).

Second, you need to copy over a file from your woocommerce folder to the child theme. The file you need is called variable.php and is located in;

wp-content/plugins/woocommerce/templates/single-product/add-to-cart

Paste this file into the following folder (you will need to create the folders if they do not exist);

wp-content/themes/your-theme-child/single-product/add-to-cart

Next, go open the variable.php file located in your child theme with a code editor (most hosting services allow you to do this within their control panel). Locate the following line of code;

<?php foreach ( $attributes as $attribute_name => $options ) : ?>

Directly under this line, paste the following piece of code;

<?php
if ( $attribute_name == 'Ships From' ){
continue;
}
?>

Then save the file. This is all the coding you need to do.

What this will do is keep the attribute live, but hide it from view. You will not need to change or remove any of the attributes or variations in your product page, but you will need to set your 'Ships From' default setting in the variations to the country of your choice (e.g. China). Customers will only be able to see and select the other options that are available (e.g. size, colour, etc), but the 'ships from' option will be hidden from them and will be set automatically when they add to cart.

Because we are not changing any of the attributes or variations in the product's admin page, all stock and price changes will be updated automatically when synced.

I know it may sound a little daunting, but this is a one time job that will save hours of tweaking and playing around with attributes and variations for every single product. It has definitely worked for me.

Hope this helps, and let me know if there is anything you don't understand.
 

Direct Webstore

Well-Known Member
Great! It does :)

UPDATE:
The BEST solution as far as I'm concerned.

:)

Have to take that back as I just tried it and it does not work.

I set China as the default location but the "Ship from" variations still show up. Cleared all caches and refreshed the page several times as well. The code snippet has been copy/pasted 100% correctly and 100% correctly placed ... not in a child theme... but in it's original location. (Just for a test) Simply does not work. With Flatsome theme at least.

hs.jpg

Back to unticking these two boxes after selecting the default "Ships from" location ...

- Visible on the product page
- Used for variations

will save hours of tweaking and playing around with attributes and variations for every single product.

Only takes an additional 3 or 4 seconds to untick those two boxes.

But if it works for your theme ... lucky for you. :)
 
Status
Not open for further replies.
Top