* This is all done on the checkout page.] ![]() It gets instantiated on the clients side and passed is this construction function. * string $discount_amount [The class checkCouponCode calculates this discount amount based on the Therefore we set the default value to an empty string.] * But does get passed in when called on the checkout.php page. * Doesn't show if i put it before if($_POST */Įcho "grand_total' />" // Shows the grand total after second from submissionĮcho "$cart_totals->grand_total" // Shows grand total after the first submission $cart_totals = new cartTotals($subtotal, $discounted_amount,$post_values->tip) // Cart class is shown below Another class calculates the subtotal assigns it the variable $subtotal * Doesn't show if i put it after if($_POST */ If I click on submit again it will show the grand total of $10.00.īelow is my code that I am working with. If the grand total is $10.00 and I click on submit. The weird thing is when I echo the value of the grand total it display the latest value, but not with the POST arrayįor example. I need to hit the button twice to get the last value. ![]() When click on submit, the _POST array doesn't get back the last value of the grand total. The value of the grand total is inside a hidden field. I am working with a form that shows the grand total on the checkout page. I have checkbox and when the user tick one or more box these should be stored as 0 or 1 but since its while loop, I am not sure how to work that out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |