View Issue Details

IDProjectCategoryView StatusLast Update
0005737OXID eShop (all versions)2.6. Administer orderspublic2024-01-23 16:58
Status acknowledgedResolutionopen 
Product Version4.8.4 / 5.1.4 
Target VersionFixed in Version 
Summary0005737: selectlists are handled wrong if name or value contains a comma followed by a space
DescriptionMaybe its listed somewhere (didnt found anything about this), but having a comma in the selectlist-value results in strange side-effects:

* oxbasketitem::initFromOrderArticle will no select the right selectlists
* oxorderarticle::getOrderArticleSelectList does not get all selectlists (because explode(",") will catch the value too)
Steps To ReproduceHow we are reproducing it:
1. In admin:
Administer Product-> Selection List create selection list with 2 fields:
ca. 850g, ca. 16cm Durchmesser
ca. 1250g, ca. 22cm Durchmesser
both of them have Price Surcharge
2. Assign the product for this list.
3. Make a purchase of this product.
4. Go to Admin-> Administer Order->Order->Overview
Calculation is good.
5.Go to Admin-> Administer Order->Order->Main Set payment date and look in Overview tab.
Calculation is wrong now.

Additional InformationI tried to have a nicer formatting inside order_overview, but ended up with messed results. My code so far:

public function getNicerSelectionList( $orderArticle ){
    $result = "";
    $selectedListStringNormalized = $orderArticle->oxorderarticles__oxselvariant->value;
    $selectedLists = explode(",", $selectedListStringNormalized);
    foreach( $selectedLists as $singleList ){
        $singleList = trim($singleList);
        if( !empty($singleList) ){
            $listNameAndValue = explode(":", $singleList);
            $result .= $listNameAndValue[0] . ": " . $listNameAndValue[1] . "\n";
    return nl2br($result);
TagsSelection List
PHP VersionNot defined
Database VersionNot defined


related to 0004624 acknowledged Order recalculation does not use discounts/taxes which were valid when order was made, but current ones 
related to 0005254 closedQA Selectlists are not considered correctly 



2014-04-15 11:11

reporter   ~0009837

Because oxorderarticle::getOrderArticleSelectList is called in oxbasketitem::initFromOrderArticle .... and ends up being called in oxorder::recalculateOrder, this whole thing may be related to recalculation-bug


2014-04-29 14:20

reporter   ~0009865

Reminder sent to: FibreFoX

Hi, unfortunately but we can not reproduce this issue. Could you provide more detailed information about how you reproducing it?


2014-04-29 15:25


oxid_bug_5737.JPG (33,595 bytes)
oxid_bug_5737.JPG (33,595 bytes)


2014-04-29 15:27

reporter   ~0009867

Last edited: 2014-04-29 15:39

View 3 revisions

Dont know how you tried to reproduce, but please try with this values (i uploaded a screenshot how it looks for me) :
1. "ca. 850g, ca. 16cm Durchmesser"
2. "ca. 1250g, ca. 22cm Durchmesser"
(note that "comma + space" is inside selectlist-value value)

They will destroy the method i wrote here (involves recalculating).

When sending the "your order was send"-mail the layout is not as the "you ordered"-mail, so i looked where it came from ... and realized that they are not stored in a nice way.

I hope this helps a little.

Edit: maybe a serialized array would help a lot here (but would break compatibility)


2014-05-02 07:43

reporter   ~0009877

Reminder sent to: FibreFoX

Could you please tell us what exactly is your shop version and on which edition you are reproducing it? Also is your shop UTF-8 or not? And what exactly is wrong after you make a purchase? could you please add a screenshot. It would really help us to figure out the problem. Thanks for the patience.


2014-05-02 09:51

reporter   ~0009878

The problem comes from the methods.
If you are developing modules that are depending on the right selectlist-value (especially when they have price-additions), the current implemented algorithm is wrong.

Please have a look at your own code:

It doesn't have todo anything with encoding, because your algorithm is flawed for selectlists. The culprit is in line 393, this will go wrong when having a value with ", " within the value itself (as described by me and thats the reason i suggested another form of that value: using serialize()

And because of that code, even the recalculation of already existing orders are wrong, because they can't find the price-addition (assuming that one selectlist-entry has something like "+3 €" or something).


2014-05-02 15:26

reporter   ~0009880

Reminder sent to: FibreFoX

There might be the problem, but we need to reproduce it and at this moment we can't do it, because for us it works like it should be. So something we are doing different.

Please send us information:
- shop version;
- shop edition;
- utf-8 or not
- language of the shop;
- how many selection list do you have;

How we are reproducing it:
1. In admin:
Administer Product-> Selection List create selection list with 2 fields:
ca. 850g, ca. 16cm Durchmesser
ca. 1250g, ca. 22cm Durchmesser
both of them have Price Surcharge
2. Assign the product for this list.
3. Make a purchase of this product.
4. Go to Admin-> Administer Order->Order.
5. Look into returned results/database (table: oxorderarticles, column: oxselvariant)
 Even after recalculation for us it works correct.


2014-05-03 14:28

reporter   ~0009883

Last edited: 2014-05-03 14:32

View 2 revisions

In current Demoshop: Enable price changes by selectlists. Assign surcharge 10€ to "ca. 850g, ca. 16cm Durchmesser" and 20€ to "ca. 1250g, ca. 22cm Durchmesser", assign to article, order both types. Look at order, surcharges are OK, set paydate, look again, both have low surcharge now.


2014-05-03 14:53

reporter   ~0009884

Thanks leofonic :) i knew i missed something (enabling price-changes by selectlists).

and thats why i think its related to recalculation-bug (which is a real shame, because that bug-ticket is open for such a long time).


2014-05-05 09:28

reporter   ~0009885

I reproduced that bug. After payment date is set price of the order is recalculated wrong. But it is not related with comma inside text. Calculation doesn't depend of the name of the selection lists. It is always after payment date is set calculation is incorrect.


2014-05-05 09:49

reporter   ~0009886

But finding the selected value (with the right surcharge) fails with "comma + space", because it looks for it via its value, that's what this ticket is about, am i wrong?


2015-06-02 10:37

reporter   ~0011005

Related pull request which might have introduced the behaviour (CE 4.8.2 included the change, 4.8.1 not):
@QS: We should test if the behaviour of the shop changed from 5.1.1 to 5.1.2.


2015-06-02 12:42

reporter   ~0011007

This won't fix the problem, if you have something like ", " or "," inside your labels, this still won't work.