Commit Graph

8 Commits

Author SHA1 Message Date
Joshua T Flowers e73fb9f23f
Derive product type from product attributes (#36243)
* Derive product type from product attributes

* Add tests around derive product type

* Add changelog entry
2023-01-03 16:25:21 -08:00
Joshua T Flowers 3fe3710c51
Automatically generate product variations on option changes (#36188)
* Auto generate variations on option changes

* Add changelog entry

* Move product variation generation to hook

* Create product auto draft if not yet created

* Allow auto-draft and trash statuses for products

* Update form context with product ID to allow fetching variations

* Fix product ID usage in variations

* Reset form after initial product creation

* Use form value name for display instead of persisted name for auto drafts

* Add additional test around auto draft title
2022-12-30 13:12:09 -08:00
Maikel David Pérez Gómez 5b3b5dab59
Truncate attribute option name to a max of 32 chars in variations list (#36134)
* Truncate attribute option name to a max of 32 chars in variations list

* Use PRODUCT_VARIATION_TITLE_LIMIT to truncate attribute option names

* Fix up lint error

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2022-12-23 11:29:44 -08:00
Joshua T Flowers 4b4fe7c227
Add product variation title to page header (#36085)
* Add method to get product variation title from data

* Conditionally add variation to page header

* Fix CRUD data store id query on selector

* Make getProductVariation calls and data types consistent to prevent multiple calls

* Add changelog entries

* Update product link type to avoid page refresh

* Expose function to truncate title to 32 character limit
2022-12-22 09:23:44 -08:00
Fernando Marichal 44cf396be6
Product variation quantity status indicator (#35982)
* Add variation status indicator

* Add changelog

* Add tests

* Fix style

* Rename enum

* Fix lint

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2022-12-15 15:20:21 -03:00
Joshua T Flowers e1aabf2d9d
Add product variations list to new product management experience (#35889)
* Add product variations section

* Add variations list

* Add util to get product stock status

* Add variation specific attribute type

* Add currency code to header column

* Fix up variations header width

* Add variations loading state

* Add changelog entries

* Convert spaces to tabs

* Fix status typo

* Fix up return type for stock status
2022-12-13 15:29:05 -08:00
Joshua T Flowers 7bff5cbb6b
Add product status badge to product form header (#35460)
* Add product status badge

* Update status method to return keys

* Add tests around product status

* Add styling to badge

* Add changelog entry

* Change product status keys to enum

* Add enum return type to product status function

* Fix up lint errors

* Convert indentation to tabs
2022-11-16 08:03:39 -08:00
Joshua T Flowers 23ca8d6297
Add product title to header when available (#35431)
* Move shared product header components to separate file

* Fill header title with product name

* Create method to get product title

* Add tests around title

* Add changelog entry

* Remove unnecessary plugin registration
2022-11-15 11:19:58 -08:00