instructions.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. Write WordPress plugin called "studiou-wc-mandatory-products" in PHP, that extends WooCommerce plugin.
  2. Plugin will have following features:
  3. 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.
  4. - can be used in Parent category, and all child categories will have this same feature also (will be inherit this settings)
  5. - 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').
  6. - extends DB structure or use existing to store this settings
  7. 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.)
  8. 3. Add information in Product editor, that product has mandatory product set (if any)
  9. Sample scenario:
  10. Product categories tree
  11. - Main Category
  12. - SubCategory1
  13. - SubCategory2
  14. Products
  15. - MandatoryProduct1 (In Main Category)
  16. - ProductA (In SubCategory1)
  17. - ProductB (In SubCategory2)
  18. Settings
  19. Main Category
  20. Mandatory Products: MandatoryProduct1, amount: 1, type: OnePerCart
  21. User Ordering:
  22. - Add to cart ProductA amount:10pcs
  23. - Add to cart ProductB amount:2pcs
  24. - Shows cart:
  25. ProductA 10pcs
  26. ProductB 2pcs
  27. MandatoryProduct1 1pcs