This is a discussion on What's wrong in my code for price=0 to disappear in feature_listings_horizontal? within the v3.1 Questions & Support forums, part of the v3.1 Legacy Help & Support category; Hello, in function.feature_listings_horizontal.php: //$output .= "<td" . smarty_function_html_table_cycle_68('td', $td_attr, $c) . ">"; //text $output.=$loop[$x][title] ."<br />"; if($show_price=='Y') { $output.= $loop[$x][price]; ...
|
|||||||
|
|
LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
in function.feature_listings_horizontal.php: Quote:
but what is the syntax to say that price is DIFFERENT OF 0? I have tried with price<1 but this trick doesn't work Thanks in advance, gramlou v3.1.10 |
|
#2
|
||||
|
||||
|
For starters, the zero should be in quotes. Next you need to make sure zero is what is actually displayed when a price is zero. 0 is not the same as 0.00 which is not the sames as $0.00.
__________________
Larry. (Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free) Set your site apart from the competition with one of my modules...... Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module 68 Classifieds Important Links Customer Area | Issue Tracker | Knowledge Base | User Manuals |
|
#3
|
||||
|
||||
|
I haven't tried or tested this, but I don't see why it wouldn't work. Try this instead:
Code:
$output.=$loop[$x][title] ."<br />";
if($show_price=='Y')
{
if(price=='0.00')
{
$output.=" ";
}
else
{
$output.= $loop[$x][price];
}
}
//close td
$output.="</td>\n";
-Mike
__________________
Mike-N-Tosh v3.1.10 Developer IndianaPC.org - A community website Sandbox v4.0.9, 4.1RC2 Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds. Web Hosting | Web Design & Development | 68 Classifieds Customizations I am not a 68C employee, just a user and try to help out |
|
#4
|
|||
|
|||
|
Thanks Larry for this quick answer.
I didn't thought i have to carry about 0 is not the same as 0.00 which is not the sames as $0.00. Now i get care of it Thanks Mike for this quick proposal. I have pasted the code and the feature disappear. Perhaps I have pasted at the wrong location. I will retry but i have an idea of what to do now. Gramlou |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What the {if} am I doing wrong? | BigOrange | v3.1 Modules & Modifications | 13 | 08-19-2008 07:02 PM |
| text disappear when typed | VotreEspace | v4 Questions & Support | 3 | 07-07-2008 05:50 PM |
| My 68c modification story..Tell me if I'm wrong | GPM55 | Off Topic | 16 | 04-18-2008 12:03 AM |
| Wrong Version | Pierce | v3.1 Questions & Support | 3 | 09-18-2007 03:06 AM |
| Wrong PREFIX in usershare | MVBaker | v3.1 Questions & Support | 4 | 11-03-2006 12:41 AM |