=== ManageCart – Side Cart & Floating Cart for WooCommerce ===
Contributors: wpmanagestudio
Tags: woocommerce, cart, side cart, mini cart, floating cart
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Foundation plugin for a WooCommerce cart experience: side drawer cart, centered popup cart, mobile bottom-sheet cart, and floating cart button.

== Description ==

ManageCart is a free WooCommerce cart experience plugin that helps customers review and manage their cart without leaving the current page. It provides a customizable cart panel and optional floating cart button, built directly on the WooCommerce Store API.

= Benefits of WooCommerce Side Cart For Your Store =

A smooth cart experience helps customers stay focused on shopping instead of moving between product and cart pages.

* Keep customers on the current page while they review their cart
* Make quantity updates and item removal faster
* Offer a mobile-friendly bottom-sheet cart experience
* Make coupon access simple without cluttering the cart
* Highlight sale savings and low-stock information
* Give shoppers a clear path to checkout

= Why Store Owners Choose ManageCart? =

ManageCart is built for WooCommerce stores that want a modern cart experience with a simple setup process.

* Works directly with WooCommerce
* Uses the WooCommerce Store API for cart updates
* Provides drawer, popup, and mobile bottom-sheet layouts
* Includes a floating cart button with an optional item count
* Lets store owners customize colors, buttons, sizing, and border radius
* Provides separate Cart Display and Settings screens for clear configuration

= Powerful ManageCart Features =

* Side Cart layouts: left drawer, right drawer, or centered popup
* Mobile bottom-sheet cart presentation
* Optional auto-open cart after adding a product
* Custom cart heading, product images, variation details, quantity controls, and remove buttons
* Live quantity updates and item removal without a page reload
* Coupon apply and remove support
* Sale-price savings badge and optional low-stock badge
* Floating cart button with position, offset, size, color, badge, and optional drag-to-reposition
* Appearance controls for the Side Cart and Floating Cart
* Live admin previews before saving changes
* Nonce-protected and capability-checked settings actions

= Requirements =

* WordPress 6.5 or higher
* PHP 7.4 or higher
* WooCommerce, installed and active

== Installation ==

1. Make sure WooCommerce is installed and active on your site.
2. Upload the `manage-cart` folder to the `/wp-content/plugins/` directory, or install the plugin zip file through the Plugins screen in WordPress.
3. Activate ManageCart through the "Plugins" screen in WordPress.
4. If WooCommerce is not active, ManageCart will show an admin notice and will not run.

== Frequently Asked Questions ==

= How To Install ManageCart? =

Install and activate WooCommerce first. Then upload or install ManageCart from the WordPress Plugins screen and activate it. Open ManageCart → Settings to enable the plugin, then use Cart Display to configure Side Cart and Floating Cart options.

= Is ManageCart a free plugin? =

Yes. ManageCart 0.1.0 is a free WooCommerce plugin released under the GPL-2.0-or-later license.

= How do I add ManageCart to my WordPress site? =

Install and activate WooCommerce, then install and activate ManageCart. Open ManageCart → Cart Display, configure your preferred Side Cart or Floating Cart settings, and click Save Changes. The cart experience will then appear on your store's frontend when ManageCart is enabled.

= Does this plugin work without WooCommerce? =

No. ManageCart requires WooCommerce to be installed and active. If WooCommerce is missing or inactive, the plugin displays an admin notice and does not load any further functionality.

= Does this plugin add a cart UI to my site right now? =

Yes. ManageCart renders a fully functional cart panel (drawer, popup, or mobile bottom-sheet, depending on your settings) and, if enabled, a floating cart button — both connected to WooCommerce's Store API for quantity changes, item removal, and coupons. Configure them under "ManageCart → Cart Display", in its "Side Cart" and "Floating Cart" sections.

= Will activating this plugin change any of my data? =

No. Activation only stores the plugin's version number in the WordPress options table. No cart configuration or customer data is created or modified. Settings are stored only once you visit the ManageCart settings page and save or reset.

= Who can access the ManageCart settings page? =

Only users with the `manage_woocommerce` capability (typically Shop Managers and Administrators) can view or change ManageCart settings.

= Does uninstalling this plugin delete my data? =

By default, no. ManageCart only removes its own options if "Delete data on uninstall" is enabled on the ManageCart settings page (or the underlying `manage_cart_delete_data_on_uninstall` option is otherwise set to a truthy value). Otherwise, uninstalling the plugin leaves its stored data in place.

= What does Reset Settings do? =

Reset Settings restores "Enable ManageCart" and "Delete data on uninstall" to their default values (enabled, and not deleted on uninstall, respectively). It requires the `manage_woocommerce` capability and a valid nonce, and shows a success notice once complete.

= What is the Side Cart section? =

"Cart Display → Side Cart" is where you configure the side cart's layout, position, width, auto-open behavior, heading, item display, and appearance. It is stored in its own option (`manage_cart_side_cart_settings`) and does not affect the global ManageCart settings. These settings are read directly by the real frontend cart; the section also includes a live admin preview so you can check your choices before saving.

= Does the Side Cart preview load real cart data? =

No. The preview on the Cart Display screen is static, illustrative admin markup built from your saved settings. It does not query WooCommerce, does not use the Store API, and does not run any JavaScript.

= Who can access the Cart Display screen? =

The same as the global settings page: only users with the `manage_woocommerce` capability (typically Shop Managers and Administrators).

= Where did the "ManageCart", "Cart Display", and "Side Cart" sidebar submenu links go? =

The wp-admin sidebar shows a single top-level "ManageCart" icon with no flyout submenu underneath it. Clicking it opens the Settings screen directly. Every screen (Settings and Cart Display, with its Side Cart and Floating Cart sections) is still there and still enforces the same `manage_woocommerce` permission check — navigate between Settings and Cart Display using the tabs in the app header at the top of either page.

= Is the Side Cart preview connected to my real cart? =

No. The preview on the Cart Display screen's Side Cart section is built entirely from static, illustrative admin data. It updates instantly as you edit the fields on that page so you can see the effect of your choices, but it never queries WooCommerce, never uses the Store API, and never runs on the frontend.

== Changelog ==

= 0.1.0 =
* Initial release: a WooCommerce cart experience plugin adding a customizable Side Cart panel (drawer, centered popup, or mobile bottom-sheet) and an optional Floating Cart button, both built on the WooCommerce Store API for live quantity changes, item removal, and coupon apply/remove with no page reload.
* Side Cart: configurable desktop width, auto-open after add-to-cart, customizable heading, independently toggleable per-item image/variation/quantity/remove controls, regular/sale price display with a "Save X%" badge, an optional low-stock badge with a configurable threshold, and Appearance settings (colors, sizing, border radius) applied live to the real frontend cart.
* Floating Cart button: enable/disable, corner position (top/bottom, left/right) with pixel offsets, an item count badge with an option to hide the button when the cart is empty, optional customer drag-to-reposition (stored per-browser), and its own Appearance settings.
* Admin: a single top-level "ManageCart" icon in the wp-admin sidebar (`manage_woocommerce` capability, no submenu flyout) opening a shared screen with "Settings" and "Cart Display" tabs, a live unsaved admin preview, nonce-protected Save/Reset actions on every settings screen, and a "Settings" link next to Deactivate on the Plugins screen.
* Foundation: WooCommerce HPOS and Cart/Checkout Blocks compatibility declarations, PHP/WooCommerce dependency checks with admin notices, and opt-in data cleanup on uninstall.

== Upgrade Notice ==

= 0.1.0 =
Initial release.

== License ==

ManageCart is licensed under the GPL-2.0-or-later. See https://www.gnu.org/licenses/gpl-2.0.html for the full license text, or the bundled LICENSE file.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.