Keyword

set money in extra filds

More
11 years 11 months ago #114946 by teddy
set money in extra filds was created by teddy
hi

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 11 months ago #114947 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: set money in extra filds
If you want filtering, searching you probably need a new taxonomy so why don't you try using tags instead?

You can even assign them to menu items as well

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #114948 by teddy
Replied by teddy on topic Re: set money in extra filds
i want use k2 items for insert Estates

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 11 months ago #114949 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: set money in extra filds
Teddy my proposed solution is to use tags as well for price ranges.

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.

More
11 years 11 months ago #114950 by teddy
Replied by teddy on topic Re: set money in extra filds
dear Krikor Boghossian

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
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 11 months ago #114951 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: set money in extra filds
You can enter the numbers in the text field without any formatting, like this: 100000000
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.

More
11 years 11 months ago #114952 by teddy
Replied by teddy on topic Re: set money in extra filds
dear mohamed
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
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 11 months ago #114953 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: set money in extra filds
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";
?>

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.

More
11 years 11 months ago - 11 years 11 months ago #114954 by teddy
Replied by teddy on topic Re: set money in extra filds

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
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
11 years 11 months ago #114955 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Re: set money in extra filds
Assuming that the field alias is "Price", here is the modified code:
<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.

More
11 years 11 months ago #114956 by teddy
Replied by teddy on topic Re: set money in extra filds

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.