extcode / cart

Cart is a small but powerful extension which "solely" adds a shopping cart to your TYPO3 installation. The extension allows you to create coupons, products with or without variants, special prices.
GNU General Public License v2.0
57 stars 51 forks source link

Special price as 0 not working #559

Closed bznovak closed 3 months ago

bznovak commented 3 months ago

Bug Report

Current Behavior

Add special price in a product, and configure it to 0. For example frontend users belonging to a specific group can have this price.

Now, when viewing this product in frontend as a frontend user in this group product price is shown as 0, and you save 100%. But after it is added to the cart, price goes back to original price, because in Product model getBestPrice evaluates 0.0 as falsy.

Expected behavior/output Accept special price value of 0, when ordering a product

Environment

Possible Solution Changing product model method getPrice to accept 0.0 price as true.