Featured cars block not working

Discussion in 'Auto Classifieds Script' started by willylions, Jan 11, 2017.

  1. willylions

    willylions New Member

    Hi, recently noticed that the "Featured cars" block stopped working all if sudden. is not showing any results on the homepage featured position. I've change the block position to check if it work some other place but it doesn't work either. It only shows the advertising banner set on that position.

    What could it be and how can i solve this?

    Attached Files:

  2. olairmarcos

    olairmarcos Member

    Hello, what template are you using on the site?
  3. willylions

    willylions New Member

    Hi there, im using Autosales template for this site.
  4. olairmarcos

    olairmarcos Member

    Hello, I do not see anything wrong, here it is working correctly, in the autosales template.
    Did not you delete some code in the template?
  5. willylions

    willylions New Member

    I havent deleted any code, haven't even touched the code in a long time. it happened all of sudden. The issue is with the tabs on homepage, the ones for Featured cars and Recent listings. it just shows the content of the "recnt listings" tab, the one for featured cars is not showing. Test it: http://www.garaje.do/

    Attached Files:

  6. willylions

    willylions New Member

    The issue is with the file "root/templates/mytheme/packages/autos/block.featured-cars.tpl"

    the file starts like this: {if isset($car_blocks_data.featured)}

    anything under that line is not loaded, i added some text before the line and it did show the text. So the issue is with this: {if isset($car_blocks_data.featured)}
  7. olairmarcos

    olairmarcos Member

    Yo recomiendo la descarga de los "autosales" plantilla y para comprobar todos los archivos de plantilla en el sitio.
    Si ha instalado recientemente cualquier plugin, intente deshabilitar para ver si se ejecuta ningún efecto.
    He hecho varias pruebas en mi sitio web y no tengo ningún problema con los "autos" paquete y no hay problema con la plantilla "autosales."
    Comprobar todos los archivos en:
    /packages/autos/templates
    /templates/autosales/packages/autos


    A disposición.
  8. willylions

    willylions New Member

    Ive checked those files that i haven't touch in a long time. couldn't find the problem. Havent installed any new plugins lately.

    You really dont have issues with the Featured /Recent Cars Tabs on the homepage? the "featured cars" tab is not working. it only shows the "recent cars" tab content.

    And the Console ain't showing any error.
  9. olairmarcos

    olairmarcos Member

    You can see the test here. http://urbebrasil.com.br/demo/subrion405/
    I installed again the Subrion 405, template autosales and the autos package. I have not changed any settings and it's working properly.

    Try removing the banner that exists in the block (just below the "featured" buttons). This may be causing the problem.
    Last edited: Jan 17, 2017 at 2:32 PM
  10. willylions

    willylions New Member

    Hi olairmarcos, thanks for the help. i removed the banners as you suggested resulting in not showing the Featured cars Tab since one of the banner is position on that block. So as i stated earlier i think the issue is with the file "root/templates/mytheme/packages/autos/block.featured-cars.tpl" cause that file gets load but the code after {if isset($car_blocks_data.featured)} is not loading
  11. olairmarcos

    olairmarcos Member

    Past the code file "root/templates/mytheme/packages/autos/block.featured-cars.tpl" for me to see.
  12. willylions

    willylions New Member

    Sure thing, but i got to make the note that i've downloaded the autosales theme recently and replaced that file for the new one and the problem still persisted. Also did the same with the layout.tpl file and nothing changed.

    here's the code:

    PHP:
    {if isset($car_blocks_data.featured)}
        <div class="ia-items featured-cars">
            <div class="row">
                {foreach $car_blocks_data.featured as $item}
                    <div class="col-md-4">
                        <div class="ia-card -{$item.status} {if 'hidden' == $item.status}-hidden{/if}">

                            {if $item.auto_pictures}
                                <a class="ia-card__image" href="{$item.link}">
                                    {printImage imgfile=$item.auto_pictures[0]['path'] title=$item.model}

                                    <span class="ia-card__badge">{lang key="field_condition_{$item.condition}"}</span>

                                    <span class="ia-card__support-info">
                                        <span class="pull-left"><span class="fa fa-image"></span> {$item.auto_pictures_num}</span>
                                        <span class="pull-right">{$item.date_added|date_format:$core.config.date_format}</span>
                                    </span>
                                </a>
                            {/if}

                            <div class="ia-card__content">
                                <div class="ia-card__actions dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="fa fa-ellipsis-h"></span></a>
                                    <ul class="dropdown-menu pull-right no-drop">
                                        <li>{printFavorites item=$item itemtype='autos' guests=true}</li>
                                        <li><a href="{$item.link}"><span class="fa fa-automobile"></span> {lang key='car_details'}</a></li>
                                        <li>{accountActions item=$item itemtype='autos'}</li>
                                    </ul>
                                </div>
                                <a class="ia-card__title" href="{$item.link}"><b>{$item.model}, {$item.release_year}</b></a>
                                <p class="ia-card__sub-title">{$item.price}</p>
                                {if $item.mileage}
                                    <p class="ia-card__text">
                                        <span class="fa fa-tachometer"></span> <b>{$item.mileage}</b>
                                    </p>
                                {/if}
                                <p class="ia-card__text">
                                    {if $item.engine}
                                        {if $item.engine_type}{lang key="field_engine_type_{$item.engine_type}"},{/if} {lang key="field_engine_{$item.engine}"}{if $item.engine_size}, {$item.engine_size}L{/if},
                                    {/if}
                                    {if $item.transmission}
                                        {lang key="field_transmission_{$item.transmission}"},
                                    {/if}
                                    {lang key="field_exterior_color_{$item.exterior_color}"}
                                </p>
                            </div>
                        </div>
                    </div>

                    {if $item@iteration % 3 == 0 && !$item@last}
                        </div>
                        <div class="row">
                    {/if}
                {/foreach}
            </div>
        </div>
    {/if}
  13. olairmarcos

    olairmarcos Member

    The code is correct, I pasted it in my site and it works normal.
    Try to delete all files from the / tmp folder on the site.
    Make sure the featured items are expired, edit the item (vehicle) through the control panel.

    Thanks for listening.
  14. willylions

    willylions New Member

    Thanks again olairmarcos. did just what you suggested but had no luck.
    Edited al featured items, and removed all files in the /tmp folder.
    still not working.
  15. olairmarcos

    olairmarcos Member

    Change the current site template to "kickstart" and see if the "featured" block shows the featured vehicles.
    So we can know if the problem is in the autosales template or in the autos package.

    Thanks for listening.
  16. willylions

    willylions New Member


    Im afraid that if i change the template lots of configurations and translations will be lost. It happened to me before.
  17. olairmarcos

    olairmarcos Member

    If you did the translation in the control panel, it could happen.
    Otherwise I can not help you, because I do not have access to your files.
    For me it's working normal.

    It tries to make the Repair tables, Optimize tables and Repair/recount autos models.
    2017-01-19_172040.jpg

    It can work again.

    Thanks for listening.
  18. willylions

    willylions New Member

    Try that with no luck. Also tried replacing each Autos Package file with a recent downloaded auto package file and that didn't worked either. Running out of options here. But i do appreciate a lot your help.
  19. olairmarcos

    olairmarcos Member

    If you have other plugins installed on the site, try to disable the plugins to see if they have any effect.
    Thanks for listening.

Share This Page