=== Cartvai – Ecommerce Checkout, Funnel Builder & Shop Manager ===
Contributors: cartvai
Tags: ecommerce, sales funnel, checkout, order management, online store
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WordPress ecommerce plugin with one-page checkout, sales funnels, product management, orders, customers, shipping, and analytics. No WooCommerce.

== Description ==

Cartvai is a standalone **ecommerce plugin for WordPress** that gives you everything you need to sell products online — product management, mini cart, one-page checkout, sales funnels, order management, customer records, shipping, and analytics — without requiring WooCommerce.

Build a complete online store or create a focused **sales funnel** for a specific product or campaign. Add products to any page, display responsive product grids, create conversion-focused checkout pages, manage orders and customers, configure shipping, and track your sales performance from one WordPress dashboard.

Cartvai is designed for businesses that want a lightweight and flexible way to sell online without adding a WooCommerce dependency or paying SaaS subscription fees.

=== Why Choose Cartvai? ===

Cartvai combines **ecommerce, checkout, sales funnels, order management, and analytics** in one standalone WordPress plugin.

* Standalone ecommerce system — no WooCommerce required
* One-page checkout designed for a focused purchasing experience
* Built-in sales funnels with product configuration and upsells
* Product, order, customer, and shipping management
* Built-in sales and funnel analytics
* No per-transaction fees
* No SaaS subscription required
* Works with popular WordPress page builders through shortcodes

=== Core Features ===

**Sales Funnels**

Create dedicated checkout funnels for products, campaigns, landing pages, and offers.

* Unlimited sales funnels
* Shortcode-based funnel embedding
* Works with Elementor, Divi, Bricks, Gutenberg, and other shortcode-compatible page builders
* Multiple checkout templates
* Funnel-level product configuration
* Custom pricing, quantity, badges, and product images
* Product upsells
* Funnel analytics with views, orders, and conversion rates

**One-Page Checkout**

Create a focused checkout experience with the customer information and order details you need.

* Fast, distraction-free single-page checkout
* Cash on Delivery (COD) checkout built in
* Customizable checkout fields
* Name, phone, address, district, notes, and additional fields
* District and region selection
* Support for 65+ countries
* Mobile-first responsive checkout
* Trust badges and security icons
* Shipping and delivery configuration

**Product Management**

Manage your complete product catalog directly from WordPress.

* Unlimited products
* Product variations
* Custom product attributes such as size, color, and material
* Product image galleries with zoom
* Product categories and tags
* Regular and sale prices
* Stock management
* SKU support
* Short and full product descriptions
* Variable products with attribute-based variation selectors

**Order Management**

Manage your complete order lifecycle from one dashboard.

* Full order lifecycle management
* Custom order statuses
* Detailed order information
* Customer information and order items
* Shipping information
* Order notes
* Inline order status updates
* CSV order export
* Printable invoices
* Fraud event telemetry

**Customer Management**

Keep customer records and purchase history organized.

* Customer database
* Customer order history
* Customer detail view
* Customer purchase analytics
* Lifetime value tracking

**Analytics Dashboard**

Understand your store and funnel performance with built-in analytics.

* Revenue overview
* Today, 7-day, 30-day, 90-day, and all-time reporting
* Order volume
* Customer metrics
* Conversion metrics
* Funnel performance analytics
* Product sales ranking
* Exportable reports

**Product Shortcodes**

Place products and individual product elements anywhere on your WordPress website.

* `[cartvai_product]` — full product layout
* `[cartvai_products]` — responsive product grid
* `[cartvai_product_gallery]` — product image gallery
* `[cartvai_product_title]` — product title
* `[cartvai_product_price]` — product price and sale badge
* `[cartvai_product_variations]` — product variation selector
* `[cartvai_product_actions]` — Add to Cart and Buy Now buttons
* `[cartvai_product_trust]` — trust badges
* `[cartvai_product_description]` — full product description
* And additional individual product element shortcodes

**More Features**

* Google Tag Manager integration
* Meta Pixel integration
* Image optimization
* REST API
* Sitemap support
* Mini cart widget
* CSV import and export
* Google Tag Manager noscript support
* Translation ready with `.pot` file
* Developer hooks and filters API
* Clean database architecture
* No external services required for core ecommerce functionality
* No SaaS subscription required

=== Perfect For ===

Cartvai can be used for a wide range of ecommerce and online selling workflows.

* **COD businesses** — Cash on Delivery stores in Bangladesh, Pakistan, India, Egypt, Nigeria, and other markets
* **Single product sellers** — Focused product pages with dedicated checkout
* **Digital product creators** — Courses, ebooks, templates, and downloads
* **Physical product stores** — Clothing, accessories, gadgets, handmade products, and more
* **Agencies** — Build and manage sales funnels for multiple clients
* **Facebook & Google Ads** — Create focused landing page checkout experiences for advertising traffic
* **Affiliate marketers** — Product launch funnels and offer pages
* **Local businesses** — Restaurants, services, and local delivery businesses
* **Dropshippers** — Lightweight ecommerce stores without WooCommerce
* **Product launches** — Campaigns, limited-time offers, and pre-order funnels
* **Businesses looking for a simpler ecommerce solution**

=== Works With ===

Cartvai uses WordPress shortcodes, making it compatible with popular page builders and WordPress editors.

* Elementor
* Divi Builder
* Bricks Builder
* Oxygen Builder
* WPBakery
* Gutenberg / Block Editor
* Any shortcode-compatible page builder

=== Built to WordPress Standards ===

Cartvai is developed with WordPress security and coding practices in mind.

* Follows WordPress Plugin Review guidelines
* Proper output escaping
* Nonce verification on forms and AJAX requests
* Capability checks on admin actions
* Input sanitization
* No external API calls required for core functionality
* GPL-2.0-or-later licensed

== Installation ==

=== Automatic Installation ===

1. Go to **Plugins → Add New** in your WordPress dashboard.
2. Search for **Cartvai**.
3. Click **Install Now**, then **Activate**.

=== Manual Installation ===

1. Download the Cartvai plugin ZIP file.
2. Go to **Plugins → Add New → Upload Plugin**.
3. Upload the ZIP file.
4. Click **Install Now**, then **Activate**.

=== Getting Started ===

1. Open **Cartvai** from the WordPress admin menu.
2. Go to **Products** and create your first product.
3. Add the product title, images, price, stock, and variations if needed.
4. Go to **Funnels** and create a new sales funnel.
5. Add your products and configure the funnel.
6. Copy the generated shortcode, for example `[cartvai id="1"]`.
7. Paste the shortcode into any WordPress page or landing page.
8. Go to **Settings** and configure your store name, currency, checkout fields, shipping, and payment options.
9. Start selling.

== Shortcodes ==

Cartvai includes a complete product shortcode system that works with WordPress pages, posts, widgets, and compatible page builders.

=== Full Product Layout ===

`[cartvai_product]` — renders the complete product layout including gallery, title, price, variations, actions, trust badges, and description.

`[cartvai_product id="123"]` — render a specific product by post ID.

`[cartvai_product slug="my-product"]` — render a product by slug.

=== Product Grid ===

`[cartvai_products]` — renders a responsive product grid.

`[cartvai_products category="featured" limit="6" columns="3"]`

`[cartvai_products ids="12,34,56" columns="3"]`

Attributes:

* `category`
* `categories`
* `ids`
* `limit`
* `columns` (1–6)
* `orderby` (date/title/price/stock/rand/menu_order)
* `order` (ASC/DESC)
* `offset`
* `class`

=== Individual Product Element Shortcodes ===

| Shortcode | Element |
|---|---|
| `[cartvai_product_breadcrumb]` | Breadcrumb navigation |
| `[cartvai_product_gallery]` | Product image gallery with zoom |
| `[cartvai_product_title]` | Product title |
| `[cartvai_product_price]` | Product price and sale badge |
| `[cartvai_product_short_description]` | Short product description |
| `[cartvai_product_variations]` | Product variation selector |
| `[cartvai_product_stock]` | Stock status |
| `[cartvai_product_sku]` | Product SKU |
| `[cartvai_product_quantity]` | Quantity input |
| `[cartvai_product_actions]` | Add to Cart and Buy Now |
| `[cartvai_product_add_to_cart]` | Add to Cart only |
| `[cartvai_product_buy_now]` | Buy Now only |
| `[cartvai_product_trust]` | Trust badges |
| `[cartvai_product_description]` | Full product description |

All element shortcodes support `id`, `slug`, `suffix`, and `respect_settings` attributes.

=== Product Scope Wrapper ===

`[cartvai_product_wrap id="123"]` … `[/cartvai_product_wrap]`

Wraps child shortcodes in a product scope. Child elements automatically resolve to the wrapped product without requiring an explicit `id` or `slug`.

=== Developer API ===

Developers can register custom product elements for addons and Pro extensions:

`CARTVAI_Product_Elements::register( 'my_element', [ 'callback' => [ 'My_Class', 'render' ], 'shortcode' => true ] );`

Available hooks include:

* `cartvai_loaded`
* `cartvai_register_product_elements`
* `cartvai_product_element_before_render`
* `cartvai_product_element_after_render`
* `cartvai_product_element_output`

== Frequently Asked Questions ==

= Does Cartvai work without WooCommerce? =

Yes. Cartvai is a standalone ecommerce plugin and does not require WooCommerce or another ecommerce plugin.

= Can I use Cartvai as a WooCommerce alternative? =

Yes. Cartvai provides product management, checkout, sales funnels, order management, customer records, shipping, and analytics without requiring WooCommerce.

= Can I create sales funnels without WooCommerce? =

Yes. Cartvai includes a built-in sales funnel system that works independently of WooCommerce.

= Can I create a one-page checkout in WordPress? =

Yes. Cartvai includes a mobile-friendly one-page checkout with customizable customer fields, products, quantities, shipping, and order information.

= Does Cartvai support Cash on Delivery? =

Yes. Cash on Delivery (COD) is built into Cartvai and is particularly useful for ecommerce businesses in markets where COD is commonly used.

= Does Cartvai support product variations? =

Yes. You can create variable products with attributes such as size, color, and material, with individual prices and stock levels for variations.

= Can I use Cartvai with Elementor or Divi? =

Yes. Cartvai uses shortcodes that work with Elementor, Divi, Bricks, Gutenberg, and other shortcode-compatible page builders.

= Can I create unlimited products and sales funnels? =

Yes. Cartvai does not impose limits on the number of products, categories, or sales funnels you can create.

= Does Cartvai include order management? =

Yes. Orders are stored in your WordPress database with customer details, line items, shipping information, order notes, and custom statuses. You can also print invoices and export orders to CSV.

= Does Cartvai include analytics? =

Yes. The built-in analytics dashboard provides revenue, order volume, conversion rates, funnel performance, and product sales data across multiple reporting periods.

= Does Cartvai support multiple countries? =

Yes. Cartvai includes district and region data for 65+ countries, including Bangladesh, Pakistan, India, Nepal, Sri Lanka, Egypt, Nigeria, UAE, Saudi Arabia, and many more.

= Is Cartvai translation ready? =

Yes. Cartvai includes a `.pot` file and is compatible with WordPress translation workflows. The text domain is `cartvai-ecommerce`.

= Does Cartvai support Google Tag Manager or Meta Pixel? =

Yes. Cartvai includes built-in Google Tag Manager and Meta Pixel integration with event tracking.

= Is Cartvai GDPR friendly? =

Cartvai stores customer data in your own WordPress database. Core customer data is not sent to external servers.

= Can I export orders? =

Yes. Orders can be exported to CSV from the Orders screen.

= Can I migrate from WooCommerce to Cartvai? =

Yes. Cartvai includes WooCommerce migration tools for importing products, orders, and customers.

= How do I get support? =

Visit [cartvai.com](https://cartvai.com) for documentation and support.

== Screenshots ==

1. **Store Dashboard** — Get a complete overview of sales, orders, customers, revenue, and fulfillment performance at a glance.
2. **Checkout Funnels** — Create and manage dedicated multi-product checkout funnels designed for streamlined sales.
3. **Funnel Settings** — Configure funnel details, product selection, checkout behavior, appearance, and currency settings.
4. **Funnel Products** — Select products for your funnel and easily manage the products available at checkout.
5. **Product Display Settings** — Customize product names, quantities, badges, promotions, and display options for each funnel.
6. **Checkout Fields** — Choose required and optional customer fields and customize labels and placeholder text.
7. **Shipping Settings** — Configure shipping rules, delivery methods, rate matching, and shipping zones for each funnel.
8. **Orders Management** — Manage orders, track fulfillment statuses, filter purchases, and monitor your store’s order activity.
9. **Order Quick View** — Quickly review customer details, purchased products, order totals, shipping, and fulfillment status.
10. **Order Details** — View complete order information, customer data, purchased items, fulfillment status, and attribution details.
11. **Edit Order** — Update customer information, products, quantities, pricing, shipping charges, and order details from one screen.
12. **Customers Directory** — Manage customer profiles, purchase history, repeat orders, lifetime value, and contact information.
13. **Analytics & Reports** — Analyze revenue, orders, conversion metrics, delivery performance, and sales trends over time.
14. **Store Settings** — Configure currency, pricing, store locale, checkout fields, shipping, payments, tracking, and other settings.
15. **WooCommerce Migration** — Migrate WooCommerce products, orders, and customers to Cartvai with built-in migration tools.
16. **Export & Import** — Export products and funnels or import Cartvai data using JSON and CSV files for easy data management.

== Changelog ==

= 2.1.0 =

* New: Packing slips — print a packing slip for a single order or in bulk from the orders list, with a selectable template (Basic included).
* New: Packing slips display the courier name and tracking/consignment ID when an order has a courier booking.
* New: Tools page redesigned with sidebar navigation; Export/Import and WooCommerce Migration are now tabs on the Tools page.
* Tweak: Unified admin design system — blue primary with violet secondary accents across dashboards, KPI tiles, buttons and charts.
* Tweak: Order status colors refined — Processing is now violet and Shipped is blue for clearer distinction.
* Tweak: Mini cart sidebar toggle is enabled by default for new installs.
* Fix: Fatal error in the order quick-view when loading variation data.
* Dev: WordPress coding standards and Plugin Check fixes; regenerated translation template (POT).

= 2.0.0 =

* Full WordPress Plugin Review compliance pass.
* Proper output escaping across plugin output.
* Nonce verification and capability checks across admin actions.
* PHPCBF auto-format with 66,000+ coding style fixes across 150 files.
* Added `phpcs:ignore` annotation where required for the standalone invoice template.
* Version bump to 2.0.0 reflecting the major compliance and quality milestone.

= 1.1.0 =

* New extensible Product Elements API (`CARTVAI_Product_Elements`) with shared registry for core and third-party elements.
* Added `[cartvai_products]` shortcode with category filtering, ID selection, columns, ordering, limits, and offsets.
* Added `[cartvai_product]` full product layout shortcode.
* Added `[cartvai_product_wrap]` product scope wrapper.
* Added individual product element shortcodes.
* Added third-party product element registration through the Product Elements API.
* Product resolution supports explicit ID, slug, and current-page context.
* Added DOM ID collision prevention through the `suffix` attribute.
* Added render tracking for conditional asset loading.
* Improved variation listing with paged queries.
* Extended HTML whitelist with table, media, form, and interactive elements.
* Fixed stored XSS vulnerability in product attribute editing.
* Fixed shipping district JavaScript localization.
* Added ABSPATH guards to template files.

= 1.0.1 =

* Security hardening across admin handlers, AJAX endpoints, and templates.
* Fixed admin asset loading on Cartvai submenu pages.
* Database migrations are now version-gated.
* Added Chart.js license attribution.

= 1.0.0 =

* Initial public release.
* Standalone sales funnel system with no WooCommerce dependency.
* Product management with categories.
* Unlimited sales funnels.
* One-page checkout with Cash on Delivery.
* Customer and order management.
* Sales analytics dashboard.
* CSV export.
* Shortcode support.
* Mobile-friendly checkout.
* Developer hooks and filters.

== Upgrade Notice ==

= 2.0.0 =

Major quality and compliance release. Safe to upgrade — no database schema changes. All features remain backward compatible.

= 1.0.0 =

Initial public release.

== License ==

Cartvai – Ecommerce Checkout, Funnel Builder & Shop Manager is licensed under GPL-2.0-or-later.

Copyright (C) Cartvai. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version.