angelistudio Posted August 16, 2014 Share Posted August 16, 2014 (edited) Hi, I'm trying to achieve this: I have two attributes, material (silver, gold) and size (80, 90, 100)Changing the material attribute would impact on price for every size range.It's easy to say, but not easy to do (for me, at least...) how can it be done? ...thanks! Edited August 20, 2014 by angelistudio (see edit history) Link to comment Share on other sites More sharing options...
Naldinho Posted August 17, 2014 Share Posted August 17, 2014 My store requires this. I have multiple attributes that have an impact on price but that impact is also impacted by other attributes. I assume this is also your problem? Basically going from silver to gold would increase the price more for larger sizes. The way to do it is to use combinations generator then individually adjust the price change for every generated combination. If you only have two materials and three sizes that is not a problem since you get six combinations and that is easy to edit. My products have 100 to 300 combinations so I found that it was taking a lot of time to edit them manually. My solution was to create a price list using formulas in a spreadsheet then outputting that as a CSV file. This way I can update prices really quickly. If you have products where you end up with 3 sizes, 4 metals, and 6 types of stones where all 3 attributes impact each other then I suggest the more advanced way and I'll be happy to write it out in greater detail. For six combinations though just do a manual edit. 1 Link to comment Share on other sites More sharing options...
angelistudio Posted August 18, 2014 Author Share Posted August 18, 2014 (edited) Naldinho, thanks a lot for your reply! Simple and effective solution, and most of all it works like a charm! You're right, for a few combinations you can edit records manually. But, as you may think, I tried to simplify in my previous post. I have 40 different sizes (80, 90, 100..etc) and 4 different materials, for a basic example, let's call them 1)wood, 2)silver 3)gold 4)platinum. The basic price for a wooden item is 300. For other materials the basic price is the same for all three: 378 If a user chooses a different size for the wood option there's a price increase (size 90 = + 5 euro --- size 100 = + 7 euro) while If a user chooses a different size for the others materials, there's another price increase - the same for silver, gold and platinum (size 90 = + 9 euro --- size 100 = + 15 euro, etc) So, in this case, I think your second approach would better fit. Could you please explain the more advanced way you're currently using? Marco Edited August 18, 2014 by angelistudio (see edit history) Link to comment Share on other sites More sharing options...
Naldinho Posted August 18, 2014 Share Posted August 18, 2014 Happy to. It will be a lengthy post so I will respond this evening when I have more time. Link to comment Share on other sites More sharing options...
angelistudio Posted August 19, 2014 Author Share Posted August 19, 2014 ..thank you for your time and patience. Link to comment Share on other sites More sharing options...
Naldinho Posted August 20, 2014 Share Posted August 20, 2014 (edited) Sorry I was busy yesterday but here goes. The first thing I would do is download the sample Combinations.csv file just to get familiar with them. You can find the sample in your PrestaShop backoffice Advanced Parameters -> CSV Import it is on the right hand side. When you download the sample don't open it. Instead what you want to so is open a new Excel sheet and then import the CSV as data from a text file choosing delimited semicolon and the first cell of the sheet. This is what you are going to create and keep on your computer for each product and it will allow you to upgrade prices quickly after the initial setup. 1) The first step is creating your own Combinations CSV. The first step of that is creating the Attribute value that will go in all your attribute cells. This is a sample Color:color:0, Disk space:select:1 and as you can see the format is <name> : <type> : <Position> separated by a comma. Instead of a comma you'll use the pipe | so Color:color:0| Disk space:select:1 For you it might look something like Size:select:0|Metal:select:1|Gem Stone:select:2 2) Now we have to create our Value and for this you'll need a new spreadsheet. Starting in cell A1 and moving down the A column write all the possible values for the first attribute in the form <value>:0 So using the sample with Size as the first attribute you would end up with something like this That would be sizes 8, 8.5, 9, 9.5, 10, 11, 12, and 13. If you have 40 sizes then you'd have 40 entries. Important to remember when entering numeric values in Excel you need to start the value with ' so that Excel knows it is a label rather than a numeric value for calculations. 3) Now in column B write the first value for the second attribute. In this case lets say it is Gold so you have Gold:1 Like this Then select copy and paste that value all the way down to the end of your size. Like this Then you need to copy the entire size value so you select all of it and copy then paste it under the last size like this You'd then type Silver:1 into B9 in our example -> copy it from B9 into B10 to B16 so that you end up with this You keep repeating this process of coping the entire list of sizes then having column B contain the second attribute. If you have 40 sizes and 8 metals you'll end up with 40 x 8 = 320 rows. 4) Now in cell C1 type =A1&"|"&B1 The outcome will be the contents of cell A1 and cell B1 separated by a | Copy this all the way down. If you have 320 rows then all the way down the 320 for out example we only have 16 so this would be the outcome. 5) Now that you have Attribute 1 and Attribute 2 it is now time to add attribute 3. You'll basically be repeating the entire process except that column C is now going to be used as the key. For the next step it is important that when you copy column C you paste as value. If you do a regular paste you get | only since A and B are empty Jump a few steps and this is where we end up Then you do the joining again by entering =C1&"|"&D1 into E1 then copy E1 all the way down so you end up with this For the sake of our example we will just end it there so for our example there are 8 sizes x 2 metals x 3 stones = 18 combinations. For my products this is a much higher number but this is just an example. If you had a 4th attribute you repeat the procedure this time using column E as the key. The same for a 5th and 6th attribute. The final column in this process is what you'll copy into the C column of the other spreadsheet. So on the spreadsheet you constructed using the CSV Combinations example you have Remember paste column C as values when copying from the spreadsheet where you are doing the work. 6) Open yet another spreadsheet and copy the values of column C into column A and Save As select text. Then close that spreadsheet and open a new spreadsheet and import data using the text file you just created select delimited and use | as the separator (select other and enter |). You'll get your attribute values separated into individual columns like this The next step is to work with price formulas. This I can't really guide you and it requires that you have some knowledge of how to construct formulas in Excel. Depending on how well you know Excel there is no limit to how complex you can design the formulas. The goal is to end up with a column with the final price and to have cells with the values of the commodities that change over time. I would expect that setting up a relation between size and weight so that the weight can then be used to multiply the price of the metal would be where you'd start. So if the price of gold changes then you update the cell that has the price of gold in it and all of the other prices update to reflect that change. Once you've gone through all this all future updates are just a matter of changing the relevant commodity price and then copying and value pasting the price into the main spreadsheet's price column (column I) 7) Save the main spreadsheet as a CSV and as a spreadsheet. The latter is important for future updates. 8) Open the CSV version in Notepad++ and first replace all commas with semi-colons then replace all pipes with commas. Save as text. Use this file to import as CSV into PrestaShop. I have a spreadsheet combo for all my complex products that have commodities with volatile costs. By just updating the cost I get a completely new price list for all the combinations and can quickly update my products. As a manufacturer we don't have inventory management on. I don't know if this would work with inventory management. I suspect if you wanted inventory management you'd need to invest in a module that allows you to export combinations as CSV and then use that as the starting point each update. I don't really see how this procedure would be necessary for someone who is not a manufacturer though so inventory shouldn't be an issue. If you have unique images for each combination then you will need to set that up the first time and then just never change those columns in the main product spreadsheet. If you already have all of that set up in your store then investing in a module that would let you export it would likely save time and be worth the money. In my setup I have different Excel sheets linked to other Excel sheets. I skipped all that since it adds unnecessary complexity to save a few copy and pastes but depending on your level of comfort with Excel it might be worth it. I can update the price of a commodity on one spreadsheet and all the product spreadsheets automatically update when I open them by referencing the spreadsheet with the commodity prices. Hope that helps. It is long and maybe hard to follow. I am happy to explain any part that is difficult to follow in greater detail. Edited August 20, 2014 by Naldinho (see edit history) 1 Link to comment Share on other sites More sharing options...
angelistudio Posted August 20, 2014 Author Share Posted August 20, 2014 Naldinho, I'm speachless...thanks a lot for sharing this. Your suggestions saved my life! (and my e-commerce). Marco Link to comment Share on other sites More sharing options...
Naldinho Posted August 20, 2014 Share Posted August 20, 2014 Not a problem. I assume this will be useful to others who run stores as manufacturers. I forgot to mention the price formulas have to be relative to the default product so the best way to do that is just calculate price and subtract the default price. Store default price in a cell rather than as part of the price formula so that if you change the default price all the prices reflect that. Link to comment Share on other sites More sharing options...
trevorgilligan Posted February 6, 2015 Share Posted February 6, 2015 i wonder can someone help? thanks and have a nice weekend. a product on my store costs €1000. i have 4 product attributes (combos). combos 2,3,4 each add €1,000. so its €1,000 up to €4,000. i have 4 discounts. 1000 -€966 combo 1 . total cost 29 2000 -1941 combo 2 . total cost 49 3000 -2916 combo 3. . total cost 69 4000 -3891 combo 4 . . total cost 89 (default combo) the search page (http://vouchoff.com/search?controller=search&orderby=position&orderway=desc&search_query=) and the home page both show -8800%. it should show -€3891 or else -97% (approx) where can i change this calculation? or if you have an idea of another way to do it thanks? this is not a tax issue as i have no tax/shipping. Link to comment Share on other sites More sharing options...
Recommended Posts