Conditionally delete fields from the payment page in Woocommerce - wordpress

Good evening, I have a small problem with my website, I would need when you buy a product and select that the local pickup does not show some fields of the form such as province, postal address or city, if you select for example another shipment as free shipping if they appear. (I think it makes all the sense in the world and I think it's a mistake that it does not come pre-defined like this)
The website is made with Wordpress and Woocommerce, I have tried practically everything and there is no way to work, the functions that I have found here do not end up running any, I do not know if it depends on the theme (Flatsome) or the version of Woocommerce
Thank you very much for your time.
Greetings.

Related

How to show a widget only to customers who bought a product in WooCommerce (with Elementor)?

Here is what I am trying to do - a website with online courses using WooCommerce and Elementor. I want to have a page called "My Courses" where customers can see only the courses they've purchased.
I'm not using any LMS.
I will use the plugin Dynamic Conditions for Elementor to show or hide a widget.
I know that WooCommerce has a function to check if a user has bought a specific product.
I don't know how to make a connection between the two, though. That is my problem.
Dynamic Conditions uses Elementor's dynamic tags system to check against. How can I use the WC's function to check if the user bought the product and only if he/she did, then to show them the widget with the course page?
Thanks a lot for any answers with ideas or directions on how to solve this problem!
Using Dynamic.ooo you can benefit from "Visibility" extention (comes with Dynamic.ooo/ don't need seperate plugin installation) which allows you write your customized conditions (in PHP). I myself have not used the "Custom Condition" becuase I don't know much about PHP, but if you know the function and just need to connect them i think that'll do.

How can I ensure that only one instance of any product in woocommerce is sold?

I've been looking for an answer to this. Client has a woocommerce shop that will only ever have one of each product. What I need to accomplish is that when a product is added to their cart, the item is unavailable for anyone else to add the same product to a cart. I've tried the old plugin but it breaks portions of the front end, I've tried using several similar solutions I've found here, but nothing seems to do the trick. The plugin also made inventory management on the backend a total nightmare.
So, to walk you through, user A adds product A to cart. User B tries to add this product to cart but woocommerce says its sold out currently to user B. User A can checkout with product A or if user A closes the browser, woocommerce waits one minute and then puts product A back in stock so person B can then add product A to their cart.
I've been searching for this and have come up with nothing from here and some company claiming they can but it's done case by case and they want to handcode it aka very expensive to do.
Please, help!
Just an opinion here so maybe I am wrong, but woo commerce uses stock counts in the backend, so if this is set to 1, then there can only ever be one that can go through the checkout process unless cancelled.
The functionality to reduce that stock count to 0 whilst a user has that item in their basket (or just viewing the checkout page) is not feasible as they have not purchased, at that stage it is just showing intent to purchase.
As you mentioned, that functionality is possible, it wouldn't be pretty, but possible and not something that is available by default in the plugin. Development of such functionality would be needed, and you're right probably quite expensive for development time.

Credit Based Shopping on Wordpress

I'm trying to build a website that has items for sale by credits only. The credits would be entered for all users by an admin only (manually). And the items could be shopped on the site by users who would see something they want, they'd be able to see how many 'credits' they have accrued, and then build a cart and place an order by spending these credits. There would be absolutely no need for actual money, no shipping, just a notification sent to the admins that an order has been requested, who and what that order request is, and the 'credits' deducted from their account.
Can anybody point in the direction of the right direction to build something like this? I'm thinking Wordpress because I'm familiar with the dashboard and backend of it, but I'm not opposed to another CMS tool if there's a better one for this idea.
I don't believe WordPress has anything out of the box like this, but you can always search for a plugin that does what you are describing.
If there isn't one, you may consider installing WooCommerce and creating "coupons" instead. But I don't know if that would work for what you are talking about or not.

Is it possible to edit/customize php code in woocommerce cart and checkout page?

Specially wants to change functionality of those pages with custom coding.
Example: If any one ask for Buy two and get one free for similar category product, then what would be the best procedure to carry on. With out plugin need solution.
Well if you dont have much experience with woocommerce then i would suggest to stick with its default functionality.
Although "buy 2 get one free" kind of plugins would be perfect for this job but as you dont want to use plugins there is one more way. You can create a variable product. In your product page, mark it as variable product and then add variations to it. You can set one variation as "buy one" with a price of lets say $50, and make it the default variation and then add another variations "buy 2 get 1 free" with a price of $100. You can also add different images with each variation.
Now on your product page, you will be able to see a drop down (or if you like radio buttons you can use it too) with the default saying "buy one" with price of $50, and when some one clicks on the "buy 2 get 1 free", the price will automatically change to $100.
Yes, it is. The first step would be to get access to the relevant files. You can do that in several ways but the best way to go about it for your case will be to use an FTP client such as Filezilla. You can also access WooCommerce's files through the WordPress admin panel under Plugins->Editor. Bear in mind, however, that WooCommerce is a fairly massive and complex plugin and it will likely take considerable time and skill to locate the relevant files and code. Happy coding!

Woocommerce Coupons, Free product on order when code is entered. Possible?

So as the name suggests I would like to know if its possible to Have a coupon set up on woocommerce that when entered at the checkout it adds in a free product to the order.
Can this be done or is this something woocommerce could not handle.
If anyone knows of any plugins etc I would be extremely grateful
From your question, you are asking if there's a way for users to enter a coupon that when entered gives free products?
It is possible with Woocommerce, out of the box it has it's coupon management. You can even exclude products which is useful!
Read more about this here http://docs.woothemes.com/document/coupon-management/
It's very simple to get up and running!
I realize this question is old but figured I would point out there's a plugin available for rather cheap that can handle this. I'm not the author, nor do I use the plugin, but it should take care of this functionality:
http://codecanyon.net/item/woocommerce-free-gift/6144902

Resources