Hello samgreco, I am a huge

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1096
Hello samgreco, I am a huge

Hello samgreco,

I am a huge programming neophyte myself Smiling

Have you looked into creating your own product template file? Take a look at: http://www.ubercart.org/forum/development/3868/nifty_products_tutorial_p... With this, you can use php code to control what is output to the browser.

For instance, you could try this, which would display the text you want for product's whose node ID is either 12 or 24. You can have the code check for as many node IDs here as you need by using the OP operator: ||

<?php if (($node->nid == 12) || ($node->nid == 24)): ?>
  <div class="sell_price">
    Sell Price: Click Add to Cart to get our price
  </div>
  <?php else: ?>
  <div class="sell_price">
    Sell Price: <?php print uc_currency_format($node->sell_price) ?>
  </div>
<?php endif; ?>

Or another way that comes to mind is an adaptation of Alaska's 'Items on sale' method (reply #9 here: http://www.ubercart.org/forum/support/543/items_sale_how#comment-32280)

This method will eliminate the need to continuously update your node-product-template.php with additional node IDs. Instead, when you edit a product at configure it's list price at a higher level than it's sell price, this will effectively hide the sell price from the browser. This way you can do everything from your browser without having to alter your theme file over and over again.

<?php if ($sell_price < $list_price): ?>
  <div class="sell_price">
    Sell Price: Click Add to Cart to get our price
  </div>
  <?php else: ?>
  <div class="sell_price">
    Sell Price: <?php print uc_currency_format($node->sell_price) ?>
  </div>
<?php endif; ?>

There are many other methods but hopefully this gets you a good start!

Regards,
BigMike

Disable Product - Price, Add to Cart, Wishlist By: webmasterkai (47 replies) Fri, 07/18/2008 - 12:45