0
我需要設置我的購物車,並至少需要20美元的金額才能繼續結帳。 這裏是我的代碼,請幫助購物車最低金額
$cartOutput = "";<br />
$cartTotal = "";<br />
$minim = "20";<br />
$pp_checkout_btn = '';<br />
$product_id_array = '';<br />
setlocale(LC_MONETARY, "en_US");<br />
$cartTotal = money_format("%10.2n", $cartTotal);<br />
$minim = money_format("%10.2n", $minim);<br />
// Finish the Checkout Btn
if ($cartTotal > $minim)<br />{<br />
$pp_checkout_btn .=<br />'<form>
<input type="hidden" name="custom" value="' . $product_id_array . '" accept-charset="UTF-8">
<input type="hidden" name="notify_url" value="https://www.com//.php">
<input type="hidden" name="return" value="https://www.gogrocerycart.com/checkout_complete.php">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="Return to The Store">
<input type="hidden" name="cancel_return" value="https://www.gogrocerycart.com/paypal_cancel.php">
<input type="hidden" name="lc" value="US" accept-charset="UTF-8">
<input type="hidden" name="currency_code" value="USD">
<input type="image" align="right" src="http://www.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with - its fast, free and secure!">
</form>';
}else{<br />
$pp_checkout_btn .= "A minimum of ". $minim ." is required ";
}
}
爲什麼你在PHP中使用'
'?如果你想使用它,你必須首先逃脫PHP,所以它將被視爲HTML – am05mhz