Keyword

[SOLVED] Extra Fields don't show

  • antoine
  • antoine's Avatar Topic Author
  • Offline
  • New Member
More
8 years 9 months ago #144532 by antoine
Extra Fields don't show was created by antoine
Hi, I have a problem with any extrafields.

I have 8 extrafields in a group, all published and assigned to one category.

I have modified item.php with override, because I am doing a personalized page. In item.php I have:
$array_imgs_producto = array();
$array_etiquetas = array();
$array_ficha_tecnica = array();

if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields))
{
foreach ($this->item->extra_fields as $indice=>$extra)
{
if( $extra->id == '3' || $extra->id == '4' || $extra->id == '5' )
{
$array_imgs_producto[] = $extra;
}
elseif ( $extra->id == '6' || $extra->id == '7' || $extra->id == '8' || $extra->id == '9' || $extra->id == '10' )
{
$array_etiquetas[] = $extra;
}
else
{
$array_ficha_tecnica[] = $extra;
}
}
}

Then, I use foreach for use each extrafield of my arrays where I want:

foreach ($nameofarray as $klave=>$imgproducto): my code here

I have defined 2 elements (id = 3 and id = 4) that they are in $array_imgs_producto.
I have define 1 element (id = 6) that it must to be in $array_etiquetas, but this second array doesn't works.
Furthermore I added other element with id = 11 that it must to be in third array, $array_ficha_tecnica, but doesn't works neither.

Why? I don't understand first array work and second and third no.

I have put var_dump($this->item->extra_fields) and it shows only elements with id = 3 and id = 4. Other elements don't appears.

Can you help me, please.

My webpage is: goo.gl/eA6VJt

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

  • antoine
  • antoine's Avatar Topic Author
  • Offline
  • New Member
More
8 years 9 months ago #144533 by antoine
Replied by antoine on topic Extra Fields don't show
Hi again.

I'm embarrased :(

I have been all day investigating and now I have found what is the problem.

I had modified only one item of my K2 category with extra fields and when I was consulting in frontend I was viewing other different item.

I am completely silly.

I think that it is for fatighe programming all day.

Regards and thank you very much.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 9 months ago #144587 by Krikor Boghossian
Replied by Krikor Boghossian on topic Extra Fields don't show

I think that it is for fatighe programming all day.


You are right on this one. Burn out is no fun Antoine.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum