View Issue Details

IDProjectCategoryView StatusLast Update
0006053OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2016-06-08 13:24
Reportermichael_keiluweit 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.9.3 / 5.2.3 
Target VersionFixed in Version4.10.0 / 5.3.0 
Summary0006053: It's not possible to use the number 0 as value for the variant
DescriptionWhen using the number 0 (zero) as value then the shop filters it with the function trim. So in case you have clothes sizes with the size 0, it's hard to display it at the frontend.
Please see attached screenshots.
Additional Information\oxVariantHandler::_fillVariantSelections()

The cause (application/models/oxvarianthandler.php:321):
$sName = isset($aNames[$i]) ? trim($aNames[$i]) : false;



The function trim removes leading zeros, if they are a number:
var_dump(trim(012));    //string '12' (length=2)
var_dump(trim('012'));  //string '012' (length=3)
TagsNo tags attached.
ThemeAzure
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

michael_keiluweit

2015-02-24 10:01

administrator  

variant_zero_backend.png (125,890 bytes)
variant_zero_backend.png (125,890 bytes)

michael_keiluweit

2015-02-24 10:01

administrator  

variant_zero_frontend.png (80,086 bytes)
variant_zero_frontend.png (80,086 bytes)

FibreFoX

2016-05-10 12:23

reporter   ~0011574

seems related to another older bug:
https://bugs.oxid-esales.com/view.php?id=5331

michael_keiluweit

2016-05-18 09:13

administrator   ~0011591

Last edited: 2016-05-19 10:36

View 2 revisions

https://github.com/OXID-eSales/oxideshop_ce/pull/389

anton.fedurtsya

2016-06-08 13:22

administrator   ~0011631

Thank you Michael. Merged the pull request to our master + 5.3.