=== 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: 6.9
Requires PHP: 8.0
Stable tag: 2.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync your car dealer inventory from XML or CSV feeds to WordPress. Auto-import vehicles with field mapping, search, gallery & more.

== 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.

= Why Dealers and Agencies Choose This Plugin =

**Works With Any Feed, Any Theme**
Unlike other plugins that lock you into a specific theme or DMS provider, Automotive Inventory Importer works with any flat XML or CSV feed and any WordPress theme. Our smart field mapping system auto-detects your feed’s fields, shows you sample values, and lets you map them to the right places — no custom development required.

**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)
• Scheduled auto-sync: every 5 minutes to daily
• Manual one-click sync from the dashboard
• Smart field mapping with auto-detection and sample values
• Configurable unique identifier field (not locked to stock number)
• 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}

**Frontend Display**
• Responsive multi-column grid layout for vehicle listings
• Built-in search and filter by make, year, condition, and more
• Image gallery with lightbox on vehicle detail pages
• Configurable currency formatting (symbol, position, separators)
• Styled vehicle specifications table with icons
• Clean, professional design that works with any theme

**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
• Auto brokers and wholesalers
• RV and motorcycle dealers
• Web agencies building dealer websites
• Anyone importing vehicle data into WordPress

= Pro Version Coming Soon =

We’re building a Pro version with advanced features including JSON/API import, AJAX-powered advanced filters with price sliders, vehicle schema markup for Google rich results, field lock to prevent sync overwrite, lead capture forms, multi-location support, custom layout templates, email digest reports, and more.

= 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 (Dealer Management System)? =
Yes, as long as your DMS can export inventory as an XML or CSV file accessible via a URL or uploaded to your server. The smart field mapping system handles differences in field names automatically.

= What XML/CSV formats are supported? =
Any flat XML with two levels (root > vehicle > fields) and any standard CSV with a header row. 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 provides its own frontend templates 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 there a Pro version? =
A Pro version is in development with features including JSON/API import, advanced AJAX filters, vehicle schema markup for SEO, field lock protection, lead capture forms, multi-location support, and more. Stay tuned!

= I need help or have a feature request =
Please use the WordPress.org support forum for this plugin, or visit ibexoft.com for direct support.

== 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 ==

= 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 ==

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