• Looking at your plugin and was wondering how friendly the meta information is for importing vehicles from the wordpress API I have have my vehicles in another database and I’d like to make an auto push to the pluggin. Do you have any listing of the fields or additional information on if something like that work work?

    http://wordpress.org/plugins/car-demon/

Viewing 1 replies (of 1 total)
  • Plugin Author theverylastperson

    (@theverylastperson)

    If you’re looking for a quick solution there’s a commercial import tool available that has presets for several popular vehicle inventory systems and it also allows you to adjust columns to import from a custom CSV.

    If you’re wanting to write your own import plugin or write a PlugIn that interacts with the data then I’ll do what I can to share with you how the data is stored, searched and displayed.

    Car Demon uses a Custom Post Type (cars_for_sale) to store vehicles. Several of the fields are taxonomies, like condition, body style, year, make, model and location. Some information is stored in it’s very own post meta field, like the vin number. It’s in a meta field called; _vin_value

    There is also a meta field called ‘decode_string’ it stores a $key[$value] array with information like; doors, exterior color, and other information that might be decoded etc. Ideally, it should also contain the information from the taxonomies and other meta fields and a future release of Car Demon will work to keep that information synched so it can be called with a single meta field.

    The newest version of Car Demon 1.2.9, which should be released on 1-20-2014, contains the following function;

    car_demon_get_car($post_id);

    This will return any array ( $key[$value] ) that you can call within a loop. You can call it like this;

    $x = car_demon_get_car($post_id);
    print_r($x);

    This will show you what fields are available and if you inspect the function you will see exactly where that information is stored.

    Remember, we intend store some information in more than one place. So even though the ‘Year’ might be a taxonomy we also want to store it in the ‘decode’ meta field.

    Why?

    Because we want to reduce the number of get_post_meta calls to limit the server resources needed to display a vehicle within the loop.

    We need to keep that information as taxonomies or in their own meta fields so we can easily search, filter or sort by it if needed but we also want to store it in the decode field so it can be displayed easily.

    I hope this information helps and doesn’t confuse. If you need clarification or have suggestions on data storage / display please share.

    take care,
    -j

Viewing 1 replies (of 1 total)
  • The topic ‘Populate from wordpress API’ is closed to new replies.