Initial implementation of WooCommerce Composable Products plugin

Implemented custom WooCommerce product type allowing customers to build their own
product bundles by selecting from predefined sets of products.

Features:
- Custom "Composable Product" type with admin interface
- Product selection by category, tag, or SKU
- Configurable selection limits (global and per-product)
- Dual pricing modes: fixed price or sum of selected products
- Modern responsive frontend with Twig templates
- AJAX add-to-cart functionality
- Full internationalization support (.pot file)
- WooCommerce settings integration
- Comprehensive documentation

Technical implementation:
- PHP 8.3+ with PSR-4 autoloading
- Twig 3.0 templating engine via Composer
- Vanilla JavaScript with jQuery for frontend interactions
- WordPress and WooCommerce hooks for seamless integration
- Security: input sanitization, validation, and output escaping
- Translation-ready with text domain 'wc-composable-product'

Documentation:
- README.md: Project overview and features
- INSTALL.md: Installation and usage guide
- IMPLEMENTATION.md: Technical architecture
- CHANGELOG.md: Version history

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-31 00:38:29 +01:00
commit 1edb0be3d9
21 changed files with 2628 additions and 0 deletions

View File

@@ -0,0 +1,199 @@
# Copyright (C) 2024 Marco Graetsch
# This file is distributed under the GPL v3 or later.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Composable Products 1.0.0\n"
"Report-Msgid-Bugs-To: https://github.com/magdev/wc-composable-product/issues\n"
"POT-Creation-Date: 2024-12-31 00:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: WP-CLI\n"
#: wc-composable-product.php
msgid "WooCommerce Composable Products requires WooCommerce to be installed and active."
msgstr ""
#: wc-composable-product.php
msgid "This plugin requires WooCommerce to be installed and active."
msgstr ""
#: wc-composable-product.php
msgid "Plugin Activation Error"
msgstr ""
#: includes/Admin/Settings.php
msgid "Composable Products"
msgstr ""
#: includes/Admin/Settings.php
msgid "Composable Products Settings"
msgstr ""
#: includes/Admin/Settings.php
msgid "Configure default settings for composable products."
msgstr ""
#: includes/Admin/Settings.php
msgid "Default Selection Limit"
msgstr ""
#: includes/Admin/Settings.php
msgid "Default number of items customers can select."
msgstr ""
#: includes/Admin/Settings.php
msgid "Default Pricing Mode"
msgstr ""
#: includes/Admin/Settings.php
msgid "How to calculate the price of composable products."
msgstr ""
#: includes/Admin/Settings.php
msgid "Sum of selected products"
msgstr ""
#: includes/Admin/Settings.php
msgid "Fixed price"
msgstr ""
#: includes/Admin/Settings.php
msgid "Show Product Images"
msgstr ""
#: includes/Admin/Settings.php
msgid "Display product images in the selection interface."
msgstr ""
#: includes/Admin/Settings.php
msgid "Show Product Prices"
msgstr ""
#: includes/Admin/Settings.php
msgid "Display individual product prices in the selection interface."
msgstr ""
#: includes/Admin/Settings.php
msgid "Show Total Price"
msgstr ""
#: includes/Admin/Settings.php
msgid "Display the total price as customers make selections."
msgstr ""
#: includes/Plugin.php
msgid "Composable product"
msgstr ""
#: includes/Product_Selector.php, templates/product-selector.twig
msgid "Select Your Products"
msgstr ""
#: templates/product-selector.twig
msgid "Choose up to"
msgstr ""
#: templates/product-selector.twig
msgid "items from the selection below."
msgstr ""
#: templates/product-selector.twig
msgid "Total Price:"
msgstr ""
#: templates/product-selector.twig
msgid "Add to Cart"
msgstr ""
#: includes/Cart_Handler.php
msgid "Please select at least one product."
msgstr ""
#: includes/Cart_Handler.php
msgid "You can select a maximum of %d products."
msgstr ""
#: includes/Cart_Handler.php
msgid "One or more selected products are not available."
msgstr ""
#: includes/Cart_Handler.php
msgid "Selected Products"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Composable Options"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Selection Limit"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Maximum number of items customers can select. Leave empty to use global default."
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Pricing Mode"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "How to calculate the price. Leave empty to use global default."
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Use global default"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Selection Criteria"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "How to select available products."
msgstr ""
#: includes/Admin/Product_Data.php
msgid "By Category"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "By Tag"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "By SKU"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Select Categories"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Select product categories to include."
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Select Tags"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Select product tags to include."
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Product SKUs"
msgstr ""
#: includes/Admin/Product_Data.php
msgid "Enter product SKUs separated by commas."
msgstr ""
#: includes/Admin/Product_Data.php
msgid "SKU-1, SKU-2, SKU-3"
msgstr ""