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
Related
I am struggling to come up with a formula that fits certain criteria and was hoping someone with a better math brain than me might be able to help. What I have is a Google Sheets based tool that determines how much a someone has purchased of a product and then calculates the amount of times a special additional offer will be redeemed based on the amount spent.
As an example, the offer has three tiers to it. Though the actual costs will be variable for different offers let's say the first tier is gained with a $10 purchase, the second with a $20 purchase and the third with a $35 purchase (the only real relationship between the prices is that they get higher for each tier but there is no specific pattern to the costing of different offers). So if the customer bought $35 worth of goods they would get three free gifts, if they bought $45 worth they would get 4 and then an additional spend of $5 (totaling $50) would then allow them to redeem 5 gifts in total. It can be considered like filling a bucket, each time you hit the red line you get a new gift, when the bucket is full it's emptied and the process begins again.
If each tier of the offer was the same cost (e.g. $5, $10 and $15) this would be a simple case of division by the total purchase amount but as there is no specific relationship between the cost of the tiers (they are based on the value of the contents) I am having trouble coming up with a simple 'bucket filling' formula or calculation method that will work for any price ranges given to it. My current solution involved taking the modulus, subtracting offer amounts from the purchase amount etc. but provides plenty of cases where it breaks . If anyone could give me a start or provide some information that might help in my quest I would be highly appreciative and let me know if my explanation is unclear.! Thanks in advance and all the best
EDIT:
The user has three tiers and then the offer wraps around to the start after the initial three are unlocked once, looping until the offer has been maxed out. Avoiding a long sheet with a dynamic column of prices would be preferable and a small, multicell formula would be ideal
What you need is a lookup table. Create a table with the tier value in the left column, and the corresponding number of gifts for that tier value in the right column. Then you can use Vlookup to match the amount spent to correct tier.
I am not quite sure about, everything into one entire formula(is there a formula for loop and building arrays?)
from my understanding the tier amounts are viable, so every time you add a new tier with a new price limit then it must be calculated with a new limit price number...wouldn't it be much easier to write such module in javascript than in a google sheet? :o
anyways here is my workaround, that may could help you to find an idea
Example Doc
https://docs.google.com/spreadsheets/d/1z6mwkxqc2NyLJsH16NFWyL01y0jGcKrNNtuYcJS5dNw/edit#gid=0
my approach :
- enter purchases value
-> filter all items based by smaller than or equal "<=" (save all item somewhere as placeholder)
-> then decrease the purchases value by amount of existing number(max value) based on filtered items
-> save the new purchases value somewhere and begin from filtering again and decreasing the purchases value
(this needs to be done as many times again, till the purchases is empty)
after that, sums up all placeholder
I am struggling to get composite products to display the way I want in this situation. I am also using product bundles.
Basically I want to display dumbbells for sale on a page, I need an option to either buy them individually (1kg, 2kg, 3kg... 10kg, not a problem) or two options to buy sets containing 6 (1kg-6kg) or all 10 of the individual dumbbells for a fixed price.
I have got very close using product bundles but even with the fixed price for the set it still creates a dropdown box to pick a specific dumbbell and whatever is picked has no outcome because the price is fixed. This is confusing for the customer so I just need that drop down box not to appear, any ideas on how to structure it?
I need the stock of individual dumbbells (for example the 1kg-6kg set) to each decrease by one if the set is purchased.
I'm attempting to emergency-revamp my print company's website after the guy "developing" the site for me simply disappeared off the face of the planet last week, leaving me with no site and potentially countless thousands in lost revenue (not happy isn't close). All goes well until I came across this issue and for the life of me I can't find any answer's anywhere to it:
Creating a tabbed table containing sizes and prices in Wordpress... easy (this is not a stereotypical pricing table)
Integrate woocommerce into the chosen theme...easy
Now, making each price an individual "add to cart" button - major rage quit imminent.
I have no interest in making a product for every single conceivable variation as it's simply not necessary should I be able to get the tabbed table working as described. Having to do so would probably give me heart failure as I would then have to create yet more un-necessary graphics. My customers just want to be able to see the price, click the price (and thus "add it to cart"), purchase, done.
Here's the tabbed table in question in case everything I've just type makes zero sense: http://www.protradeprinting.com/canvasprints/
ANY suggestions would be a big help.
I have been searching for this all over the internet, but haven't came up with the solution just yet.
On my Drupal 7 installation I've happily used Ubercart for a while now, but I'm going to sell software from now on.
I'd like to use attributes to change the price based on the amount of computers and licence experiation date (years from now).
The prices don't always rise the same way, so I can't set an increase of 10% with every year.
I'd like to fill out a price table and when the user makes his choice, he gets the price right.
This is the website I'm talking about (example product): https://www.xsbyte.com/catalog/73
It seems not possible to do this, you could fill out a new price for a new object, or could just make a new product, but that was not what I was looking for.
I ended up using WooCommerce (Wordpress) and integrated both systems, so customers get features like single-logon and shared customer address and payment details (if applicatable).
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).