Motors classified Makes and Models relationship

Started by: Stylemix Themes July 21, 2016 - 05:11

Relationship feature is included for Listing Search module which appears just under the banner on the Home page. This option help to find & select needed makes and its models faster. In order to realize this relationship you need to follow this steps:
  • Set parent Category (Make) for Models:

    listing categories

  • After this it needs go to Manage Models and set correct parent Makes for each Models:

    2

    3



Replies:

  • Author Team
    #7531 Reply

    Axel
    Hello Jason,

    Please provide your CSV file in your support ticket and we will check it in our testing environment.

    Regards

    #7535 Reply

    Jason Barbour
    Hi Axel, I sent it in the ticket.

    Thanks!

    #7713 Reply

    Vbphoto
    Good afternoon, I think a lot of people come in handy.
    If you need to block the selection of the model, until the brand is selected. do the following:

    in file /themes/motors/assets/js/app-ajax.js

    in the beginning it is necessary to add, after
    ============================
    (function($) {
    "use strict";
    ============================
    this is the code

    function SearchBox (form) {
    this.form = form;
    this.listing = $('body').hasClass('stm-template-listing');
    this.init();
    $('#basic').selectric();
    }

    SearchBox.prototype.init = function () {
    var timer, self = this;
    $('select:not(.hide)', this.form).select2().on('change', function () {
    if (timer) {
    clearTimeout(timer);
    }

    timer = setTimeout($.proxy(self.performAjax, self), 300);
    });
    $("select[name='serie']").prop( "disabled", true );

    };

    Author Team
    #7723 Reply

    Axel
    Hello Vbphoto,

    Thank you for the information!

    #7810 Reply

    Jason Barbour

    My listings are currently set like: Make > Model > Sub-Model. For example Honda (slug: honda)> Civic (slug: civic)> Civic Hybrid(slug: civic-hybrid). When the listings are updated via WP All Import, the sub model is recreated as Civic Hybrid(slug: civic-hybrid-2). Is there a way to avoid duplicating the models when they use a Parent model?

    Author Team
    #7811 Reply

    Axel

    The theme doesn't support such relationship hierarchy by default. In other words, your Model category is already child for Make category, therefore, it can't be a parent for other categories.

    Regards

    #7813 Reply

    Jason Barbour

    Ok, I guess I got confused by the hierarchy section in 'Edit Model'. In the pic below I assigned the Model 3-Series to the parent term, 3 Series (no '-' dash).

    Model hierarchy

    The parent category is BMW:

    Parent Category

    Should the Parent Term section just be ignored?

    Author Team
    #7819 Reply

    Felix

    Hi Jason,

    Please try to update STM Import Makes & Models plugin on your site.Here you can downloadthe latest version of this plugin.

    regards

    Author Team
    #7820 Reply

    Felix

    Hi Jason,

    Please ignore my previous reply :)

    Should the Parent Term section just be ignored?

    Sure, you can ignore it and leave this option as empty.

    regards

    #7822 Reply

    Jason Barbour

    Thanks. Does that section have a particular function?

    Author Team
    #7829 Reply

    Axel

    This a standard WordPress category option and it doesn't work for listing categories. We will disable this section in our coming update.

    Regards

    #7832 Reply

    Jason Barbour

    Would it be possible to integrate it one day? I can seen this as being helpful to people using the classified layout because different dealers use different taxonomies (accord sdn vs accord sedan). It would help to simplify and clean up the search.

    I have no idea how difficult it would be to integrate...it's just a thought.

    #7833 Reply

    Jason Barbour

    A temp fix is to rewrite the model on import. In case anyone else needs it, I used this php code from github and it works perfectly:https://gist.github.com/m-thomson/921e3f5d9e7a4687d91a906b9d3af2d9

    #8083 Reply

    Matthew Shillings

    Hello,

    As a novice to Java Script could you give a bit of adivce of how to access this file to add the above code?

    I can find the file in the folder that I dowloaded when i purchased the theme. However I do not know how to do this for my theme that I already have running on my site.

    Any help is appriciated.

    Matt

    Author Team
    #8085 Reply

    Felix

    HiMatthew,

    Could you clarify, which file did you mean and what kind of difficulties do you have on your site? Thanks in advance!

    regards

  • Viewing 15 posts - 16 through 30 (of 32 total)
You must be logged in to reply to this topic.