Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 29th, 2012, 12:07 PM
owncoop owncoop is offline
 
Join Date: Sep 2012
Posts: 16
Default Display Price as a Percentage?

Hi,

Is it possible to modify my site so that the price I enter for custom products displays as a percentage?

Thanks,

Ron


Store ID:
Website URL: consumer.coop
URL to page in question:
  #2  
Old September 29th, 2012, 12:52 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

I guess you could add the price in the format of 0.25 and when you display it on your site, you could have 0.25%.

In your views you could have:

PHP Code:
<?php
if ($product->price 1) {
echo 
"$".$product->price
} else {
echo 
$product->price."%"
}
?>
  #3  
Old September 29th, 2012, 01:04 PM
owncoop owncoop is offline
 
Join Date: Sep 2012
Posts: 16
Default

Hi,

Thanks for the reply. I am experimenting and trying to find a way to display the price without the forced "0." beginning the number, or the ".00" ending the number.

Ideally what I want is the price to appear as "25%".

Any additional advice would be greatly appreciated.

Cheers,

Ron
  #4  
Old September 29th, 2012, 01:08 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

If price is 0.25, then use this:
PHP Code:
<?php echo ($product->price*100)."%"?>
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show reg price and sale price on search results? brightsway Questions 2 June 28th, 2012 12:58 PM
Cannot get price to display in drip post title digitalcow Problems 1 June 1st, 2012 08:55 AM
How to reflect amazon sales price, not 3rd party vendors price jcvm27 Questions 3 January 8th, 2012 04:02 PM
How To Display Discounted Sale Price In Related Products - Custom View erin Questions 3 September 25th, 2011 08:54 AM


All times are GMT -5. The time now is 12:00 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.