I am trying to calculate total price of any configurable product in magento 2,and I am struggling with it.
Suppose I have two dropdown attribute as following,
1. Paper size
Option Price
A4 1$
A3 2$
2. Color option
Option Price
black & white 1$
colored 2$
Result would have been something like:
If someone selected,
paper size = A4
color option = black & white
total price = 1+1 = 2$
If someone selected,
paper size = A4
color option = colored
total price = 1+2 = 3$
lly,if,
paper size = A3
color option = colored
total price = 2+2 = 4$
But the total price looks something different than i have expected. And there would be more dropdown attribute like this.
Did i make something wrong ? Is there any better way to do it.
Good day !
You can use Bundle product for your requirement.
Steps are:
1. Create a new bundle product
2. select ship bundle item option "together"
3. click "create new option" then "add products"
4. select the products you want to add to the bundle
5. save the product
Related
I am trying to create visualizations for recent commonwealth medal tally dataset.
I would like to create a grouped bar chart of top ten countries by total number of medals won.
Y axis = total
x axis = Country name
How can I divide totals into three bars consisting of no of :
gold, Silver,Bronze medals won by each country?
I created one using excel, but don't know how to do it using seaborn
P.S. I have already tried using a list of columns for hue.
df_10 = df.head(10)
sns.barplot(data = df_10, x = 'team' , y = 'total' , hue = df_10[["gold" ,
"silver","bronze"]].apply(tuple , axis = 1) )
Here is the chart that I created using excel:
enter image description here
To plot the graph, you will need to change the dataframe to the format that will allow for easy plotting. One of the ways to do this is using dataframe.melt(). The method used by you may not work... Once the data is in a format that seaborn understands easily, plotting will become simple. As you have not provided the format for df_10, I have assumed the data to have 4 columns - Country, Gold, Silver and Bronze. Below is the code...
## Use melt using Country as ID and G, S, B as the rows for values
df_10 = pd.melt(df_10, id_vars=['Country'], value_vars=['Gold', 'Silver', 'Bronze'])
df_10.rename(columns={'value':'Count', 'variable':'Medals'}, inplace=True) ##Rename so the plot has informative texts
fig, ax=plt.subplots(figsize=(12, 7)) ## Set figure size
ax=sns.barplot(data=df_10, x='Country', y='Count', hue='Medals') ## Plot the graph
I am using working on Tableau stacked bar chart.
The bar chart represents the total %. Therefore, the length of bar chart is equal.
Now I would like to sort the dimension (referee) based on the values of legends ( highest to lowest).
can anyone suggest me how to do it.
I also attached the packaged workfile here
Here is the picture of sort screen;
Level of data source below:
Below is the screen shot based on the final answer provided:
Thanks,
Zep
So to get this you first need to get a calc field that gets the win %:
SUM(IF [FTR] = 'AWins' OR [FTR] = 'Hwins' THEN 1 END)/COUNTD([Game ID])
This can then be used to rank the referees:
Now the reason that it may not be working for you with your technique is that you're sorting on COUNTD(Wins) which is the total number of wins, not the percentage wins for the ref. So someone that has just played more games may come up higher in the rank
Now you have the calc field, you can go back to your report and sort on the new field:
I rearranged the legend so you can see that the ref with the best % wins are shown first (red and blue bars)
If you don't want it sorted by win %, then change the calc field to:
SUM(IF [FTR] = 'AWins' OR [FTR] = 'Hwins' THEN 1 END)
For the COUNTD of games, if you only have the date and the game available and want to create an ID from that that is unique, create a calc field like this:
game-date-id = STR([game]) + STR(' ') + STR(date)
This will then be used in your COUNTD if statement:
SUM(IF [FTR] = 'AWins' OR [FTR] = 'Hwins' THEN 1 END)/COUNTD([game-date-id])
I have attached the picture of the dashboard.
I want to sort the referee based of Hwin
Yeah. It did not work out as expected
I have a bar chart in SSRS that has one category group and no series groups. What I would like to know is if there is any way I can have each category show up as a different color, rather than all of them being a single color like SSRS wants to do?
The only way I know of to do this is to hard code the colors for each category in the Values' Properties -> Fill tab -> Color expression:
=IIF(Fields!DISPUTE_TYPE.Value = "Duplicate", "Red",
IIF(Fields!DISPUTE_TYPE.Value = "Eligibility", "Orange",
IIF(Fields!DISPUTE_TYPE.Value = "Corrected billing", "Green",
IIF(Fields!DISPUTE_TYPE.Value = "Additional information - Records", "Blue", "Yellow"))))
The downside is that you have to account for all values else they'll use the last "default" value (yellow in this code).
You could number each type in your query and use that number in a formula to create colors.
I have two attributes in my Admin: Color and Size.
This attributes haves this configuration:
Scope: global
Catalog input type: Drop down
Apply To: all
Use in layered navigation: Filterable with results
And I have configurable products that haves simple products. For example:
CONFIGURABLE: MY T-SHIRT
SIMPLE 1: MY T-SHIRT with Color = White and Size = L
SIMPLE 2: MY T-SHIRT with Color = Black and Size = L
CONFIGURABLE: MY OTHER T-SHIRT
SIMPLE 1: MY OTHER T-SHIRT with Color = White and Size = S
SIMPLE 2: MY OTHER T-SHIRT with Color = Black and Size = M
But I cant't see filter by "Color" or "Size" in layered navigation. I just can filter by price and subcategories.
Why are those attributes not appearing in my layered navigation?
Could possibly be one of these causing the problem:
The category is not set to be anchored. Go to the category in the admin area and go to the 'Display Settings' tab. Make sure that the 'Is Anchor' option is set to yes.
The attributes are not in the correct attribute set for the products in the category you are viewing
The products in the category do not have values for those attributes
I am struggeling with Magento custom options.
In Magento you can add custom options at a Simple product. With this option an attribute like "color" can be added. Before the customer want to add the product to his cart, he first select the custom option "color". The price can change at every color.
But the options are very individual. I want the options are dependent on each other.
Something like this:
lenght = 100cm -> wood type: 1 = 120 euro total-> color: green = 140 euro total
-> color: grey = 150 euro total
wood type: 2 = 130 euro total-> color: green = 150 euro total
-> color: grey = 160 euro total
lengt = 120cm -> wood type 1: = 130 euro total-> color: green = 160 euro total
-> color: grey = 170 euro total
wood type 2: = 140 euro total-> color: green = 180 euro total
-> color: grey = 190 euro total
A store that I know that use it is:
http://www.zelfbouwmeubels.nl/tafels/eettafel/
And then select "SAMENSTELLEN".
Do i need an plugin for it or is there an default functionality in Magento.
Consider using a configurable product instead of a simple product, and download a module that will use the selected simple product's pricing. Then you can individually manage each length/wood-type/colour option as an individual SKU and charge different prices for each.
Configurable products:
http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-configurable-product
Module to do what you want:
http://www.magentocommerce.com/magento-connect/Matt+Dean/extension/596/simple-configurable-products