Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Adding price value to attributes

Adding price value to attributes

Views: 957

Results 1 to 9 of 9
17 Nov 2011, 8:24 PM
#1
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Adding price value to attributes

Hi. I am adding picture frames to my store and each frame will have a different price per foot. The product will have a base price and I will set up two attributes in inches (for length and width) that will range from 5" to 80".

So if one product has a base price of $10 (which would be per foot) then I will have two drop down attributes (one for length and one for width) that will range from 5" to 80" each. I need each one of these attributes to add price so I charge accordingly per foot for the whole picture frame. I suppose I could convert to a per inch price which would make this easier.

Say one picture frame is $10 per foot. Under the 6" attribute could I put 50%? to equal 50% of the $10? What about under the 24" could I put X2 to multiply the price by two?

My question is, can I use the price factor for fractions and/or multiplications? If so, in which format can I enter this.

If I can set this up one time it wouldn't matter what each and every price of the hundreds of products I am going to enter. I can't even tell you how much time this would save me. There is no way I can manually enter hundreds of products with the exact price per inch per product (on 150 attributes per product), it's way to time consuming. So if I could use a very basic percentage or multiplication per attribute to increase price, I could use this one template across every one of my frames and free me up to enter product.

There is one other issue. Each frame will have a few inches of lost wood that I need to account for (this happens in the trimming process). So for each frame maybe I have to account for 3" worth of lost wood that needs to be charged for.

Please help!!

18 Nov 2011, 6:18 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding price value to attributes

You can use attribute price factors for this, in the Attribute Controller. These calculate the attribute price as a fraction/multiple of the base product price; each attribute price is added to the base price (or subtracted).

You will need to figure out the best way to get this to calculate the final price. A base per inch may well help. Say $10/foot for an example. Maybe the base price is for 3 inches ($2.50); you should be able to get used to figuring in 1/4 foot units. Then 5" width x 2 = 10/3 or 3.33 x $2.50 = $8.33. 8" height x 2 =16/3 or 5.33 x $2.50 = $13.33.

$2.50 base + $8.33 + $13.33 = $24.16.

18 Nov 2011, 6:27 AM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding price value to attributes

You would want to set the products to "priced by attributes" (product editing page), and mark each attribute as "Include in Base Price When Priced by Attributes" (Attributes Controller).
Set up one product with the attributes from 5" to 80" for length and width calculated as a factor, then copy/duplicate that product and change the description, price, etc. as required.

18 Nov 2011, 6:29 PM
#4
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Adding price value to attributes

Please look at my example and let me know if this would work:

If I need to charge $12 per foot on a certain product, would this be the correct to calculate these variables?

To Get 3" Size Priced Right
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 1
Price Factor Offset: .25
Total: $12 X 1 - .25 = $3

To Get 6"
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 1
Price Factor Offset: .5
Total: $12 X 1 - .5 = $6

To Get 12"
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 1
Price Factor Offset: 0
Total: $12 X 1 - 0 = $12

**To Get 18" **
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 2
Price Factor Offset: .5
Total: $12 X 2 -.5= $18

Do these examples above work?

From what I read in the Attributes HOW-TO post this looks correct to me. With this option I could configure all 150 size attributes for one product and copy it to different product with different product prices. 75 of these would be for width, and the other 75 for height which would then add together. This way I only have to enter these variable once and copy to other products (that have different product prices) right? I definitely know how to copy this to multiple products, I just need to make sure that the numbers are uniform and can be posted across multiple product prices.

Also, I am going to get 2" waste on every cut. Meaning I want to charge 1/6 of the base price for any attribute selected. Would that mean I could add 1/6 into the One Time Field so it would add that to the price? If not, I suppose I could just add 2" to every calculation. Meaning I could set up the 6" to calculate for 8" to cover the waste. I would only want to do this, if the one time field would not work or there isn't a simpler solution.

I am confused as to how to enter fractions into the Offset Field: If I want to enter 25% of a price do I enter it as: .25 or do I enter it as 1/4? Or Can I enter as both?

Last: Does the Price Factor offset field always subtract, add, or multiply? I think it always subtracts but I need to be sure here.

I am sorry for so many questions but I need to enter these 150 times for each product. So I need to make sure I am doing this right the first time.

18 Nov 2011, 7:05 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding price value to attributes

I think you're just complicating things by using the offset as well as the price factor. Figure out the correct factor and enter it once.
We need some basic coordination on terms to discuss this easily.
Your price per foot is per running foot of frame material?
Your height and width attributes refer to the frame's internal dimensions?
If you say 6", that means you will have 12" of frame material for that dimension? (plus waste - how much? 2" per piece? 2" per end = 4" per piece?)

I think (if the total waste per frame is close enough to a constant length) that you should make the product's base price equal the price for that length of waste, then calculate the price factor for each finished dimension as a proportion of dimension inches (x2 ?) to waste inches.

The one-time will not work, as it applies only once no matter how many of a frame they are buying.

You need to enter decimals; the field is numeric, not arithmetic/logical. The offset field is just subtracted from the price factor (using a negative value would probably add it). Then the result is multiplied by the product price.

18 Nov 2011, 9:32 PM
#6
sports_guy avatar

sports_guy

Totally Zenned

Join Date:
Apr 2007
Location:
Dayton, Ohio
Posts:
682
Plugin Contributions:
0

Re: Adding price value to attributes

OK. So offset is complicating just use the price factor plus base price. A fraction like .5 for half a foot and 2.5 for 2 and a half feet of material in the price factor field.

Price per foot is what we charge per foot of framing material (yes you are right). The height and width do refer to the internal frame dimension. I need to add waste here but I did not do so as to not complicate you.

If possible I would like for the base price (product price) to be our charge per foot of product because we are eventually going to have thousands of products. As our prices change, we can then go to the bulk price changer and update this quickly in the future.

So use decimals, and the price offset does subtract. Thank you.

This may help me explain a little better here is an image:

Forget about the fractions that are not showing I am not going to calculate these. As you can see I will have to set these figures for both width and height from 4" to 80" so the visitors can order any size frame they want.

Here are some things I was hiding as to not complicate things:

The width and height fields will be times two because there are two sides. Another words a 6" wide frame by a 6" long frame will use: 24" worth of material, because there are two sides for width and two sides for length. Basically in the 6" width attribute field I would need to account for 12" worth of material.

Also, you are right this is an inside measurement. So I want to account for 2" outside measurement for each corner extra (I will call this waste). That means that one frame will have 8" worth of waste that I need to charge for. Meaning now for the 6" width attribute I need to account for 16" worth of material (6" one side, 6" other side, 4" waste for both sides.). The kicker is waste is dependent on the width of the frame. I can figure this out, let's assume the waste is only 2" on all frames for this argument sake.

I have to set this up once for width and the same for length. Then in the final product when the user selects the drop downs the price will charge accordingly. This means that for one attribute I have to account for two side and half the waste of the frame (or waste for both sides). So a 6" attribute will need to account for 16" worth of material (6" one side, 6" other side and 4" waste. Waste is based upon 2" X 2 for both sides). I can figure each one of these out as I add the attribute. What I want to make sure is that I am entering right.

Now if I charge $12 per material foot, is this how I need to enter the charges for both the width and length attribute?

To Get 3" Width Priced Right (10" worth of material)
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 0.833 (This is 10" converted to decimal)
Total: $12 X 0.833 = $9.996

To Get 12" (28" worth of material)
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 2.333 (This is 2' 4" converted to decimal)
Total: $12 X 2.333 = $27.996

To Get 24" (52" worth of material)
Product Priced by Attributes: Yes
Product Price: $12
Attributes Price +: Leave Blank
Price Factor: 4.333 (This is 4' 4" converted to decimal)
Total: $12 X 4.333 - 0 = $51.996

Of course this is only for the width or the length. When I put this formula into both drop downs it will then add the two together for final price of material. So a 12" width selection plus a 12 length selection would add up to: $55.98 ($27.99 width plus $27.99 length)

Is this how I should enter this information? I hope I did not confuse you :unsure:

18 Nov 2011, 9:54 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding price value to attributes

For any one product, there will be a fixed amount of waste per frame. This will be different for wide or narrow frames; you can either use an average and accept that some will lose you a bit and others will gain you a bit, or divide frames into "wide" and "narrow" setups, which will greatly reduce the averaging error at the cost of more complication.

I think there are only two setups that will work automatically without custom code:
Make the product base price the price for the waste and calculate the factors off that (it can be accurately figured).

Or make a third attribute with one value for the waste, auto-selected and included in the base price, and hide it so the customers aren't confused by it.
This may be able to work from a per-foot base price; the price factors would have to be calculated to account for only the total amount above 12". A 3" square frame would be 12" total (plus waste).

18 Nov 2011, 10:16 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding price value to attributes

I think the easiest to manage and accurately account for waste would be to set the base price per inch, and have a hidden attribute for the actual waste minus 1" (there will always be more than 1" of waste).

Then the length attributes will be a straight doubling of the inch value (two sides).
Say a frame is $12/foot, or $1/inch.
There is 8" of waste for this frame material, so the "waste" attribute is set to (8 - 1) X $1.00 = $7.00.
The height and width are both set to 2x per inch, so 5" = price factor of 10, which calculates to $10.00 for this product.

To Get 24" height or width (plus waste not calculated here)
Material price: $12 per foot
Product Priced by Attributes: Yes
Product Price: $1.00
Attributes Price +: Leave Blank
Price Factor: 48 (This is 24" doubled)
Subtotal: $1.00 X 48 = $48.00 for this dimension

Say it's a square frame, so
Subtotal: $1.00 X 48 = $48.00 for the other dimension

plus say 8" of waste (-1" already in base) = 7
Price factor: 7
Subtotal: 7 x $1.00 = $7.00 for waste

For each product, you only have to customize the value (price factor) of the waste attribute.

18 Nov 2011, 10:23 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding price value to attributes

For transparency, you can call the "waste" attribute something like "Cutting Cost" and let them see it. That will show which frames have the most overhead (wide ones) which will make a big proportional difference on small frames.