ZC 1.5.8
For new products the product type is in $pInfo->product_type (singular)
For editing existing products it's in $pInfo->products_type
ZC 1.5.8
For new products the product type is in $pInfo->product_type (singular)
For editing existing products it's in $pInfo->products_type
Last edited by cstdenis2; 1 Nov 2022 at 02:46 AM. Reason: Got them backwards.
Also master_categories_id is 0 for new products even tho the category is selected before the product creation and displayed in the UI as the master category.
Thanks for these reports - would you please open an issue in Github so we can track them?
https://github.com/zencart/zencart/issues
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Sigh. The use of the product_type (singular) element is pervasive throughout the various scripts (and sanitizations) associated with a product's addition/update.
As such, the best I can propose for any kind of compatibility is to update the various collect_info.php module comments for the notification to indicate that a watching observer should look first (via isset) for the product_type element and fall back to the products_type element otherwise.
Note that I've not (yet) looked at the issue with the master_categories_id for new products.
As always, I would say make code correct and damn the torpedoes/document a breaking change in the same PR.
No-one should test an update on a production site, so they have been warned. Such is progress.
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...
Bookmarks