Increase price depending in product variation (woocommerce) - woocommerce

Is it possible to make a product variation change the price?
For example I have a basic product and variants of it:
Quantity
-- 10
-- 20
-- 50
Color
-- Blue
-- Red
Project
-- Yes
-- No
I have prices for quantities, no matter for what color. But I would like to increase the price if you check "Project - Yes" and donĀ“t change anything, when you select "Project - No".

That can be done on your product data settings.
in this image, variation #23, I have set the price to 20. Then on #360, I've set the price to 40.
This just means, [Color Black][Project - Yes] combination will have a price of 20. And [Color Black][Project - any other values] will have a price of 40. Try to play around with the prices on Variations.

Related

Pinescript, financial(FLOAT_SHARES_OUTSTANDING) value is different than its corresponding float shares screener value

in my script I plot the symbol float shares with the classic financial method:
floatShares = financial(syminfo.tickerid, "FLOAT_SHARES_OUTSTANDING", "FY")
For some symbols, it is different than its corresponding float shares value in the screener.
Here is an example from FUTU:
Why this happens and how to fix it?
In the screener you look on Total Shares Outstanding. Float Shares column caption is FLOAT.
Screener shows value of float shares for today / yestaday.
In your pine script there are you request Float Shares with FY periodicy, i.e. Float Shares at end of last fiscal year.

Why decrease new users show green positive google analytics

When i compare 2 time period, if there is decrease - does the % have to be red and negative no?
example
1.389 users in the selected time interval compared to 1.260 users of the previous period.
An increase of 10.24% compared to the previous period. There is nothing strange.

Woocommerce product price calculation based on area and perimeter dimensions

Please advise what plugin would be suitable for the following calculations below:
Product Rectangle:
a = length
b = width
p1 = price per sq m (area)
p2 = price per m (perimeter)
Calculation based on the total area of product a x b x p1 = x
Calculation based on product perimeter (2a + 2b) x p2 = y
Total price = x + y
WooCommerce Measurement Price Calculator is a great plugin but unfortunately can not be set in order to add two Prices based on two parameters. It is possible that this calculation can be achieved by another plugin? Maybe other then WMPC or Gravity Forms?
I don't think there is a plugin that does that specific set of calculations. I would recommend thinking outside the box a bit. If I were trying to accomplish this, I probably would use the Price Calculator plugin and use the Composite plugin. Then setup a single, hidden, product for each calculation you're looking to do. Then setup the composite product to include both. That way you can calculate the individual product equations and then have the grand total be calculated in the end. To me, that would be the simplest solution.
Even though this is an old post I think the Plugin Product Price by Formula for WooCommerce might be a possible solution.
The short Documentation on the Product page is very good. Pro version is not needed for many use cases. You could use the following formula:
([product_width]*[product_height]*p1)+((2*[product_width]+2*[product_height])*p2)
[product_width] and [product_height] are just that.
p1 and p2 can be defined as parameters in the plugin's settings / formula editor.

Star / half star rating function without if/then logic?

The question is, is there a straightforward mechanistic way to know which stars (gold, 1/2 gold, grey) to draw without using conditional logic, for example using a pointer to the correct star based on the result of a simple math function to generate star ratings in a five star display.
The point of this question is not Ratings Systems, but graphic display
I have a rating value of 0-100, floating point.
For example, in pseudocode:
bitmap1="http://myserver.com/goldstar.png"
bitmap2="http://myserver.com/halfstar.png"
bitmap3="http://myserver.com/greystar.png"
rating=89.003
possible=100
quantized=int(rating/possible)
imagearray=[bitmap1,bitmap2,bitmap3]
for i=0 to 4
selector=<compute which star to draw based on available data>
drawstars(25*i,100,imagearray[selector])
end for
Hopefully that will give you an idea of what i'm trying to do.
Think of the display as a scale, but in integers, so work in half stars. For example, if we have 5 stars, and can display half stars, our real scale is from 0 to 10. So, what we need to do is divide the original scale (0 to 100) down to give us 0 to 10. Then we do integer division by 2. The quotient of that will give us the number of complete stars to draw, and the remainder the number (0 or 1) of half stars to draw.
You may want to do some rounding first though -- otherwise, a rating of 5 stars will be essentially impossible to get (e.g., even an input score of 99 will still only give 4.5 stars).
Hm, if I were to take a stab at it...
In the for loop, go from i=1 to 5.
if (rating > i*20){ draw a gold star }
else{
if (rating > (i-1)*20 +10) {draw a half star }
else {draw a grey star}
}
This of course would give you the floor rating

Sliding bar calculator?

This website, http://www.ukgoldrefiners.co.uk/ under the top right window "HOW MUCH IS GOLD WORTH?" there are three sliders that estimate what the current gold price is. Its obvious it uses a formula that multiplies the weight of gold by the current gold price (taken from and external source) of the various carats.
If I manipulate this for my own project :-
I have three or more sliders and I can select a value between 1 to 100 and the live number is an average of all the numbers on the slider. e.g
Rating 1: 1-------|--100 (70)
Rating 2: 1-------|--100 (70)
Rating 3: 1-------|--100 (70)
So the average would be 70 and if I manipulate the slider it would change the average number.
My question would be what would this be called? What would I use to make this, JQuery, Java, HTML? Is there any resources?
Click here for an excellent jQuery slider. I've used it before and it includes lots of functionality for event functions such as change which you can use to do your calculation.
Your html would look something like:
<div id="slider1"></div>
<div id="slider2"></div>
<div id="slider3"></div>
<div id="average"></div>
And you would initialize each of the slider div's with something like this:
$("#slider?").slider({
change: function(event, ui) {
//average out the values of all 3 and set the value of 'average' to the averages.
}
});

Resources