-
AuthorPosts
-
Luna Garden Moderator
Luna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
May 31, 2016 at 3:59 am #936255May 31, 2016 at 6:45 pm #936519Yes that is true, but on the original initial install, the attributes created with K2 extra fields were were showing with the template set to grid so I don’t understand why changing the name of the Category all of a sudden causes the extra field not to show.
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 1, 2016 at 9:54 am #936703June 1, 2016 at 5:30 pm #936812I created another site from scratch, as you can see from the link below, the car options are showing, so I do not understand why these extra fields are not showing now.
http://caninfo1.securesites.net/dcc/index.php/choose-cars/item/36-nissan-micraYes, that would be nice thank you. I would like all of the extra fields to show up the detail page with the price, similar to the look on your version of Rent.
Please remember that the link to the site that I am working on remains the same.
http://caninfo1.securesites.net/directcreditconnection/administratorThanks
GaryLuna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 2, 2016 at 9:03 am #937037Hi,
I have fixed in file
templates/ja_rent/html/com_k2/grid/item.php
of site http://caninfo1.securesites.net/directcreditconnection/
June 2, 2016 at 5:01 pm #937159Thank you for all your help. I also like to add on more item and that is the word sold on certain vehicles on both the category and detail pages of the K2 pages on the website.
Thanks
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 3, 2016 at 3:26 am #937243I also like to add on more item and that is the word sold on certain vehicles on both the category and detail pages of the K2 pages on the website.
Could you clarify more details of what you want to add? it would be better with image capture
June 3, 2016 at 3:19 pm #937599I just want a way to show that a vehicle has been sold and want it displayed on both the category and item pages.
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 6, 2016 at 7:29 am #938040June 14, 2016 at 4:26 pm #940513Could you please provide me with an example piece of code?
Thanks
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 16, 2016 at 8:55 am #941043Hi,
Here is my suggestion code:
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?> <?php if($extraField->value != ''): ?> <?php if($extraField->name == 'Sold'): ?> <?php echo '<div class="item-sold">'.$extraField->value.'</div>'; ?> <?php endif; ?> <?php endif; ?> <?php endforeach; ?>
You have a K2 Extra field name ‘Sold’ type Text Field, add value ‘Sold’ if this vehicle is Sold, else let it Null. Above code will check name, and status of K2 Extra Field and show the text Sold if it has all condition.
June 16, 2016 at 6:50 pm #941207Hi I added the code as you suggested. When I add the word sold to the "Sold" field the word does show up but when I remove the word sold from the field and go to save the K2 items article an error icon shows up and I am unable to save the article.
Another problem is the that the word sold appears 2 times on the item.php page.
Thanks
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 17, 2016 at 3:26 am #941317June 17, 2016 at 4:50 pm #941525Thank you that worked, however another problem has appeared. An element style has added style="min-height: 503px; to the category-item.php page, causing a large space below the word sold. Could you please tell where I can go to alter this so that I can reduce this gap?
Thanks
Luna Garden ModeratorLuna Garden
- Join date:
- July 2011
- Posts:
- 2617
- Downloads:
- 80
- Uploads:
- 96
- Thanks:
- 78
- Thanked:
- 453 times in 425 posts
June 20, 2016 at 7:31 am #942018Could you provide the exact link with the error, I couldn’t see it in your website URL: http://caninfo1.securesites.net/directcreditconnection/
-
AuthorPosts
This topic contains 28 replies, has 2 voices, and was last updated by gary1234 8 years, 4 months ago.
The topic ‘K2 Extra Fields not showing.’ is closed to new replies.