Basic Assignments
|
Options & Settings
|
Main Time Information
|
||||||||||||||||||||||
|
|
|
|
|||
|
|||
|
Notes:
|
Problems and questions with java script and flow for advanced add to cart page… Questions & Problems: 1. This page needs to be able to handle all kinds of add to cart functions. 2. Possible scenarios: a. Positive qty, positive cost, positive price per, no discount b. Positive qty, positive cost, mark-up calc, no discount c. Scenario Table: i. Qty ii. Cost iii. Mark-Up iv. Price Per v. Total vi. Discount vii. Tax Cat viii. Error 3. At what point does each piece come in to play a. Qty b. Cost c. Mark-up d. Price Per e. Total f. Discount: i. 0 ii. % iii. $ off g. Taxes: i. Taxable ii. With tax included – Price per = (Total – tax) / Qty; Qty = (total – tax) / Price Per iii. Non tax 4. What about backing in to a total? Taxes play in here. 5. What about backing in to a quantity from a total? Price is normally the variable however, it becomes quantity and also includes special code to deal with taxes. 6. The page is here to help the users… Does it really need to do everything possible? If yes, great… if no, what is really needed? a. Each time I’m only solving for 1 variable Little table – Unknown var = known vars (Format) Normal: - Total = Qty * price per - Total = Qty * (cost * mark-up (= price per)) - Price Per = Total / Qty - Qty = Total / Price Per With tax included: - Price Per = (Total – tax) / Qty - Qty = (Total – tax) / Price Per |