// 3.Create Product Group // 3.1.Add All Selections (by ID) // 3.2.Add All Options (by ID) // 3.3.Product Assign Array // 3.4.Create // Products var pOptSel_12866_105_51 = new Selection(51,"Turnaround 4 - 6 Business Days","
Normal 4 - 6 Day
turnaround is fine. Please note
this is the manufacture time which only starts
from the time your Artwork is completed and
approved so the job is ready to go to print.
","Normal 4-6 Business Days from Artwork Sign off","","10",true,0.0,0,0,0); var pOptSel_12866_105_52 = new Selection(52,"Turnaround 2 Business days","
Rush Order 2 Days.
Quick drop everything!

              I need them super fast!
","Rush Order 2 Business Days","","1",false,0.0,0,0,0); var pOptSel_12866_95_86 = new Selection(86,"Single Sided","
One side
of your cards will be printed in full colour.
","One Side in Full Colour","","",true,0.0,0,0,0); var pOptSel_12866_97_90 = new Selection(90,"Square","
Square Cornered cards are usually 90 x 55mm
But we can also accommodate different sizes,
please specify the size you want in the comment
field below or email work@front.com.au to check
your size is possible first.","Square Corners","","",false,0.0,0,0,0); var pOptSel_12866_98_91 = new Selection(91,"Upload - Print Ready","
Upload Print Ready -
Already have your file ready to upload, then this is the option for you","Print Ready inc 3mm bleed","","",true,0.0,0,0,0); var pOptSel_12866_95_94 = new Selection(94,"Full Colour Double Sided","
Both sides
of your cards will be printed in full colour.","Full Colour Both Sides","","",false,0.0,0,0,0); var pOptSel_12866_97_96 = new Selection(96,"Rounded","Our business cards come standard with rounded corners so they fit
easily into your wallet or purse just like a credit card, they are exactly 
the same size as a credit card 85 x 54mm so they look good and last 
longer with no \"dog ear corners\".
","85 x 54mm with Rounded Corners","","",true,0.0,0,0,0); var pOptSel_12866_98_97 = new Selection(97,"Design Services","
Full Artwork Design -
Let us do it for you, send your logo
and text and any other information to art@front.com.au
and place your order now, but please email all the details at
the time of placing your order as later changes will incur
additional costs. Also our stated turnaround time only
starts once your artwork has been completed and approved.
","Artwork Design Services","","",false,0.0,0,0,0); var pOptSel_12866_98_110 = new Selection(110,"Design Online","
Design Online
Use our online design tool to let your creative mind run wild.  Pick from different templates and backgrounds.","Design Online","","",false,0.0,0,0,0); var pOptSel_12866_165_224 = new Selection(224,"Uncoated","","Uncoated","","",true,0.0,0,0,0); var pOptSel_12866_165_226 = new Selection(226,"Gloss or Matt Cello 1 Side","","Gloss or Matt Cello 1 Side","","",false,0.0,0,0,0); var pOptSel_12866_165_262 = new Selection(262,"Gloss or Matt Cello 2 Sides","","Gloss or Matt Cello 2 Sides","","",false,0.0,0,0,0); var pOptSel_12866_98_263 = new Selection(263,"Make Artwork Press Ready","
Need a little help -
I have existing Artwork but need some small changes made.
Please email what you have to art@front.com.au and
place your order through our system now.
","I need a little help","","",false,0.0,0,0,0); var pOptSel_12866_166_264 = new Selection(264,"Stock 310 gsm","","310 gsm Stock","","",true,0.0,0,0,0); var pOptSel_12866_166_265 = new Selection(265,"Stock 350 gsm","","350 gsm Stock","","",false,0.0,0,0,0); var pOptSel_12866_204_330 = new Selection(330,"Pick-up (Sydney Only)","","Pick-up (7.30 -6.00pm Mon-Fri)","","",false,0.0,0,0,0); var pOptSel_12866_245_353 = new Selection(353,"Celloglaze Gloss","","Cello/Laminate Gloss","","",true,0.0,0,0,0); var pOptSel_12866_166_357 = new Selection(357,"Recycled Stock 300gsm","","Recycled Stock 300gsm","","",false,0.0,0,0,0); var pOptSel_12866_204_388 = new Selection(388,"FREE DELIVERY Aust wide","
FREE DELIVERY AUSTRALIA WIDE 
We use TNT, FASTWAY & Express Post
for Free Overnight delivery to your work or home.
Please specify in the comments field if you have
a preference & please make sure someone is
there to accept the delivery.
","Overnight Free Delivery","","",true,0.0,0,0,0); var pOptSel_12866_204_389 = new Selection(389,"FREE DELIVERY Same Day Urgent","","Urgent VIP same day at additional cost","","",false,0.0,0,0,0); var pOptSel_12866_95_396 = new Selection(396,"PET Full Col 1 side B&W other","","Full Col 1 Side, B & W 1 side","","",false,0.0,0,0,0); var pOptSel_12866_248_448 = new Selection(448,"Discount 2 Names","","Qty Split between 2 Names","","",false,0.0,0,0,0); var pOptSel_12866_248_449 = new Selection(449,"Discount 3 Names","","Qty Split between 3 Names","","",false,0.0,0,0,0); var pOptSel_12866_248_450 = new Selection(450,"Single Name Only","","Single Name Only","","",true,0.0,0,0,0); var pOptSel_12866_248_451 = new Selection(451,"Discount 4 Names","","Qty Split between 4 Names","","",false,0.0,0,0,0); var pOptSel_12866_248_452 = new Selection(452,"Discount 5 Names","","qty Split between 5 Names","","",false,0.0,0,0,0); var pOpt_12866_95 = new Option(95,"Number of Sides Printed","","Number of Sides Printed","Number of Sides Printed ","

Choose between:

","DropDown","1","Base Modifier","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_95_86, pOptSel_12866_95_94, pOptSel_12866_95_396],true); var pOpt_12866_97 = new Option(97,"Square Corners","","Square Corners","Card Size will be ","","DropDown","1","Base Modifier","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_97_96, pOptSel_12866_97_90],true); var pOpt_12866_98 = new Option(98,"Artwork Options","","Artwork Options","Artwork Options ","

Your selection is:

","DropDown","5","Design Option","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_98_110, pOptSel_12866_98_91, pOptSel_12866_98_97, pOptSel_12866_98_263],true); var pOpt_12866_105 = new Option(105,"Turn Around Time","","Turn Around Time","Turn Around Time ","

How quick do you need it:

","DropDown","2","Turn Around","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_105_51, pOptSel_12866_105_52],true); var pOpt_12866_165 = new Option(165,"Matt or Gloss Cello (Laminate)","","Matt or Gloss Cello (Laminate)","Coating ","Here you can choose between a Bright Glossy finish to really bring out
the colours in your cards or a more understated Matt finish that looks
fantastic. Both add strength and protection of the surface whilst
keeping the cards water resistant.","DropDown","4","Finishing Option","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_165_226, pOptSel_12866_165_262, pOptSel_12866_165_224],true); var pOpt_12866_166 = new Option(166,"Stock (Business Cards)","","Stock Weights (gsm)","Choose a Stock (gsm) ","","DropDown","1","Base Modifier","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_166_264, pOptSel_12866_166_265, pOptSel_12866_166_357],true); var pOpt_12866_204 = new Option(204,"FREE DELIVERY Aust Wide","","","FREE DELIVERY Aust Wide ","","DropDown","-1","","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_204_388, pOptSel_12866_204_330, pOptSel_12866_204_389],true); var pOpt_12866_245 = new Option(245,"Specify which side","","Specify which side","Specify which side ","","TextBox","-1","","-1","","1","Table","vertical","SingleLine","220","","ie Front = Gloss, Back = Matt","1","0",0,[pOptSel_12866_245_353],true); var pOpt_12866_248 = new Option(248,"Multiple Card Artwork Discount","","","More than 1 Name ","
Save with more Names
 - Combine names onto one
order and together you save on Business Cards with
2 or more names using the same Artwork template. 

This is a further discount from our low Online prices!

Conditions apply, min order 500 cards.



","DropDown","-1","","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_12866_248_450, pOptSel_12866_248_448, pOptSel_12866_248_449, pOptSel_12866_248_451, pOptSel_12866_248_452],true); var pTurnQty_12866_1_142221 = new TurnAroundQty(142221,0.0000,1,false); var pTurnQty_12866_1_142222 = new TurnAroundQty(142222,0.0000,1,false); var pTurnQty_12866_1_142223 = new TurnAroundQty(142223,0.0000,1,false); var pTurnQty_12866_1_142224 = new TurnAroundQty(142224,0.0000,1,false); var pTurnQty_12866_1_143095 = new TurnAroundQty(143095,0.0000,1,false); var pTurnQty_12866_1_143097 = new TurnAroundQty(143097,0.0000,1,false); var pTurnQty_12866_2_142221 = new TurnAroundQty(142221,0.0000,2,false); var pTurnQty_12866_2_142222 = new TurnAroundQty(142222,0.0000,2,false); var pTurnQty_12866_2_142223 = new TurnAroundQty(142223,0.0000,2,false); var pTurnQty_12866_2_142224 = new TurnAroundQty(142224,0.0000,2,false); var pTurnQty_12866_2_143095 = new TurnAroundQty(143095,0.0000,2,false); var pTurnQty_12866_2_143097 = new TurnAroundQty(143097,0.0000,2,false); var pq_144502_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_144502_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_144502_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_144502_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_144502_165_226 = new SelectionsPrice(165, 226, 8.000) var pq_144502_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_144502_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_144502_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_144502_95_94 = new SelectionsPrice(95, 94, 5.000) var pq_144502_97_90 = new SelectionsPrice(97, 90, 4.000) var pq_144502_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_144502_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_144502_165_262 = new SelectionsPrice(165, 262, 12.000) var pq_144502_166_265 = new SelectionsPrice(166, 265, 8.000) var pq_144502_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_144502_248_448 = new SelectionsPrice(248, 448, 30.000) var pq_144502_95_396 = new SelectionsPrice(95, 396, 3.000) var pq_144502_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_144502_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_144502_166_357 = new SelectionsPrice(166, 357, 0.000) var pq_144502_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_144502_248_449 = new SelectionsPrice(248, 449, 35.000) var pq_144502_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_144502_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_144502_248_451 = new SelectionsPrice(248, 451, 60.000) var pq_144502_248_452 = new SelectionsPrice(248, 452, 82.500) var pq_144502 = new ProductQuantities(144502, 12866, 100, 30.0000, [pq_144502_95_86, pq_144502_97_96, pq_144502_98_110, pq_144502_105_51, pq_144502_165_226, pq_144502_166_264, pq_144502_245_353, pq_144502_248_450, pq_144502_95_94, pq_144502_97_90, pq_144502_98_91, pq_144502_105_52, pq_144502_165_262, pq_144502_166_265, pq_144502_204_388, pq_144502_248_448, pq_144502_95_396, pq_144502_98_97, pq_144502_165_224, pq_144502_166_357, pq_144502_204_330, pq_144502_248_449, pq_144502_98_263, pq_144502_204_389, pq_144502_248_451, pq_144502_248_452]); var pq_144172_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_144172_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_144172_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_144172_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_144172_165_226 = new SelectionsPrice(165, 226, 10.000) var pq_144172_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_144172_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_144172_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_144172_95_94 = new SelectionsPrice(95, 94, 6.500) var pq_144172_97_90 = new SelectionsPrice(97, 90, 5.000) var pq_144172_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_144172_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_144172_165_262 = new SelectionsPrice(165, 262, 15.000) var pq_144172_166_265 = new SelectionsPrice(166, 265, 10.000) var pq_144172_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_144172_248_448 = new SelectionsPrice(248, 448, 30.000) var pq_144172_95_396 = new SelectionsPrice(95, 396, 5.000) var pq_144172_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_144172_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_144172_166_357 = new SelectionsPrice(166, 357, 10.000) var pq_144172_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_144172_248_449 = new SelectionsPrice(248, 449, 35.000) var pq_144172_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_144172_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_144172_248_451 = new SelectionsPrice(248, 451, 60.000) var pq_144172_248_452 = new SelectionsPrice(248, 452, 82.500) var pq_144172 = new ProductQuantities(144172, 12866, 200, 40.0000, [pq_144172_95_86, pq_144172_97_96, pq_144172_98_110, pq_144172_105_51, pq_144172_165_226, pq_144172_166_264, pq_144172_245_353, pq_144172_248_450, pq_144172_95_94, pq_144172_97_90, pq_144172_98_91, pq_144172_105_52, pq_144172_165_262, pq_144172_166_265, pq_144172_204_388, pq_144172_248_448, pq_144172_95_396, pq_144172_98_97, pq_144172_165_224, pq_144172_166_357, pq_144172_204_330, pq_144172_248_449, pq_144172_98_263, pq_144172_204_389, pq_144172_248_451, pq_144172_248_452]); var pq_143095_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_143095_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_143095_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143095_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143095_165_226 = new SelectionsPrice(165, 226, 12.000) var pq_143095_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_143095_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_143095_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_143095_95_94 = new SelectionsPrice(95, 94, 8.000) var pq_143095_97_90 = new SelectionsPrice(97, 90, 7.000) var pq_143095_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143095_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143095_165_262 = new SelectionsPrice(165, 262, 18.000) var pq_143095_166_265 = new SelectionsPrice(166, 265, 12.500) var pq_143095_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_143095_248_448 = new SelectionsPrice(248, 448, 30.000) var pq_143095_95_396 = new SelectionsPrice(95, 396, 6.000) var pq_143095_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_143095_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_143095_166_357 = new SelectionsPrice(166, 357, 12.500) var pq_143095_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_143095_248_449 = new SelectionsPrice(248, 449, 35.000) var pq_143095_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_143095_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_143095_248_451 = new SelectionsPrice(248, 451, 60.000) var pq_143095_248_452 = new SelectionsPrice(248, 452, 82.500) var pq_143095 = new ProductQuantities(143095, 12866, 250, 50.0000, [pq_143095_95_86, pq_143095_97_96, pq_143095_98_110, pq_143095_105_51, pq_143095_165_226, pq_143095_166_264, pq_143095_245_353, pq_143095_248_450, pq_143095_95_94, pq_143095_97_90, pq_143095_98_91, pq_143095_105_52, pq_143095_165_262, pq_143095_166_265, pq_143095_204_388, pq_143095_248_448, pq_143095_95_396, pq_143095_98_97, pq_143095_165_224, pq_143095_166_357, pq_143095_204_330, pq_143095_248_449, pq_143095_98_263, pq_143095_204_389, pq_143095_248_451, pq_143095_248_452]); var pq_142221_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_142221_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_142221_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_142221_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_142221_165_226 = new SelectionsPrice(165, 226, 18.000) var pq_142221_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_142221_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_142221_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_142221_95_94 = new SelectionsPrice(95, 94, 10.000) var pq_142221_97_90 = new SelectionsPrice(97, 90, 8.000) var pq_142221_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_142221_105_52 = new SelectionsPrice(105, 52, 32.000) var pq_142221_165_262 = new SelectionsPrice(165, 262, 24.000) var pq_142221_166_265 = new SelectionsPrice(166, 265, 15.000) var pq_142221_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_142221_248_448 = new SelectionsPrice(248, 448, 30.000) var pq_142221_95_396 = new SelectionsPrice(95, 396, 8.000) var pq_142221_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_142221_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_142221_166_357 = new SelectionsPrice(166, 357, 15.000) var pq_142221_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_142221_248_449 = new SelectionsPrice(248, 449, 35.000) var pq_142221_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_142221_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_142221_248_451 = new SelectionsPrice(248, 451, 60.000) var pq_142221_248_452 = new SelectionsPrice(248, 452, 82.500) var pq_142221 = new ProductQuantities(142221, 12866, 500, 60.0000, [pq_142221_95_86, pq_142221_97_96, pq_142221_98_110, pq_142221_105_51, pq_142221_165_226, pq_142221_166_264, pq_142221_245_353, pq_142221_248_450, pq_142221_95_94, pq_142221_97_90, pq_142221_98_91, pq_142221_105_52, pq_142221_165_262, pq_142221_166_265, pq_142221_204_388, pq_142221_248_448, pq_142221_95_396, pq_142221_98_97, pq_142221_165_224, pq_142221_166_357, pq_142221_204_330, pq_142221_248_449, pq_142221_98_263, pq_142221_204_389, pq_142221_248_451, pq_142221_248_452]); var pq_142222_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_142222_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_142222_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_142222_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_142222_165_226 = new SelectionsPrice(165, 226, 20.000) var pq_142222_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_142222_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_142222_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_142222_95_94 = new SelectionsPrice(95, 94, 12.000) var pq_142222_97_90 = new SelectionsPrice(97, 90, 10.000) var pq_142222_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_142222_105_52 = new SelectionsPrice(105, 52, 35.000) var pq_142222_165_262 = new SelectionsPrice(165, 262, 34.000) var pq_142222_166_265 = new SelectionsPrice(166, 265, 20.000) var pq_142222_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_142222_248_448 = new SelectionsPrice(248, 448, 33.000) var pq_142222_95_396 = new SelectionsPrice(95, 396, 10.000) var pq_142222_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_142222_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_142222_166_357 = new SelectionsPrice(166, 357, 20.000) var pq_142222_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_142222_248_449 = new SelectionsPrice(248, 449, 95.000) var pq_142222_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_142222_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_142222_248_451 = new SelectionsPrice(248, 451, 109.000) var pq_142222_248_452 = new SelectionsPrice(248, 452, 115.000) var pq_142222 = new ProductQuantities(142222, 12866, 1000, 75.0000, [pq_142222_95_86, pq_142222_97_96, pq_142222_98_110, pq_142222_105_51, pq_142222_165_226, pq_142222_166_264, pq_142222_245_353, pq_142222_248_450, pq_142222_95_94, pq_142222_97_90, pq_142222_98_91, pq_142222_105_52, pq_142222_165_262, pq_142222_166_265, pq_142222_204_388, pq_142222_248_448, pq_142222_95_396, pq_142222_98_97, pq_142222_165_224, pq_142222_166_357, pq_142222_204_330, pq_142222_248_449, pq_142222_98_263, pq_142222_204_389, pq_142222_248_451, pq_142222_248_452]); var pq_142223_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_142223_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_142223_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_142223_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_142223_165_226 = new SelectionsPrice(165, 226, 22.000) var pq_142223_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_142223_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_142223_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_142223_95_94 = new SelectionsPrice(95, 94, 20.000) var pq_142223_97_90 = new SelectionsPrice(97, 90, 28.000) var pq_142223_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_142223_105_52 = new SelectionsPrice(105, 52, 50.000) var pq_142223_165_262 = new SelectionsPrice(165, 262, 44.000) var pq_142223_166_265 = new SelectionsPrice(166, 265, 40.000) var pq_142223_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_142223_248_448 = new SelectionsPrice(248, 448, 35.000) var pq_142223_95_396 = new SelectionsPrice(95, 396, 15.000) var pq_142223_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_142223_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_142223_166_357 = new SelectionsPrice(166, 357, 40.000) var pq_142223_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_142223_248_449 = new SelectionsPrice(248, 449, 80.000) var pq_142223_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_142223_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_142223_248_451 = new SelectionsPrice(248, 451, 120.800) var pq_142223_248_452 = new SelectionsPrice(248, 452, 200.000) var pq_142223 = new ProductQuantities(142223, 12866, 2000, 100.0000, [pq_142223_95_86, pq_142223_97_96, pq_142223_98_110, pq_142223_105_51, pq_142223_165_226, pq_142223_166_264, pq_142223_245_353, pq_142223_248_450, pq_142223_95_94, pq_142223_97_90, pq_142223_98_91, pq_142223_105_52, pq_142223_165_262, pq_142223_166_265, pq_142223_204_388, pq_142223_248_448, pq_142223_95_396, pq_142223_98_97, pq_142223_165_224, pq_142223_166_357, pq_142223_204_330, pq_142223_248_449, pq_142223_98_263, pq_142223_204_389, pq_142223_248_451, pq_142223_248_452]); var pq_143097_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_143097_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_143097_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143097_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143097_165_226 = new SelectionsPrice(165, 226, 40.000) var pq_143097_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_143097_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_143097_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_143097_95_94 = new SelectionsPrice(95, 94, 30.000) var pq_143097_97_90 = new SelectionsPrice(97, 90, 42.000) var pq_143097_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143097_105_52 = new SelectionsPrice(105, 52, 75.000) var pq_143097_165_262 = new SelectionsPrice(165, 262, 55.000) var pq_143097_166_265 = new SelectionsPrice(166, 265, 60.000) var pq_143097_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_143097_248_448 = new SelectionsPrice(248, 448, 40.000) var pq_143097_95_396 = new SelectionsPrice(95, 396, 20.000) var pq_143097_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_143097_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_143097_166_357 = new SelectionsPrice(166, 357, 60.000) var pq_143097_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_143097_248_449 = new SelectionsPrice(248, 449, 62.500) var pq_143097_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_143097_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_143097_248_451 = new SelectionsPrice(248, 451, 166.000) var pq_143097_248_452 = new SelectionsPrice(248, 452, 184.000) var pq_143097 = new ProductQuantities(143097, 12866, 3000, 140.0000, [pq_143097_95_86, pq_143097_97_96, pq_143097_98_110, pq_143097_105_51, pq_143097_165_226, pq_143097_166_264, pq_143097_245_353, pq_143097_248_450, pq_143097_95_94, pq_143097_97_90, pq_143097_98_91, pq_143097_105_52, pq_143097_165_262, pq_143097_166_265, pq_143097_204_388, pq_143097_248_448, pq_143097_95_396, pq_143097_98_97, pq_143097_165_224, pq_143097_166_357, pq_143097_204_330, pq_143097_248_449, pq_143097_98_263, pq_143097_204_389, pq_143097_248_451, pq_143097_248_452]); var pq_142224_95_86 = new SelectionsPrice(95, 86, 0.000) var pq_142224_97_96 = new SelectionsPrice(97, 96, 0.000) var pq_142224_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_142224_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_142224_165_226 = new SelectionsPrice(165, 226, 70.000) var pq_142224_166_264 = new SelectionsPrice(166, 264, 0.000) var pq_142224_245_353 = new SelectionsPrice(245, 353, 0.000) var pq_142224_248_450 = new SelectionsPrice(248, 450, 0.000) var pq_142224_95_94 = new SelectionsPrice(95, 94, 45.000) var pq_142224_97_90 = new SelectionsPrice(97, 90, 70.000) var pq_142224_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_142224_105_52 = new SelectionsPrice(105, 52, 100.000) var pq_142224_165_262 = new SelectionsPrice(165, 262, 110.000) var pq_142224_166_265 = new SelectionsPrice(166, 265, 100.000) var pq_142224_204_388 = new SelectionsPrice(204, 388, 0.000) var pq_142224_248_448 = new SelectionsPrice(248, 448, 44.000) var pq_142224_95_396 = new SelectionsPrice(95, 396, 30.000) var pq_142224_98_97 = new SelectionsPrice(98, 97, 42.500) var pq_142224_165_224 = new SelectionsPrice(165, 224, 0.000) var pq_142224_166_357 = new SelectionsPrice(166, 357, 100.000) var pq_142224_204_330 = new SelectionsPrice(204, 330, 0.000) var pq_142224_248_449 = new SelectionsPrice(248, 449, 82.500) var pq_142224_98_263 = new SelectionsPrice(98, 263, 20.000) var pq_142224_204_389 = new SelectionsPrice(204, 389, 0.000) var pq_142224_248_451 = new SelectionsPrice(248, 451, 138.750) var pq_142224_248_452 = new SelectionsPrice(248, 452, 157.500) var pq_142224 = new ProductQuantities(142224, 12866, 5000, 180.0000, [pq_142224_95_86, pq_142224_97_96, pq_142224_98_110, pq_142224_105_51, pq_142224_165_226, pq_142224_166_264, pq_142224_245_353, pq_142224_248_450, pq_142224_95_94, pq_142224_97_90, pq_142224_98_91, pq_142224_105_52, pq_142224_165_262, pq_142224_166_265, pq_142224_204_388, pq_142224_248_448, pq_142224_95_396, pq_142224_98_97, pq_142224_165_224, pq_142224_166_357, pq_142224_204_330, pq_142224_248_449, pq_142224_98_263, pq_142224_204_389, pq_142224_248_451, pq_142224_248_452]); var pod_621 = new ProductOptionDependencies(245, 165, 226, "-1"); var pod_622 = new ProductOptionDependencies(245, 165, 262, "-1"); var p_12866 = new Product(12866, "PREMIUM Business Cards with a special finish that gives a silky smooth feel, also water & tear resistant. You only get one chance to make a great first impression", [pq_144502, pq_144172, pq_143095, pq_142221, pq_142222, pq_142223, pq_143097, pq_142224], [pOpt_12866_248, pOpt_12866_166, pOpt_12866_95, pOpt_12866_97, pOpt_12866_165, pOpt_12866_245, pOpt_12866_98, pOpt_12866_105, pOpt_12866_204], [pod_621, pod_622], [],[],[false]); var prodGroup = new ProductGroup("Premium Business Cards (Heavier Stocks)", [], [], [], []); //alert(pgGrpOpt_74.selections[2].name); // 4.Create products // 4.1.Add All Selections (by ID) // 4.2.Add All Options (by ID) // 2.3. Create Selection Arrays for each product Quantity // 2.4. Create Option Constructor // 4.5. Create Array of Product Options // 4.6. Create Array of Product Option Dependencies // 4.7. Create Array of Option Qty Excludes // 4.5. Create Array of Product Quantities // 4.8. Create // 0.Create initial config Settings var ConfigSettings = new ConfigSettings(26, 12866, p_12866, 144502, pq_144502); function ConfigSettings(productGroupID, productID, objProduct, productQuantityID, productQuantity) { this.productGroupID = productGroupID; this.productID = productID; this.product = objProduct; this.productQuantityID = productQuantityID; this.productQuantity = productQuantity; // Addl Ptr to prodGroup Obj this.prodGroup = prodGroup; // Base Product Quantity ID this.baseProductQuantityID = productQuantityID; this.baseProdTimeSelectionID = 0; this.basePriceWithTurnAround = 0; } function ProductQuantities(ID, productID, quantity, basePrice, selectionsPrice) { this.ID = ID; this.productID = productID; this.quantity = quantity; this.basePrice = basePrice; this.selectionsPrice = selectionsPrice; this.PriceForSelection=function GetPriceForSelection(pqID, OptionID, SelectionID) { //alert("pq_" + pqID.toString() + "_" + OptionID.toString() + "_" + SelectionID.toString()); return eval("pq_" + pqID.toString() + "_" + OptionID.toString() + "_" + SelectionID.toString()).price; /* for (i = 0; i < this.selectionsPrice.length; i++) { alert(this.selectionsPrice[i].OptionID.toString if ((this.selectionsPrice[i].OptionID == OptionID) && (this.selectionsPrice[i].SelectionID == SelectionID)) return this.selectionsPrice[i].Price; } return null; */ } } function SelectionsPrice(OptionID,SelectionID,Price) { this.optionID=OptionID; this.selectionID=SelectionID; this.price=Price; } function Product(ID, name, quantities, options, optionDepends, optionQtyExludes,turnArounds,doNotAllowDiscount) { this.ID = ID; this.name = name; this.quantities = quantities; this.options = options; this.optionDepends = optionDepends; this.optionQtyExcludes = optionQtyExludes; this.turnArounds=turnArounds; this.doNotAllowDiscount=doNotAllowDiscount; Product.prototype.GetQuantityObj=function (Qty) { var vClosestObj = null; var vCurrentClosestDiff = 99999999; for (z=0; z < this.quantities.length; z++) { if (this.quantities[z].quantity==Qty) { return this.quantities[z] } if (vClosestObj == null) { vClosestObj = this.quantities[z]; vCurrentClosestDiff = Math.abs(vClosestObj.quantity-Qty) } else { if (Math.abs(vClosestObj.quantity-Qty) < vCurrentClosestDiff) { vClosestObj = this.quantities[z]; vCurrentClosestDiff = Math.abs(vClosestObj.quantity-Qty) } } } return vClosestObj; } } function Option(ID, name, notes, description, displayTitle, displayDescription, type, role, roleName, subRole, subRoleName, repeatColumns, repeatLayout, repeatDirection, textMode, width, height, defaultText, required, maxLength, readOnly, selections, DisplayInItemizedData) { this.ID = ID; this.name = name; this.notes = notes; this.description = description; this.displayTitle = displayTitle; this.displayDescription = displayDescription; this.type = type; this.role = role; this.roleName = roleName; this.subRole = subRole; this.subRoleName = subRoleName; this.repeatColumns = repeatColumns; this.repeatDirection = repeatDirection; this.repeatLayout = repeatLayout; this.textMode = textMode; this.width = width; this.height = height; this.defaultText = defaultText; this.required = required; this.maxLength = maxLength; this.readOnly = readOnly; this.selections = selections; this.isVisible=false; this.DisplayInItemizedData=DisplayInItemizedData; } function Selection(selectionID, name, description, title, image, suffix, isDefault, price, printedPages, width, height) { this.selectionID = selectionID; this.name = name; this.description = description; this.title = title; this.image = image; this.suffix = suffix; this.isDefault = isDefault; this.price = price; this.printedPages = printedPages; this.width = width; this.height = height; } // Product TurnAround function TurnAround(ID, name, description, type, amount, TurnAroundQtys ){ this.ID = ID; this.name = name; this.type = type; this.amount = amount; this.description = description; this.TurnAroundQtys=TurnAroundQtys; } function TurnAroundQty(ID,Cost,TurnAroundID,ExcludeTurnAround) { this.ID=ID; this.Cost=Cost; this.TurnAroundID=TurnAroundID; this.ExcludeTurnAround=ExcludeTurnAround; } // Product Group function ProductGroup(name, products, productGroupOptions, productOptionAssigns, productOptionDepends) { this.name = ""; this.products = products; this.productGroupOptions = productGroupOptions; this.productOptionAssigns = productOptionAssigns; this.productOptionDepends = productOptionDepends; } function ProductOptionAssign(ID, productID, optionID, selectionID) { this.ID = ID; this.productID = productID; this.optionID = optionID; this.selectionID = selectionID; } // Product Option Dependencies function ProductOptionDependencies(optionID, requiresOptionID, requiresSelectionID, checkboxValue) { this.optionID = optionID; this.requiresOptionID = requiresOptionID; this.requiresSelectionID = requiresSelectionID; this.checkboxValue = checkboxValue; } // Product Option Qty Dependencies function ProductOptionQtyDependencies(optionID, qtyID, qty) { this.optionID = optionID; this.qtyID = qtyID; this.qty = qty; } // Product Option Qty Dependencies function OptionQtyExcludes(productID, optionID, qty) { this.productID = productID; this.optionID = optionID; this.qty = qty; } function SelectedSelections(OptionID, SelectionID) { this.optionID=OptionID; this.selectionID=SelectionID; } /* function _CurrentGroupSelections() { this.selected = []; _CurrentGroupSelections.prototype.UpdateSelection = function SetSelection(OptionID, SelectionID) { var bFound = false; for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { this.selected[i].selectionID = SelectionID; bFound = true; } } if (bFound == false) { var vNewObj = new SelectedSelections(OptionID, SelectionID); this.selected.push(vNewObj); //this.UpdateOptionPrice(); } } // Get Selected Value for given OptionID _CurrentGroupSelections.prototype.GetSelected = function GetSelectedOptionID(OptionID) { for (var x = 0; x < this.selected.length; x++) { if (this.selected[x].optionID == OptionID) { return this.selected[x].selectionID; } } return -1; } // Get "|" Selection String _CurrentGroupSelections.prototype.SelectionString = function GetSelections() { var vStr = "|"; for (i = 0; i < this.selected.length; i++) { vStr += this.selected[i].optionID.toString() + "_" + this.selected[i].selectionID.toString() + "|" } return vStr; } } */ function _CurrentSelections() { this.selected = []; //to update check box selections _CurrentSelections.prototype.UpdateChkSelection = function SetChkSelection(OptionID, SelectionID) { var check=1; //will loop through and check if its already selected ot not if selected will make it -1 for unchecking it, if not selection does not exists for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { if(this.selected[i].selectionID == SelectionID){ //alert("here"); this.selected[i].selectionID =-1; return; check=0; } else { check=1; } } } //alert(check); //will check if first selection is -1 or not if -1 it will replace the first selection if(check==1){ for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { if(this.selected[i].selectionID == -1){ this.selected[i].selectionID =SelectionID; return; check=0; } } } } //if selection does not exist or first one is not -1 then it will add a new row. if(check==1){ var vNewObj = new SelectedSelections(OptionID, SelectionID); this.selected.push(vNewObj); } } _CurrentSelections.prototype.GetChkSelected = function GetChkSelectedOptionID(OptionID) { var vStr = "|"; for (var x = 0; x < this.selected.length; x++) { if (this.selected[x].optionID == OptionID) { vStr=vStr + this.selected[x].selectionID +"|"; } } return vStr; } _CurrentSelections.prototype.UpdateSelection = function SetSelection(OptionID, SelectionID) { var bFound = false; for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { this.selected[i].selectionID = SelectionID; for (j = 0; j < ConfigSettings.product.options.length; j++) { if((ConfigSettings.product.options[j].ID==OptionID)&&(ConfigSettings.product.options[j].type=='TextBox')) { if (ConfigSettings.product.options[j].selections[0].selectionID==SelectionID){ this.selected[i].selectionID = ' '; } } } //alert(OptionID.toString() + ":::" + SelectionID.toString()); bFound = true; } } if (bFound == false) { var vNewObj = new SelectedSelections(OptionID, SelectionID); this.selected.push(vNewObj); //this.UpdateOptionPrice(); } } // Get Selected Value for given OptionID _CurrentSelections.prototype.GetSelected = function GetSelectedOptionID(OptionID) { for (var x = 0; x < this.selected.length; x++) { if (this.selected[x].optionID == OptionID) { return this.selected[x].selectionID; } } return -1; } // Get "|" Selection String _CurrentSelections.prototype.SelectionString = function GetSelections() { var vStr = "|"; for (i = 0; i < this.selected.length; i++) { for (j = 0; j < ConfigSettings.product.options.length; j++) { if(ConfigSettings.product.options[j].ID==this.selected[i].optionID){ if(ConfigSettings.product.options[j].isVisible==true){ vStr += this.selected[i].optionID.toString() + "_" + this.selected[i].selectionID.toString() + "|" } } } } return vStr; } // Build Display Option HTML String for Selected Options _CurrentSelections.prototype.DisplayOptionsString = function GetDisplayOptionsString() { var vStr = ""; //alert(ConfigSettings.product.options.length); for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); if (1==1) {//(ConfigSettings.product.options[j].role != 5) { if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role != 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if (vPQ.price > 0) vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } // else { // Role 5 -- Finishing OPtions // if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].isVisible==true)) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // if (vCalcPrice > 0) // vStr += "
" + vSel.title + "
$" + CurrencyFormatted(vCalcPrice) + "
" // } // } } return vStr; } _CurrentSelections.prototype.SetOptionPriceRows = function SetOptionPriceRowsDisplay(tbl,QtyH, CSymbol) { var vStr = ""; //alert(ConfigSettings.product.options.length); for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); if (1==1) {//(ConfigSettings.product.options[j].role != 5) { if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role != 2) && (ConfigSettings.product.options[j].isVisible==true) && (ConfigSettings.product.options[j].type!='TextBox')) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert('123'); //alert("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if(QtyH>0) { var vPQH = eval("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQH); } //alert(vPQH); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //if (vPQ.price > 0) { //alert(vSel.DisplayInItemizedData.toString()+" "+vSelSelectionID.toString()); //alert(ConfigSettings.product.options[j].DisplayInItemizedData); if(ConfigSettings.product.options[j].DisplayInItemizedData==true ){ var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var bold1 = document.createElement("B"); var textnode1a = document.createTextNode(ConfigSettings.product.options[j].displayTitle + ": "); var textnode1b = document.createTextNode(vSel.title); if(QtyH>0) { var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price,vPQH.price))); } else var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price,0))); bold1.appendChild(textnode1a); cell1.appendChild(bold1); cell1.appendChild(textnode1b); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } else if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role == 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if(QtyH>0) { var vPQH = eval("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQH); } var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQ.price); //if (vPQ.price > 0) { if(ConfigSettings.product.options[j].DisplayInItemizedData==true ){ var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var textnode1 = document.createTextNode(ConfigSettings.product.options[j].displayTitle + ": " + vSel.title); if(QtyH>0) { var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price,vPQH.price))); } else var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price))); cell1.appendChild(textnode1); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } } // else { // Role 5 -- Finishing OPtions // if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].isVisible==true)) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // if (vCalcPrice > 0) { // var row = tbl.insertRow(tbl.rows.length); // var cell1 = document.createElement("TH"); // var cell2 = document.createElement("TD"); // var textnode1 = document.createTextNode(vSel.title); // var textnode2 = document.createTextNode("$" + CurrencyFormatted(vCalcPrice)); // cell1.appendChild(textnode1); // cell2.appendChild(textnode2); // row.appendChild(cell1); // row.appendChild(cell2); // // //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(vCalcPrice) + "
" // } // } // } } return vStr; } _CurrentSelections.prototype.SetOptionPriceRowsOld = function SetOptionPriceRowsDisplayOLD(tbl) { var vStr = ""; //alert(ConfigSettings.product.options.length); for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); if (1==1) {//(ConfigSettings.product.options[j].role != 5) { if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role != 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if (vPQ.price > 0) { var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var textnode1 = document.createTextNode(ConfigSettings.product.options[j].displayTitle + vSel.title); var textnode2 = document.createTextNode("$" + CurrencyFormatted(GetPriceBySize(vPQ.price))); cell1.appendChild(textnode1); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } else if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role == 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQ.price); if (vPQ.price > 0) { var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var textnode1 = document.createTextNode(ConfigSettings.product.options[j].displayTitle + ": " + vSel.title); var textnode2 = document.createTextNode("$" + CurrencyFormatted(GetPriceBySize(vPQ.price))); cell1.appendChild(textnode1); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } } // else { // Role 5 -- Finishing OPtions // if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].isVisible==true)) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // if (vCalcPrice > 0) { // var row = tbl.insertRow(tbl.rows.length); // var cell1 = document.createElement("TH"); // var cell2 = document.createElement("TD"); // var textnode1 = document.createTextNode(vSel.title); // var textnode2 = document.createTextNode("$" + CurrencyFormatted(vCalcPrice)); // cell1.appendChild(textnode1); // cell2.appendChild(textnode2); // row.appendChild(cell1); // row.appendChild(cell2); // // //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(vCalcPrice) + "
" // } // } // } } return vStr; } this.GetOptionPrice = function GetOptionPrice (QtyH) { var vOptionPrice = 0.0; for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); //if ((ConfigSettings.product.options[j].role != 5) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID); //alert(ConfigSettings.product.options[j].isVisible); if (vSelSelectionID == -1) { // get default var selCnt = ConfigSettings.product.options[j].selections.length; for (var selIndex = 0; selIndex < selCnt; selIndex++) { if (ConfigSettings.product.options[j].selections[selIndex].isDefault == true) { vSelSelectionID = ConfigSettings.product.options[j].selections[selIndex].selectionID; continue; } } } if ((ConfigSettings.product.options[j].isVisible==true)&& (ConfigSettings.product.options[j].type != 'TextBox') ){ if (vSelSelectionID > -1) { var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if(QtyH>0) { var vPQH = eval("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQH); } if(QtyH>0) vOptionPrice +=GetPriceBySize(vPQ.price,vPQH.price); else vOptionPrice += vPQ.price; } } // else if ((ConfigSettings.product.options[j].role == 5) && (ConfigSettings.product.options[j].isVisible==true)) { // Role 5 -- Finishing OPtions // // if (vSelSelectionID > -1) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // vOptionPrice += vCalcPrice; // } // } } return vOptionPrice; } } function GetBannerOptionPrice(option, unitPrice) { if (option.subRoleName == "Grommets") { //alert(GetGrommetCount()); //alert(unitPrice); return unitPrice * GetGrommetCount(); } else if (option.subRoleName == "Webbing") { return unitPrice * GetWebbingLength(); } else if (option.subRoleName == "Pole Pockets") { return unitPrice * GetPolePocketsLength(); } else if (option.subRoleName == "Rope") { return unitPrice * GetRopeLength(); } else if (option.subRoleName == "Sewing") { return unitPrice * GetSewingLength(); } else if (option.subRoleName == "3/4\" Velcro") { return unitPrice * GetVelcro3Length(); } else if (option.subRoleName == "2\" Velcro") { return unitPrice * GetVelcro2Length(); } //else //alert(option.subRoleName); } var currentSelections = new _CurrentSelections(); var currentGroupSelections = new _CurrentSelections(); function SetCurrentGroupSelections() { //alert('abc'); for (z=0; z < prodGroup.productGroupOptions.length; z++) { var OptionID = prodGroup.productGroupOptions[z].ID; var obj = document.getElementById("grpopt_" + OptionID.toString()); //alert(obj); //alert("opt_" + OptionID.toString()); if (obj) { if (prodGroup.productGroupOptions[z].type == "DropDown") { var SelectionID = obj.options[obj.selectedIndex].value; currentGroupSelections.UpdateSelection(OptionID, SelectionID); } } } //alert(currentGroupSelections.SelectionString()); } function SetCurrentSelections() { //alert(ConfigSettings.product.options.length); for (z=0; z < ConfigSettings.product.options.length; z++) { var OptionID = ConfigSettings.product.options[z].ID; //alert(OptionID.toString() + ":" + currentSelections.GetSelected(OptionID).toString()) if (currentSelections.GetSelected(OptionID) == -1) { //alert(ConfigSettings.product.options[z].selections); if (ConfigSettings.product.options[z].selections) { for (y=0; y < ConfigSettings.product.options[z].selections.length; y++) { if (ConfigSettings.product.options[z].selections[y].isDefault == true) { //alert(OptionID.toString() + ":" + ConfigSettings.product.options[z].selections[y].selectionID.toString()); currentSelections.UpdateSelection(OptionID, ConfigSettings.product.options[z].selections[y].selectionID); y=99999; } } } else { currentSelections.UpdateSelection(OptionID, ConfigSettings.product.options[z].defaultText); } } } //alert(currentSelections.SelectionString()); } function CurrencyFormatted(amount) { var i = parseFloat(amount.toString().replace("$","")); if(isNaN(i)) { i = 0.00; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); i = parseInt((i + .005) * 100); i = i / 100; s = new String(i); if(s.indexOf('.') < 0) { s += '.00'; } if(s.indexOf('.') == (s.length - 2)) { s += '0'; } s = minus + s; return CommaFormatted(s); } // end of function CurrencyFormatted() function CommaFormatted(amount) { var delimiter = ","; // replace comma if desired var a = amount.split('.',2) var d = a[1]; var i = parseInt(a[0]); if(isNaN(i)) { return ''; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); var n = new String(i); var a = []; while(n.length > 3) { var nn = n.substr(n.length-3); a.unshift(nn); n = n.substr(0,n.length-3); } if(n.length > 0) { a.unshift(n); } n = a.join(delimiter); if(d.length < 1) { amount = n; } else { amount = n + '.' + d; } amount = minus + amount; return amount; } // end of function CommaFormatted()