Woocommerce reuse values in variable products - wordpress

I hope someone can help me with this :)
I will be selling a product that has 10 variables, but all the choices need to be the same for all, how can I add and reuse the values once instead of copying and pasting values 10 times?
What I will be selling is a 10 meal bulk package and each meal needs the
same choice values.
Picture of what I'm trying to achieve here
Thanks for any help in advance :) Scott

I have 3 different products, 5 meals, 7 meals and 10 meals in which the customer can choose their own meals, the attribute values will also be changing weekly. which at the moment I am pasting in new values 22 times in the edit product.
If I delete and duplicate the product I lose the URL
When I go to Products > attributes still the same making 10 attributes like meal 1, meal 2, meal 3 etc I can't duplicate them and have to do it all manually up to 40 times with new values.
[Picture Front end here]
(https://dl.dropboxusercontent.com/u/61411490/Screen%20Shot%202015-09-17%20at%2009.33.32.png).

This is a very late answer, but I have encountered the same issue and my solution might be of interest to the next person who happens on this question.
I am using WP All Import and the Woocommerce extension (both free, but variable products require a license) to maintain product details in excel. Updating data on the website is as easy as uploading a new CSV. Keeping data in sync in an excel file, with references, formulas, etc. becomes much easier, and you can often completely factor out duplicate data.
Instead of using Woocommerce's variable products, I created each version as a simple product and linked between them.

Related

Multi Store with Subdomains

I want to create multiple online shops for selling merchandise products for companies. The products are basically identical but should be personalized in dependence of the company I am building the shop for. Because I do not want to build a new shop every time a new company joins the program I am looking for something like that:
www.myshop.com : One shop with the underlying product database and checkout system - not showing any products, just as a parent structure
www.company1.myshop.com : A slightly personalized shop where only a selection of the product catalogue is available
www.company2.myshop.com : A slightly personalized shop where a different selection of the product catalogue is available
Do you get it?
Does anybody know a tool for that?
Thanks in advance!
I already looked into WooCommerce, Shopify and even WiX. As far as I understood what I am looking for is not supported.
Since your example is based off of subdomains, you can choose to assign a Shopify store to each subdomain. Each store feeds from your inventory and accounting, giving your customers the illusion of a custom experience. Or you can just simplify your life, have one store, and assign your customers to view collections specific to them. That is the smart move. You may not like that, but it would work a peach for you. You just tag customers to see their specific collections, of products specific to those collections. Simple.
I can also think of a dozen other ways to pull this off with Shopify, but that is me, not you. For an opinion question like this, SO is not the right place to ask these kinds of questions, but I answered anyway. Your mileage may vary of course.

Track the quantity of optional services for the products woocommerce

I am trying to solve a dilemma that has been gripping me for several weeks. I will try to explain the problem in the best possible way. I have a website that allows you to request a quote for a cycling tour, choosing the route and optional services. The structure is that of a classic woocommerce product but bookable through the "booking for woocommerce" plugin. I added the "add-ons for woocommerce" plugin to be able to insert optional services within the product, including the possibility of renting a bicycle between two possible models of bicycles. The problem is that I don't have a stock of the bikes that are booked every time. If I only have 5 bikes and one person books a tour for 6 participants and adds 3 bikes, then another person books for 4 participants and adds 2 bikes, then another person can continue adding bikes because there is no warehouse that keeps track of these bikes.
Anyone have an idea how I might structure this thing? I can't really resolve. Thanks in advance.
Url of a single tour: https://www.abybike.it/escursioni-brevi/capodorlandonaso-interagiornata/

Woocommerce reduce inventory programmatically when related variation is purchased

Ok, will do my best to explain the problem.
I am selling limited edition prints on my site. They come in multiple sizes, and they also come framed and unframed.
Right now, I set up each product to have 2 attributes: size & frame.
Within the variations, I have 4 options
11x17 unframed
11x17 framed
20x30 unframed
20x30 framed
The problem occurs with the inventory. There are 10 total 11x17 prints, but since I have to enter a stock quantity for each variation, I have to do something like this:
11x17 unframed 10qty
11x17 framed 10qty
Which makes it seems as though there are 20 total prints, instead of 10.
Ideally, I'd want to keep inventory based on attribute, not variation, but there doesn't seem to be a way to do that.
I am unable to set up the Frame as an add-on product because the cost of the frame goes up, as the size of the print goes up.
I am wondering, if there is a way to programmatically reduce the stock of other variations, when one variation is purchased. So, when someone purchases the "11x17 unframed", the "11x17 framed" stock is reduced -1 at the same time.
All of the products on the site are exactly the same, so I wouldn't mind hard-coding the specific variation names in the code.
Not sure if something like this is doable, but I would hugely appreciate any insights.
This is the closest example I could find to customizing how stock is handled:
Reduce WooCommerce Item Inventory By Attribute Value
Thanks in advance,
Jenny

Woocommerce SKU or id?

I've been handed over a woocommerce website and a majority of the products are missing a sku number.
What would be the best way to go about updating products without a sku number?
Also keeping the skus unique?
Best practice for SKU's is to use small, (mostly) meaningless codes with a uniform fixed length and pattern.
So suppose you sell less than 1000 products, take a code of 5 characters. And assign the codes automatically using a script:
10001 first product
10002 second product
etc
How these codes should be generated depends on you (business) domain model / woocommerce configuration (using variants yes/no). For inspiration see this project: https://github.com/tamarazuk/woocommerce-product-sku-generator

Trying to build a 'random text' WordPress plugin. No idea where to start

Here’s what I’ve done in a spreadsheet:
I’ve assigned people to one or more categories (ie. male, female, tall, short)
I’ve assigned weights to these people (ie. 200 lbs, 120 lbs, 300 lbs)
I’ve assigned names to these people (ie. John, Jane, Bill)
Here’s what I need to do in a plugin:
Find some way to get my data into it (maybe through an admin interface, or via my spreadsheet)
Filter results by one or more categories (ie. only male; only tall + female, etc)
From those filtered results, pull 2 or 3 people (as many as I can fit) whose combined weights equal X or less
Display the names of those 2 or 3 people as a list to front-end users
At the press of a button, randomly generate another 2 or 3 person team
I don’t mind getting my hands dirty, but I don't know where to begin. If you guys could give me any advice, best practices, code to get me started, or names of plugins that already do this, etc, I’d really appreciate it.
Also, if I’m biting off too much for a complete noob, feel free to let me know. Because if it comes down to it, I’ll just create the teams manually and throw them into a random text plugin, or something.
This depends heavily on what format it's in presently. If it's in a spreadsheet, you can import it pretty easily by saving as a CSV and processing it with fgetscsv
Assuming this is going into MySQL (as most WP plugins do), this is just a SQL query (ie WHERE wp_custom_person_record_weight > 100 AND wp_custom_person_record_name != 'Bill'
Same as #2 but with a JOIN and a SUM and a WHERE query against that sum.
This is the same SQL query, if you call it through mysqli_query you'll get an array back that you can output on the page
Random records can be gleaned a number of ways, either by going through a limit of X,2 where X is a randomly generated number between 0 and the # of records or through MySQL itself (although that is not recommended for performance reasons).

Resources