gjh42:
The statements you have given are not correct PHP syntax, but we would need to know your exact variable names to give a corrected version.
You would say something like
if ($gift_certificate_amount > 0) {
$customized_product_total = $myprice - $gift_certificate_amount;
}
> No "else" is required because if the amount is zero you don't need to do anything.
>
> You could also simply say
> ```php
$customized_product_total = $myprice - $gift_certificate_amount;
and if the GC is zero, it will leave the total as is. Very simple.
Substitute your actual variable names if they are different, and double check spellings. You had several typos in your posted version - they would be fatal to your code.
Good luck.
Here is my edited code
-CODE
$product_total = $currencies->display_price($orders_products->fields['final_price'], 0);
$custom = $product_total - $gift_certificate_amount
$extra_delivery_info . ' ' . ($product_details !='' ? ' Price includes add-on(s) ' : '') . $product_info . $upgrade_info . $product_details . ' Total Order Amount: ' . $custom . "\n";
Here is what it is now
-CODE
$product_total = $currencies->display_price($orders_products->fields['final_price'], 0);
$extra_delivery_info . ' ' . ($product_details !='' ? ' Price includes add-on(s) ' : '') . $product_info . $upgrade_info . $product_details . ' Total Order Amount: ' . $product_total . "\n";
I did go ahead and test it out, it processed okay but the problem it did not show up as my gift certificate. The balance stayed the same... whats the problem?
Thanks
DNG