- Posts: 14
COMMUNITY FORUM
set money in extra filds
- teddy
-
Topic Author
- Offline
- New Member
i want create a real state website
how can i use extrafilds for show price like this
example:
100.000.000 dollors
i know with text fild we can do like this
but i want use some module for search in extra filds
like JAK2 Extra fields Filter and Search
or another
with these moduls if i insert price like 100.000.000 dollors we can not filter results
and it dosent work
how can i do this?
insert price and then we can do filter on that...
is here any extensions or triks...
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
You can even assign them to menu items as well
Please Log in or Create an account to join the conversation.
- teddy
-
Topic Author
- Offline
- New Member
- Posts: 14
each Estate have a price for sell
i want insert price of a house like this "10,000,000 dollar"
not like this: 10000000
if in extra filds, we insert some thing like this"10,000,000 dollar" we can not use JAK2 Extra fields Filter and Search for finding houses with searching in price extra fild
sorry about my bad en language....
:(
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
If you wish to use extrafields you can use searchable labels.
If JAK2 Extra fields Filter and Search is not working correctly you should adress this issue to the extension's developers since it was not developed by us.
Please Log in or Create an account to join the conversation.
- teddy
-
Topic Author
- Offline
- New Member
- Posts: 14
i can undrstand how can i do this by tags
have you any website sample or document
can i search items in a price ranges??
with meta tags?
:-?
tnx
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
And in the template file, assuming the price field alias is "Price", add this code:
<?php echo number_format ($this->item->extraFields->Price->value,0,',','.'). " dollars"; ?>
this should print the value as you want: 100.000.000
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- teddy
-
Topic Author
- Offline
- New Member
- Posts: 14
tnx a lot
where i have to add this code
k2 template? which file?
and how can i say show price only in itemes that we add price extra fild
thank you so much :kiss:
:woohoo:
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
yes, this can be added in item.php, category_item.php or latest_item.php, according to which page you are showing.
to display price only when price extra field is entered:
<?php
if($this->item->extraFields->Price->value)
echo number_format ($this->item->extraFields->Price->value,0,',','.'). " dollars";
?>
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- teddy
-
Topic Author
- Offline
- New Member
- Posts: 14
Mohamed Abdelaziz wrote: Hi
yes, this can be added in item.php, category_item.php or latest_item.php, according to which page you are showing.
to display price only when price extra field is entered:<?php if($this->item->extraFields->Price->value) echo number_format ($this->item->extraFields->Price->value,0,',','.'). " dollars"; ?>
hi Mohamed
thanks again
i add your code in item.php and it work
but with this code we have price in 2 places
now:
i want to change this code
this is part of item.php , where is extra filds codes are there
Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
<div class="itemExtraFields">
<h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
<?php if($extraField->alias=="Price"): ?>
<span class="itemExtraFieldsValue"><?php echo number_format ($extraField->value,0,',','.'). " dollars"; ?></span>
<?php else: ?>
<span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- teddy
-
Topic Author
- Offline
- New Member
- Posts: 14
Mohamed Abdelaziz wrote: Assuming that the field alias is "Price", here is the modified
thank you dear mohamed
i change it a little and now this is what thing that i want...
:kiss:
Please Log in or Create an account to join the conversation.