- Posts: 29
COMMUNITY FORUM
[SOLVED] Specific Extra Field Data repeats info
- Mariana Ramírez Figueroa
-
Topic Author
- Offline
- Junior Member
Less
More
10 years 10 months ago - 10 years 10 months ago #128892
by Mariana Ramírez Figueroa
[SOLVED] Specific Extra Field Data repeats info was created by Mariana Ramírez Figueroa
Hello! I'm trying to show three specific extra fields in category listings: Price, % Discount and City, using the code
www.evernote.com/shard/s322/sh/1b3ac698-09ef-47a9-820c-2f38fdfa5571/931df93d70f7c78abfd98e2013ceb09d
I know there must be something wrong with the code, but I can't figure out what it is... Has anyone else had this issue? or anyone knows how to fix it?
Please Log in or Create an account to join the conversation.
- jeffrey liu
-
- Offline
- New Member
Less
More
- Posts: 16
10 years 10 months ago #128893
by jeffrey liu
Replied by jeffrey liu on topic Re: Calling Specific Extra Field Data repeats the info
:P
keep only one set of
let foreach do the cycle job. good you only have 1 extra field set, otherwise, its a lists of 6 times of your EF sets.
:lol:
keep only one set of
<span class="catItemExtraFieldsLabel"><?php echo $this->item->extraFields->CiudadoMunicipio->name; ?></span>
<span class="catItemExtraFieldsValue"><?php echo $this->item->extraFields->CiudadoMunicipio->value; ?></span>
let foreach do the cycle job. good you only have 1 extra field set, otherwise, its a lists of 6 times of your EF sets.
:lol:
Please Log in or Create an account to join the conversation.
- Mariana Ramírez Figueroa
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 29
10 years 10 months ago #128894
by Mariana Ramírez Figueroa
Replied by Mariana Ramírez Figueroa on topic Re: Calling Specific Extra Field Data repeats the info
I'm sorry Jeffrey but I'm still a little bit lost here... if I use just
Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 10 months ago #128895
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: Calling Specific Extra Field Data repeats the info
@Mariana
Hi. You have placed the code inside a foreach loop. Doing this will make your code execute as many times as the number of extra fields. If you need to use the extra field alias you need to place your code outside of the loop.
Hi. You have placed the code inside a foreach loop. Doing this will make your code execute as many times as the number of extra fields. If you need to use the extra field alias you need to place your code outside of the loop.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Mariana Ramírez Figueroa
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 29
10 years 10 months ago #128896
by Mariana Ramírez Figueroa
Replied by Mariana Ramírez Figueroa on topic Re: Calling Specific Extra Field Data repeats the info
Hi Lefteris, thanks a lot! it works now :)
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 10 months ago #128897
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: Calling Specific Extra Field Data repeats the info
You are welcome.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.