- Mär 27, 2025
-
-
verfasst von Henning Leutz
This commit refractors how product currency is set by replacing the default currency with the runtime currency which allows the application to adapt to different user sessions more responsively. Additionally, a fallback mechanism for setting valueText in PriceFactor has been introduced in case if it's given as a language-specific array.
-
- Mär 25, 2025
-
-
verfasst von Henning Leutz
This commit addresses two issues in the product model and utilities. 1) In the product model, changes are made to ensure that the cacheName variable is given a default value of false and is later checked to be not false in the if condition. This ensures that we don't end up writing null data to the cache. 2) Changes are made in the getPriceFieldForProduct function to fix some potential issues with price calculations. Minor refactor includes: - Added a check to ensure the getOption method exists before calling it, to prevent potential fatal errors. - Defaulted currencyPrices to an empty array to prevent potential PHP warnings when trying to access array keys on a null value. - Updated the return statement new QUI\\ERP\\Money\\Price to exclude currencyPrices which was causing issues.
-
verfasst von Henning Leutz
This commit expands product calculations to include support for different currencies. The 'calc.php' file has been updated to now take a currency input and use it when calculating the product cost. If no currency is given, it will default to the current user's currency. The 'Product.js', 'Products.js' and 'frontend/Product.js' files have also been updated to pass the currency when making Ajax calls. Finally, if no currency is set for the product in 'ViewFrontend.php', the default currency or the current user's currency will be used. Additionally, 'UniqueProduct.php' now includes the currency code when converting to an article. This feature enhances the flexibility of product cost calculations and accommodates for international users by including their local currency in the calculation process.
-
verfasst von Henning Leutz
Updated several classes in the `ERP/Products` directory to handle currency more efficiently. - Added currency fetching from user session and set it to product in `Product.php` - Updated `UniqueField.php` to get the currency of the associated product for price calculation and added `getOption` method. - Updated `Model.php` to handle both the default and product-specific currency when creating a unique product and fixed a couple of code arrangements. - Updated `UniqueProduct.php` to ensure using product's currency instead of default for prices and ensure `UniqueField` is linked to the product. - Refactored `Products.php` to handle product-specific currency prices and properly parse them in `getPriceFieldForProduct` method.
-
- Mär 24, 2025
-
-
verfasst von Henning Leutz
This commit removes a redundant phpstan ignore comment which was situated above an if statement in the EventHandling.php file, in the setDefaultProductFields function. The ignore command was not necessary and hence has been excluded to improve the readability and reduce unnecessary code.
-
verfasst von Henning Leutz
This commit adds the `getDefaultCurrency` function call and incorporates the default currency in the price calculation. It further enhances the price input field to be disabled and auto-filled when the default currency is in use. Changes to the primary input field are now also propagated to the relevant currency input field. In addition, the composer.json has been updated to require a minimum version of 2.1 for `quiqqer/currency`. Note: Besides, several function calls have been added to trigger `change` event on main input element for accurate price calculation whenever the value changes. Moreover, the `blur` event has been added to the input element in `onSubmit` event handler to reflect the changes immediately.
-
verfasst von Henning Leutz
-
- Mär 22, 2025
-
-
verfasst von Henning Leutz
This commit expands on the error handling mechanism in our product model to be more specific during logging. If a product is activated in the system but not found in the frontend (HTTP 404 response), an error message is now logged using a 'products_not_found' tag. This will make it easier to identify and address issues with deactivated products that should be active. This commonly occurs when an outdated link through a search engine directs a user to a non-existing product page.
-
verfasst von Henning Leutz
Updated the PHP version requirement from 8.0 to 8.1 in composer.json. Refactored the string operations functions in category.php and productList.php. Replaced the 'strpos' function with 'str_contains' for better readability and performance. Also replaced the usage of 'strpos' to check for string start with 'str_starts_with' for better readability. Fixed some strings formatting.
-
- Mär 11, 2025
-
-
verfasst von Henning Leutz
This commit involves refactoring code in Products.js by updating 'var' to 'let' or 'const' for proper scoping and better readability. It also introduces a new variable 'inAdministration' to handle specific conditions for QUIQQER's administrative state and modifies the condition for using cached data, considering 'inAdministration'. Expect no changes in functionality or behavior of the software with these changes.
-
- Mär 03, 2025
-
-
verfasst von Henning Leutz
The commit makes a precautionary check and sets the value of the 'selected' key of the 'option' array as false, if not previously set in the AttributeGroupFrontendView.php. This prevents potential undefined index errors on subsequent checks using this key.
-
- Feb 28, 2025
-
-
verfasst von Henning Leutz
Updated the getFieldValue and getFieldValueByLocale methods' return type in src/QUI/ERP/Products/Product/Model.php. Now these methods can return int, float, string, array, or null. Also simplified the exception statements.
-
- Feb 20, 2025
-
-
verfasst von Henning Leutz
The version of the "quiqqer/productsearch" dependency in `composer.json` was updated from "^1.1" to "^2" in order to match with the latest stable release of the library. This will help in making sure that the application stays up-to-date with the latest improvements and bug fixes.
-
verfasst von Henning Leutz
Adjusted the ignoreErrors parameter in the phpstan-baseline.neon file. Updated the referenced files under this setting to maintain code quality and standards. Further, added a newline at the end of the file for adherence to best practices.
-
verfasst von Henning Leutz
Update `phpstan-baseline.neon` to ignore specific errors related to invalid types, method calls, and properties in various parts of the project. This includes errors in `EventHandling.php` and `ProductList.php` related to the `AbstractOrder` class.
-
- Feb 19, 2025
-
-
verfasst von Henning Leutz
This commit ensures proper order operations in the Calc.php file by adding a class_exists check before proceeding. Its main purpose is to prevent errors if a requisite class, 'QUI\\ERP\\Order\\AbstractOrder', is not available.
-
verfasst von Henning Leutz
This commit includes cleaning up the code in several files directly and indirectly related to the product category and variant creation. Specific changes include the removal of unnecessary empty lines and import statements across three files: 'createProjectSite.php', 'Categories.php', and 'VariantParent.php'. No logic has been altered, only code clarity and cleanliness have been improved.
-
verfasst von Henning Leutz
- Added method_exists checks before method invocations in categories, fields and products modules to prevent potential crashes due to method absence. - Improved sorting operations in categories, fields and products modules by changing the comparison operator '>' to 'strcmp'. - Refined exception handling in categories update and products/frontend/getVariant, adding the ability to properly handle and log unexpected exceptions. - Fixed a minor issue in getInstalledProductPackages that didn't correctly traverse the package array. Related: #397
-
verfasst von Henning Leutz
- Added spaces in typehints for readability - Added `@phpstan-ignore-line` for DEVELOPMENT condition in `setFieldsToAllProducts()` to mitigate stan error - Cast `max_execution_time` to int before calling `set_time_limit` - Typecast integer variables to string in `str_pad` in `execute()` in GenerateProductCache.php for PHP compatibility - Added a check for `getCustomDataEntry` method existence before using it in `updateProductPrices` in UpdatePrices.php for run-time safety. Related: #397
-
verfasst von Henning Leutz
- Replaced multiple bool|int syntax with bool | int for PSR-12 compliance. - Added method_exists checks in some conditionals to avoid errors. - Replaced string comparison in `isActive` checks with strict `===`. - Cast `ini get` result to integer to match `set_time_limit` syntax. - Improved syntax for long conditional statements with multiple && conditions. - Fixed passing variable by reference in foreach. - Changed variable type passed to string from int in setDefaultVariantFields. - Used mb_strlen for string length calculation to prevent datatype error. - Improved error handling by adding @phpstan-ignore-line to silence specific PHPStan warnings. - Fixed a few minor typographical errors in comments. - Partially replaced type comments with typehints for better IDE support. Related: #397
-
verfasst von Henning Leutz
Made several code corrections and clean up in `AttributeGroup.php`, `AttributeGroupFrontendView.php`, `Folder.php`, `InputMultiLang.php`, `MultilangFrontendView.php`, `Price.php`, `ProductAttributeList.php`, `TimePeriod.php`, `VatFrontendView.php`, `UniqueField.php`. These changes consist of fixes in unions type declarations, rearrangements of conditions, removal of unnecessary typecasts, and small alterations for better readability and performance. Related: #397
-
verfasst von Henning Leutz
- Typed parameters have been added in function signatures for better readability and type enforcement. - Replaced QUI\\Exception with just Exception for brevity and better readability. - Made corrections in comments for correct grammar and better understanding. - Removed redundant null checks and checks for method existence for concise code. - Certain unnecessary comments and variables have been removed for cleaner code. - Overall these changes contribute to improved readability and maintainability of the code. Related: #397
-
verfasst von Henning Leutz
This commit ensures compatibility with different datatypes by adding necessary checks and type conversions in ERP Products module. It also removes unused comments, thus making the code cleaner and more efficient. Changes include: - In methods expecting integer parameters, explicit type casting has been added to situations where a string could be passed instead. - Additional checks are implemented before invoking method_exists(), ensuring safety. - Inappropriate comments and annotations have been removed to make the code more readable. - getEditableFieldIdsForProduct() and getInheritedFieldIdsForProduct() methods in Products.php had a generic parameter $Product, it has been type hinted with the ProductTypeInterface. Overall, the changes ensure better type stability and increase code reliability. Related: #397
-
verfasst von Henning Leutz
This commit primarily refines PHP code in multiple classes linked to handling products in the ERP module. These changes: - Add a number of error closure checks for method_exists on several method calls. - Refine use of union types, allowing for cleaner and clearer type declaration. - Amend several git blob file changes that may or may not be relevant depending on the file diff output specifics. These changes include variable name changes, function name changes, and code reformatting. - Update function return types for optimized concise type declarations. - Add checks for method existence before calling methods in several places, to ensure valid method calls. - Correct mismatches in PHPDoc comments and actual function behaviors. Refactor: #397
-
verfasst von Henning Leutz
Significant improvements have been made on price calculation methods in src/QUI/ERP/Products/Utils/Calc.php. Enhancements include: - Checking if Product is an instance of UniqueProduct before recalculating and getting product price - Handling exceptions for PriceFactor objects that are not of the right instance - Improved checks for visibility and existence of `Vat` - Affirming method availability before checking for value text in PriceFactor class - Broadened round method support to handle different input types - More robust error handling during tax type retrieval and tax entry determination for calculating both netto and brutto prices.
-
verfasst von Henning Leutz
Related: #397
-
- Feb 12, 2025
-
-
verfasst von Henning Leutz
Small adjustments to the formatting in ProductList file have been made for better readability and standard conformity. This includes adding spaces around the "|" symbol in type declarations and method return types. No functionality changes have been introduced.
-
verfasst von Henning Leutz
NULL types set for php8.4
-
verfasst von Henning Leutz
Changed the boolean condition to check for false on `autoloadAfter` attribute. Instead of checking equality with false, the code now uses a not operator which makes it easier to read and follow. This change has been applied to both `ProductList.php` and `ManufacturerList.php` files.
-
verfasst von Henning Leutz
An attempt is made to decimate product data via ajax so that the frontend responds faster
-
- Feb 07, 2025
-
-
verfasst von Henning Leutz
-
- Feb 04, 2025
-
-
verfasst von Henning Leutz
Updated the phpstan version in `.phive/phars.xml` from `1.10.67` to `1.12.13` to use the latest features and improvements. Also, altered the specified version pattern to `1.*` to automatically pick up the latest minor version releases. In addition, removed a redundant error message in `phpstan-baseline.neon` related to the `getUrlRewrittenWithHost` method in `types/category.php`, which was causing unnecessary noise in the error report.
-
verfasst von Henning Leutz
This commit refines the type hints in the Product model. Specifically, the getUrlRewrittenWithHost() method's $Project parameter type is defined more explicitly, indicating that it can accept either a type of QUI\\Projects\\Project or null. Related: quiqqer/package-feed#15
-
- Dez 18, 2024
-
-
verfasst von Henning Leutz
-
- Dez 03, 2024
-
-
verfasst von Henning Leutz
-
- Nov 29, 2024
-
-
verfasst von Henning Leutz
-
- Nov 14, 2024
-
-
verfasst von Michael Danielczok
Related: #402
-
- Nov 07, 2024
-
-
verfasst von Henning Leutz
-
- Okt 31, 2024
-
-
verfasst von Henning Leutz
-
- Okt 30, 2024
-
-
verfasst von Henning Leutz
-