Help with Featured Ads/ and several minor edits

Discussion in 'Auto Classifieds Script' started by Laith, Mar 24, 2018.

  1. Laith

    Laith New Member

    Hello

    I am currently running the latest subrion CMS on the Auto Classification package and I am launching ,y product soon Very soon so please I need help on changing the following

    1-Featured cars come on top of search listing (on the same MAKE)

    Screenshot 2018-03-24 at 9.07.58 PM.png

    2- How to remove the bulletin features of the plan . (YouTube video"NO") would rather not have it shown
    Screenshot 2018-03-24 at 8.21.06 PM.png

    Thank you for the effort you guys are doing a great job.
  2. Dayir_A.

    Dayir_A. Staff Member

    Hello @Latih,

    1. Please find the code below:

    PHP:
            $sql = <<<SQL
    SELECT SQL_CALC_FOUND_ROWS t1.*, t3.`name` `make`, t2.`name` `make_model`, t2.`title` `model`,
        t4.`username` `owner_username`, t4.`fullname` `owner_fullname`,
        (SELECT ROUND(AVG(`price`)) FROM `:table_autos` WHERE `model_id` = t1.`model_id` && `release_year` = t1.`release_year`) `average_price`
        FROM `:table_autos` t1
    LEFT JOIN `:table_models` t2 ON t1.`model_id` = t2.`id`
    LEFT JOIN `:table_models` t3 ON t2.`pid` = t3.`id`
    LEFT JOIN `:table_members` t4 ON t1.`member_id` = t4.`id`
    WHERE :conditions
    ORDER BY :order
    LIMIT :start, :limit
    SQL
    ;
    in /modules/autos/includes/classes/ia.front.auto.php file.

    and change ORDER BY line with:

    Code (Text):

    ORDER BY sponsored desc, :order
     
    2. You can remove these options block by editing file /templates/_common/plans.tpl

    and remove or comment below code:

    HTML:
    <div class="well">
                                <ul>
                                    {foreach $plan.options as $option}
                                        <li>{lang key="plan_option_{$option.item}_{$option.name}"} —
                                        {if 'bool' == $option.type}
                                            {if $option.value}{lang key='yes'}{else}{lang key='no'}{/if}
                                        {else}
                                            {$option.value|escape}
                                        {/if}
                                        </li>
                                    {/foreach}
                                </ul>
                            </div>
    Thanks.

Share This Page