I'm trying to automate the delivery (free above 50) message in my template. Currently I'm echo'ing the normal price & discount price (if available) which results in digits.
I have a post with Normal_price = 55 / Discount_price = 38
I'm new to PHP but tried the following:
<?php $discount = (get_post_meta($post->ID, 'Discount_price', true));
$normal = (get_post_meta($post->ID, 'Normal_price', true));
if $discount = (>= 50) {
echo 'under 50 euro';
}
else if $normal = (>= 50) {
echo 'under 50 euro';
}
else
{
echo 'above 50 euro';
}
?>
How do I declare $discount = post_meta 'Discount_Price'?