Help with ASP dimensional Array

# Thread: Help with ASP dimensional Array

1. Junior Member
Join Date
Dec 1969
Posts
21

## Help with ASP dimensional Array

Hi,<BR>I am trying to create some asp code for a instant quote on a website.<BR>Basically what I need to know is, how to code a lookup table. <BR>Example: If someone orders 10 shirts and want 2 colors on the front, I need to beable to look up how much it will cost per shirt to have 2 colors.<BR>10 shirts - 2 colors would be 3.10, but 13 shirts with 3 colors would be 3.00 and so on (12 colors and 11 different quantity fields, which total 132 different amounts).<BR>Can this be easily done with a if then statement, or a 2 dimensional array? If so, can someone give me a good example ot use?<BR>

2. Senior Member
Join Date
Dec 1969
Location
Indianapolis, IN
Posts
1,755

## Is there any math involved?

Are the amounts set up in such a way that you could use a formula like:<BR>x shirts * y colors = your price<BR>?<BR>Or is there some kind of relationship for each set you could use? Example:<BR>At 2 colors - price = base_price * # of shirts<BR><BR>Or is it completely unrelated? I&#039;m just looking for the simplest solution. Let me know if I didn&#039;t make any sense whatsoever.

3. Junior Member
Join Date
Dec 1969
Posts
21

## RE: Is there any math involved?

yes there is math. It would be the following type of formula:<BR>quantity + (number or colors & quantity array to find cost per shirt) + ( .25 * quantity) * 1.54<BR>This will be the total cost for the entire order plus the markup of 1.54

4. Senior Member
Join Date
Dec 1969
Posts
276

## RE: Is there any math involved?

i think he meant is there math involved in findng the price or the shirt

5. Senior Member
Join Date
Dec 1969
Location
Indianapolis, IN
Posts
1,755

## That doesn't make sense

By this formula, you&#039;re saying that you use the # of colors and quantity to come up with a cost per shirt. Then you&#039;re reapplying quantity to get the order price.<BR>Why don&#039;t you simply lookup the cost for a shirt with X amount of colors? Then multiply that number by the quantity? I think you&#039;re making this too complicated.

6. Junior Member
Join Date
Dec 1969
Posts
21

## RE: That doesn't make sense

Well, you take the base cost of the shirt (1.98)<BR>and then you add the printing color (1 color on the front .90)(this changes depending on how many you order and how many printed colors you want)<BR>then you add shipping (.25 per shirt)<BR>the total for each shirt would be (3.13)<BR>then you multiply that total (say 100 shirts is the quantity)<BR>this gives us \$313.00<BR>then you add the markup<BR>313.00 * 1.54<BR>thus the total order would come to - \$482.02<BR>

7. Senior Member
Join Date
Dec 1969
Posts
96,118

## Of course it makes sense!

Ask ANY printer!<BR><BR>The higher the quantity printed, the lower the per-unit cost.<BR><BR>Because there&#039;s "economy of scale" and that gets passed on to the customer.<BR><BR>Haven&#039;t you ever been to CostCo and realized that you can get 4 gallons of Mayonnaise in one monstrous tub for about the same price you would pay for 6 quarts of the stuff in quart jars at the grocery store? Same principal. Sell more, per unit cost (and therefore price) is less.<BR><BR>

8. Senior Member
Join Date
Dec 1969
Posts
276

## but still....

is there any math done to determine the \$3.10 or \$3.00 from your example?<BR><BR>like 12 shirts with 2 colors would be 12/2 or 6 a shirt..and 12 shirts with 3 colors would be 12/3 or 4 a shirt..something along those lines...

9. Senior Member
Join Date
Dec 1969
Posts
276

## RE: Of course it makes sense!

I agree...its more of a question if there is a fomula used to determine how much of a price break you would get...

10. Senior Member
Join Date
Dec 1969
Posts
96,118

## We used to print reference manuals...

...and we could print 1000 copies of a 250 page book for roughly 3.5 times the total cost of printing 100 copies of the same sized book! So it really bumped up our per-unit cost for the stuff we didn&#039;t sell many of.<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•