• Hi everyone

    Im having trouble with a specific price tagging issue. Here is my code:

    `<?php if(get_post_meta($post->ID, ‘price’, true) != “”) { ?>
    <span class=”price-tag”>
    <?php } ?>

    <?php if(get_post_meta($post->ID, ‘price’, true) != “”) { ?>
    <span><?php echo $Price = get_post_meta($post->ID, ‘price’, true); ?></span>
    <?php } ?>

    <?php if(get_post_meta($post->ID, ‘price’, true) != “”) { ?>
    </span>
    <?php } ?>
    <?php if(get_post_meta($post->ID, ‘Authors’, true) == ”) { ?>

    <?php
    if ($Price == ”) {
    echo ‘<span class=”band2 outofstock2″></span>’;
    }
    ?>
    <?php } ?>

    Basically if price field is filled, display price tag and price, If not Show out of stock banner, However I add a authors field so if I do a author blog post I can eliminate the price and and banner.

    However my dilemma now is that if I want to do a Amazon affiliate blog post, I need a price tag to show $ReviewAZON_LowestNewPrice field.

    How do I say if $price empty check $ReviewAZON_LowestNewPrice field, If that is filled show that price. If thats empty check author if thats filled hide price tag and price and out of stock banner. But if thats empty hide price tag and show out of stock banner.

    $price should take priority over $ReviewAZON_LowestNewPrice

    My mind is exploding just typing this!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Price Tag problem’ is closed to new replies.