=== Automotive Inventory Importer – Sync Car Dealer Feeds ===
Contributors: jawaid
Donate link: https://www.ibexoft.com
Tags: car dealer, automotive, vehicle inventory, XML import, CSV import
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 3.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync car dealer inventory from any XML/CSV feed into WordPress. Field mapping, search & gallery. Multilingual; works with any theme or DMS.

== Description ==

= Automotive Inventory Importer — The Easiest Way to Sync Your Dealer Inventory with WordPress =

Stop typing car data into your website. Automotive Inventory Importer automatically syncs your vehicle inventory from any XML or CSV feed into WordPress, creating professional listings your customers will love.

Whether you run a used car lot with 10 vehicles or a multi-location dealership with 500+, this plugin handles the heavy lifting so you can focus on selling cars.

No DMS lock-in, no theme lock-in, and no language lock-in: it syncs with any DMS export, works with any WordPress theme, and is fully translation-ready with Italian included.

= Works With Any DMS or Inventory Platform =

Our smart field mapping system auto-detects feed structure and works out of the box with exports from every major dealer management system, including:

* **vAuto** (Cox Automotive)
* **HomeNet** (Cox Automotive)
* **Dealer.com** (Cox Automotive)
* **VinSolutions** (Cox Automotive)
* **Dealertrack** (Cox Automotive)
* **CDK Global**
* **Reynolds & Reynolds**
* **DealerSocket** (Solera)
* **DealerCenter**
* **AutoManager**
* **Frazer**
* **Wayne Reaves**
* **DealerCar Search**
* **ELEAD CRM**
* **Tekion**
* **Dominion DMS** (VUE)
* **PBS Systems**
* **Auto/Mate**
* **DealerBuilt**
* **Autosoft**
* **ProMax**
* **Quorum** (XSELLERATOR)
* **Motility** (RV, powersports & trailer)
* **Selly Automotive**
* **Dealer Specialties**
* Any other DMS or inventory platform that exports a flat XML or CSV file

No custom development. No DMS lock-in. No coding required. Map your feed once, and the plugin keeps your inventory in sync forever.

= Why Dealers and Agencies Choose This Plugin =

**No DMS Lock-In — Sync With Any DMS Export**

Unlike other plugins that tie you to a single provider, this one works with any flat XML or CSV export from any dealer management system — vAuto, HomeNet, Dealer.com, CDK, Reynolds & Reynolds, Tekion, PBS, Frazer, DealerCenter, and dozens more. Our smart field mapping auto-detects your feed's fields, shows you sample values, and lets you map them to the right places. Map your feed once and you're done.

**Bring Your Own Theme — Works With Any WordPress Theme**

The plugin is fully theme-agnostic. It renders beautifully on any WordPress theme and ships its own optional listing and detail templates that adopt your theme's styling. It also plays nicely alongside popular automotive themes such as Motors (StylemixThemes), Car Dealer, AutoTrader, Listingo, and Wheels — you're never locked into one look.

**Speaks Your Customers' Language — Multilingual & Translation-Ready**

The plugin is fully translation-ready, and a complete Italian translation is included out of the box. The admin settings and the customer-facing vehicle pages it creates display in your site's language automatically. More languages are welcome — anyone can contribute or improve a translation for the free version through the WordPress.org community. (Your imported vehicle data — make, model, descriptions — is always kept exactly as it comes from your feed.)

**Bring Your Own Inventory Plugin — Import Into Any Post Type (Pro)**

Already using a dealership theme or inventory plugin? With Pro, point the importer at the custom post type your existing setup already uses — such as Inventory Presser, the Motors – Car Dealership & Listing plugin, AutoListings, or WP-CarManager — and your feed data flows straight into it, displayed by the tools you already have. The free version imports into the plugin's built-in Vehicles section.

**Compatible With Google, Meta, and Microsoft Vehicle Listing Standards**

The plugin imports and stores data using field names compatible with the Google Vehicle Listings feed specification (VIN, make, model, trim, year, mileage, condition, price, image_link, dealership_name, dealership_address). Pro version adds Schema.org Vehicle JSON-LD markup, making your vehicle pages eligible for Google rich results.

**Set It and Forget It**

Configure your feed URL, map your fields, and choose a sync schedule. The plugin automatically checks for changes and keeps your website in sync with your physical lot. New vehicle on the lot? It appears on your website. Vehicle sold? It's automatically removed.

**Professional Listings Out of the Box**

Your vehicles display in a clean, responsive grid with search and filter. Each listing includes an image gallery, formatted pricing, and a detailed specs table. No coding or design skills needed.

= Features =

**Import & Sync**

* Import from XML and CSV feeds (URL or server file path)
* Compatible with feeds from vAuto, HomeNet, Dealer.com, VinSolutions, CDK, Reynolds, Dealertrack, DealerSocket, DealerCenter, AutoManager, Frazer, Tekion, PBS Systems, Dominion, DealerBuilt, and any custom XML/CSV export
* Scheduled auto-sync: daily or twice daily (Pro unlocks more frequent sync, down to every few minutes)
* Manual one-click sync from the dashboard
* Smart field mapping with auto-detection and sample values
* Configurable unique identifier field (VIN, stock number, or any field you choose)
* Automatic stale listing management — draft, trash, or mark sold when vehicles leave the feed
* Image import into WordPress Media Library with deduplication
* Customizable title and description templates using tokens like `{manufacturer} {brand} {model_year}`
* ISO 4217 currency format support (USD, EUR, GBP, PKR, AED, and any custom currency)

**Frontend Display**

* Responsive multi-column grid layout for vehicle listings
* Built-in search and filter by make, year, condition, and more
* Image gallery on vehicle detail pages
* Configurable currency formatting (symbol, position, separators)
* Styled vehicle specifications table with icons
* Clean, professional design that works with any theme
* Translation-ready, with a complete Italian (it_IT) translation included — admin and customer-facing pages display in your site's language

**Administration**

* Four-tab settings: Feed & Sync, Field Mapping, Page Templates, Import History
* Quick Start Guide built into the settings page
* Detailed import log with summary statistics
* All imported fields editable in the WordPress vehicle editor
* Auto-validates feed URL on save

= Perfect For =

* Used car dealerships
* New car dealerships
* Multi-location dealer groups
* Auto brokers and wholesalers
* RV, motorcycle, and powersports dealers
* Web agencies building dealer websites
* Anyone importing vehicle data into WordPress

= Pro Version — Available Now =

The free version covers small lots beautifully. When you're ready to grow, Pro unlocks the tools that turn your inventory pages into a selling machine:

* **Google rich results** — adds vehicle listing markup so your cars are eligible for Google's rich vehicle results, helping buyers find you in search.
* **Advanced search & filter** — replace the basic search with price and mileage sliders and one-tap make/year/condition/body filters that update results instantly, no page reload.
* **Full-screen photo gallery** — a polished, swipeable photo viewer on every vehicle page, with keyboard and touch navigation through the whole image set.
* **Lead capture forms** — turn browsers into buyers with an inquiry form on every vehicle page that emails you the lead with the car's details attached.
* **One-click field auto-mapping** — auto-detect and map your feed in a single click, with ready-made setups for popular dealer plugins and themes (Inventory Presser, Motors, and more).
* **Unlimited vehicles** — sync your entire inventory, no matter how large the lot.
* **More frequent sync** — keep your site in step with your lot with sync as often as every few minutes.
* **Import into any post type** — feed your vehicles straight into the inventory structure your existing dealer plugin or theme already uses.
* **Priority support** — get help fast, straight from the team that builds the plugin.

On the roadmap for Pro after launch: bulk edit and multi-location support.

Learn more at https://ibexoft.com/products/automotive-inventory-import-sync-car-dealer-feeds/.

= Companion Plugins (Coming Soon) =

* **VIN Decoder Pro** — NHTSA-compliant VIN validation and decoding
* **Vehicle Feed Exporter Pro** — Push your inventory to Google Vehicle Ads, Meta Automotive Inventory Ads, and Microsoft Advertising

= Support & Feedback =

We actively develop and improve this plugin based on user feedback. If you have a feature request, bug report, or suggestion, please use the support forum or visit ibexoft.com.

== Installation ==

1. Install through the WordPress plugin directory by searching for "Automotive Inventory Importer" or upload the plugin ZIP file via Plugins > Add New > Upload.
2. Activate the plugin through the Plugins menu.
3. Go to Settings > Automotive Inventory Importer.
4. Paste your XML or CSV feed URL on the Feed & Sync tab.
5. Click Save Changes — the plugin will auto-validate your feed.
6. Go to the Field Mapping tab to map your feed fields to vehicle data fields.
7. Choose your sync schedule and click Save Changes.
8. Click Sync Inventory Now to run your first import.
9. Visit the Vehicles menu to see your imported listings, or view /vehicles/ on your frontend.

== Frequently Asked Questions ==

= Does this work with my DMS? =
Yes. The smart field mapping system auto-detects feed structure and works with any flat XML or CSV export. We have verified compatibility with feeds from vAuto, HomeNet, Dealer.com, VinSolutions, Dealertrack, CDK Global, Reynolds & Reynolds, DealerSocket, DealerCenter, AutoManager, Frazer, Wayne Reaves, DealerCar Search, ELEAD, and any custom DMS that can export an XML or CSV file accessible via URL or server path. No custom development required — just map your fields once.

= Is it compatible with the Google Vehicle Listings feed specification? =
Yes. The plugin's field structure aligns with Google's required attributes (VIN, make, model, trim, year, mileage, condition, price, image_link, dealership_name, dealership_address). The Pro version adds Schema.org Vehicle JSON-LD markup, making your vehicle detail pages eligible for Google's vehicle rich results.

= Is it compatible with Meta (Facebook) and Microsoft vehicle ads? =
The plugin imports and stores all the standard fields required by Meta Automotive Inventory Ads and Microsoft Advertising vehicle catalogs. A separate companion plugin, Vehicle Feed Exporter, is in development to push your inventory directly to Google Merchant Center, Meta Catalog, and Microsoft Advertising.

= What XML/CSV formats are supported? =
Any standard CSV with a header row and any flat XML with two levels (root > vehicle > fields). Field names don’t matter — you map them in the settings.

= Does it work with any WordPress theme? =
Yes. The plugin is fully theme-agnostic. It also provides its own frontend templates (optional) for listing and detail pages that adapt to your theme’s styling.

= What happens when a vehicle is sold and removed from the feed? =
You can configure the plugin to automatically draft, trash, or mark as sold any vehicle that disappears from your feed. No manual cleanup required.

= Can I edit vehicle data after import? =
Yes. All imported fields are editable in the WordPress editor. Note that manual edits may be overwritten on the next sync unless you use the upcoming field lock feature in the Pro version.

= Does it import vehicle photos? =
Yes. The plugin downloads all images from your feed into the WordPress Media Library, sets the first as the featured image, and displays all images in a gallery on the detail page.

= Will it slow down my website? =
No. The import runs via WordPress cron in the background. Images are downloaded once and cached in your Media Library. Frontend pages use standard WordPress queries.

= Is the plugin available in other languages? =
Yes. The plugin is fully translation-ready, and a complete Italian (it_IT) translation is included out of the box — the admin settings and the customer-facing vehicle pages display in Italian automatically when your site language is set to Italiano. More languages are welcome: anyone can contribute or improve a translation for the free version at https://translate.wordpress.org/projects/wp-plugins/automotive-feed-import/.

= I need help or have a feature request =
Please use the WordPress.org support forum for this plugin, or visit https://ibexoft.com/products/automotive-inventory-import-sync-car-dealer-feeds/ for direct support.

= Can I import vehicles into a post type from another plugin or theme? =
Yes — this is a Pro feature. Go to **Automotive Sync → Settings → Feed & Sync** and use the **Import Vehicles Into** dropdown to pick any custom post type registered on your site — for example one provided by Inventory Presser, the Motors – Car Dealership & Listing plugin, AutoListings, WP-CarManager, a dealership theme, or your agency's own setup. The plugin will write feed data into that post type instead of the built-in Vehicles section, so the other plugin or theme can display it using its own templates. (The free version imports into the built-in Vehicles section.)

= Is it safe to import into a post type from another plugin? =
The plugin tags every post it creates with an internal marker so it can tell its own data apart from posts you created manually. Stale-listing actions and existence checks only ever touch posts carrying that marker, so your manually-created listings are never modified or deleted by the importer.

That said, importing into another plugin's post type touches data that plugin owns. **Please follow this checklist before your first import into a third-party post type:**

1. Take a full backup of your site (files + database).
2. Test on a staging site first using a small sample of your feed.
3. Verify the other plugin still displays imported vehicles the way you expect.
4. Only after you're satisfied, point the importer at your live site.

**We are not responsible for any data loss, display issues, or compatibility problems caused by importing into a post type managed by another plugin or theme.** Their updates can change how data is stored or displayed at any time. The author of this plugin cannot guarantee compatibility with every third-party plugin or theme. Use this feature with care.

== Screenshots ==

1. Professional vehicle inventory grid with search and filter. Works with any WordPress theme.
2. Vehicle detail page with image gallery, specs table, and formatted pricing.
3. Smart field mapping auto-detects your feed fields and shows sample values. Map any field to any meta key.
4. Simple setup: paste your feed URL, choose sync frequency, and you’re done.
5. Built-in search and filter helps buyers find the right vehicle instantly.
6. Customizable title and description templates using simple tokens like {manufacturer} {brand} {model_year}.
7. Detailed import log with summary stats. Know exactly what was imported, updated, or skipped.
8. Edit any vehicle field directly in WordPress. All imported data is fully editable.
9. Fully responsive design. Vehicle listings look great on any device.
10. Configurable currency formatting. Supports any currency symbol and format.

== Changelog ==

= 3.0.1 =
* **Fixed:** XML feeds from DealerCenter and similar providers now load correctly when feed details appear before or alongside vehicle listings. The Field Mapping screen and Unique ID dropdown no longer appear empty for these feeds.
* **Improved:** Field Mapping now checks multiple vehicles for available fields and shows the first filled-in example value, so fields missing from the first vehicle are still easy to map.

= 3.0.0 =
* **The Pro version is here.** Upgrade to unlock the tools that turn your listings into a selling machine — all built right into the plugin you already know.
* **New (Pro):** Google rich results — adds vehicle listing markup so your cars are eligible for Google's rich vehicle results.
* **New (Pro):** Advanced search & filter with price and mileage sliders and one-tap make/year/condition/body filters that update results instantly.
* **New (Pro):** Full-screen, swipeable photo gallery on every vehicle page, with keyboard and touch navigation.
* **New (Pro):** Lead capture forms on every vehicle page — inquiries are emailed to you with the car's details attached.
* **New (Pro):** One-click field auto-mapping, with ready-made setups for popular dealer plugins and themes (Inventory Presser, Motors, and more).
* **New (Pro):** Unlimited vehicles, more frequent sync (as often as every few minutes), and the option to import straight into the inventory post type your existing dealer plugin or theme already uses.
* **Improved:** Redesigned vehicle listing, detail, and search pages — cleaner cards, a better gallery, and a more polished specs layout that looks great on any theme.
* **Improved:** Friendlier wording and a tidier, more consistent look across the settings screens.

= 2.7.0 =
* **New:** The plugin is now fully translation-ready, and ships with a complete Italian (it_IT) translation. Set your site language to Italiano and both the admin settings and the customer-facing vehicle pages display in Italian automatically.
* **New:** Every interface text — admin settings, buttons, notices, the four settings tabs, the Vehicles section labels, the search and filter bar, the specs table, and all on-page messages — is now translatable. Community translations for the free version are welcome at translate.wordpress.org.
* **Improved:** Imported vehicle data (make, model, descriptions, colors) is always kept exactly as it comes from your feed and is never translated.

= 2.6.0 =
* **New:** A status overview at the top of every settings tab — see at a glance whether your feed is connected, when it last synced, when the next sync runs, and how many vehicles are live.
* **New:** "Check feed link" button — test your feed link instantly before saving, so you know right away if it works.
* **New:** Plain-language setup steps guide you through your first import (Connect → Review fields → Sync), with a one-click "Run first sync now" button so you can finish setup without leaving the page.
* **New:** A clear "Which field is each vehicle's unique ID?" picker on the Field Mapping tab, so the one must-have setting is easy to get right.
* **New:** Import History now explains your last sync in plain English and lists any issues with what to do about them, with the full technical log tucked away behind a toggle.
* **New:** Live preview on the Page Templates tab — see exactly how your vehicle titles and descriptions will look as you type.
* **New:** A ready-to-use default vehicle description, so new sites get sensible descriptions out of the box.
* **New:** A "Sync Status" widget on your WordPress dashboard.
* **New:** Download a sample CSV (in addition to XML) to model your own feed.
* **New:** A clear on-screen overlay while a manual sync runs, so you know to keep the window open until it finishes.
* **Improved:** Every settings save now shows a clear "saved" confirmation.
* **Improved:** Clearer, friendlier wording throughout the settings screens, and a tidier, more consistent look.
* **Improved:** A note on the vehicle edit screen reminds you that feed values refresh on each sync.
* **Fixed:** Currency symbols (£, €) in the settings help text now display correctly.

= 2.5.0 =
* **New:** Import vehicles into any custom post type. Use the new **Import Vehicles Into** dropdown on the Feed & Sync tab to send feed data into a post type provided by another plugin or theme (Inventory Presser, dealership themes, etc.) — your existing frontend keeps owning display.
* **New:** Imported posts now carry an internal marker so the plugin can safely tell its own data apart from posts you created manually. Stale handling and updates never touch unmarked posts.
* **New:** Field mappings are now stored per target post type, so switching between targets preserves prior configurations.
* **New:** When mapping to a third-party post type, the target meta field dropdown suggests meta keys already in use on that post type (so you don't have to read another plugin's docs).
* **Heads-up:** the new universal targeting feature is powerful but writes data into another plugin's post type. **Please back up your site and test on a staging site before using it on production.** We are not responsible for data loss when importing into post types managed by other plugins or themes.
* **Breaking change for custom CSS:** plugin-generated CSS class names are now prefixed `afi-` to prevent clashes with other plugins. If you wrote custom CSS in your theme targeting classes like `.spec-card`, `.filter-form`, `.vehicle-archive-card`, `.view-details-btn`, etc., rename your selectors to use the new `.afi-spec-card`, `.afi-filter-form`, `.afi-vehicle-archive-card`, `.afi-view-details-btn` prefixed versions.

= 2.3 =
* Added CSV feed import support
* Added vehicle search and filter on frontend listing
* Added currency setting
* Added image gallery on vehicle detail page
* Added summary and stats to import log
* Auto-validate feed URL on save
* Redirect to field mapping after successful feed URL entry
* Reschedule import automatically on Save Changes (no deactivation required)
* Delete vehicles from feed when removed from source
* Ignore trashed vehicles during import
* Removed stock_number as a hard requirement
* Multi-column responsive grid card layout for listings
* Vehicle detail page UI improvements including styled specs with colors and icons
* Separated URL input and Browse Server button in settings UI
* Updated placeholder image logic to show real image when available
* Hide posted date on frontend vehicle posts
* Responsive updates across frontend templates

= 2.2.2 =
* Frontend listing improvements
* Users can now map fields between feed and post
* Several UX improvements
* Import images, set featured image, and display them in post
* Users can now import remote feeds

= 2.1 =
* Fixed version mismatch
* Updated name, description, and tags

= 2.0 =
* Added sample XML download from settings page
* Added detailed import success/failure notifications
* Added vehicle data display on frontend
* Added Settings link on plugins page
* Added sample XML structure in readme
* Improved SQL injection protection (all queries use prepared statements)
* Added blueprint.json for WordPress Playground live previews
* Enhanced error messaging and logging
* Improved user experience with better notifications
* Complete rewrite for PHP 8 compatibility
* Added custom 'vehicles' post type (replaces 'listing')
* Added comprehensive settings page (Settings → Automotive Feed Import)
* Added configurable import frequency
* Added token-based post title/content templates
* Added file browser UI for XML path selection
* Added error logging and display system
* Added manual import trigger
* Added dismissible feedback/survey banners
* Made all vehicle fields editable and saveable
* Improved security with proper nonces and escaping
* Automatic migration from old 'listing' post type

= 0.1 =
* Initial release
* Basic XML import functionality
* Hardcoded 10-minute schedule
* Read-only field display

== Upgrade Notice ==

= 3.0.0 =
The Pro version is here. Your free setup keeps working as-is — upgrade to unlock unlimited vehicles, more frequent sync, advanced search, lead capture, Google rich results, and more.

= 2.7.0 =
The plugin is now translation-ready and includes a full Italian translation. No action needed — your existing settings and data are unchanged.

= 2.0 =
Major update with PHP 8 compatibility, custom post type, full settings page, and editable fields. Existing listings will be automatically migrated.