Browse Source

add studiou-wc-mandatory-products

Dalibor Votruba 1 year ago
parent
commit
1fa60b8405
1 changed files with 35 additions and 0 deletions
  1. 35 0
      studiou-wc-mandatory-products/instructions.txt

+ 35 - 0
studiou-wc-mandatory-products/instructions.txt

@@ -0,0 +1,35 @@
+Write WordPress plugin called "studiou-wc-mandatory-products" in PHP, that extends WooCommerce plugin.
+Plugin will have following features:
+
+1. Extends Product Category editor (in menu Product/Categories) to allow to add mandatory products, that will be automatically added to cart when product from current product category will be added.
+	- can be used in Parent category, and all child categories will have this same feature also (will be inherit this settings) 
+	- desired mandatory product for automatic add to cart can be add only one time (in cart) or only one time for product (types: 'OnePerCart', 'OnePerProduct').
+	- extends DB structure or use existing to store this settings
+2. When I select product and press Add to Cart button, then if product category (where selected product belongs) has settings for mandatory associated product, then associated product will be added to cart also (together, as specified at 1.)
+3. Add information in Product editor, that product has mandatory product set (if any)
+
+
+Sample scenario:
+
+Product categories tree
+	- Main Category
+		- SubCategory1
+		- SubCategory2
+		
+Products
+	- MandatoryProduct1 (In Main Category)
+	- ProductA (In SubCategory1)
+	- ProductB (In SubCategory2)
+	
+Settings
+	Main Category
+		Mandatory Products: MandatoryProduct1, amount: 1, type: OnePerCart
+		
+		
+User Ordering:
+	- Add to cart ProductA amount:10pcs
+	- Add to cart ProductB amount:2pcs
+	- Shows cart:
+		ProductA 10pcs
+		ProductB 2pcs
+		MandatoryProduct1 1pcs