View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006307 | OXID eShop (all versions) | 1.02. Price calculations (discounts, coupons, additional costs etc.) | public | 2016-01-05 15:53 | 2024-03-06 09:33 |
Reporter | AlexN | Assigned To | |||
Priority | urgent | Severity | minor | Reproducibility | always |
Status | acknowledged | Resolution | open | ||
Platform | Linux | ||||
Product Version | 4.9.6 / 5.2.6 | ||||
Summary | 0006307: Selectlists aren't considered when updating the amount of an ordered article | ||||
Description | I am using an EE 5.2.4 where I noticed the bug that when updating the amount of an ordered article selectlists aren't considered. I guess the fix needs to be done somewhere in method "oxorder->_setOrderArticles($aArticleList)" because there "$oUnitPtice = $oContent->getUnitPrice();" is used to determine the "oxnprice" which contains the baseprice of the article without considering the selectionlist. | ||||
Steps To Reproduce | 1. Install EE 5.2.4 2. Create a selectlist with an item "2 abs". 3. Assign an article to the select list. 4. Order the product in frontend > Calculation adds correctly 2 bucks 5. Update the order amount in backend > Calculation uses the default price of the product. | ||||
Additional Information | Don't mind the name of the article on the attached image. The article previously costs 1 Cent but I changed the price due to some testing. | ||||
Tags | Specialized Management Apps | ||||
Attached Files | |||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
In Performance "Preisänderungen durch Auswahllisten unterstützen" is activated. I am sorry, I don't know the used english translation. |
|
The translation for what you have to activate is "Support Price Modifications by Selection Lists" in the performance settings. |
|
Thanks for your response. This is activated but for some reasons the wrong price is used for calculating prices. See the file I upload in a second. |
|
UPDATE: 1. Question If I have an update should I rather edit my latest note or create a new note? 2. Update itself I figured out that OXID uses the first item in select list though the ordered article has a different item. As of that the calculation itself is working BUT for some reason the correct selection list is not being loaded. |
|
Thank you for your update. You can just add another note. |
|
I narrowed it again down, I guess. In frontend the "init" method of the "oxBasketitem" object will be triggered and param "$aSel" is passed while in the backend the method is not triggered. Probably because an other class is used there. Further I have looked at the form in backend tab "order_article" plus database table "oxorderarticles". I cannot find sth. that leads to the original choosed selection, except of the field "oxselvariant" which is pretty to useless to gather the price. ---------- Right now I am trying to help me with such a script (still under development) but I guess it is not a fully working solution: // Added by TRONET $troFOxAmount = (double) number_format((float) $oOrderArticle->oxorderarticles__oxamount->value, 2, '.', ''); // Calc total netto price $troDOxnprice = (double) $oOrderArticle->oxorderarticles__oxnprice->rawValue; $troFTotalnetprice = $troDOxnprice * $troFOxAmount; // calc total brutto price $troDOxbprice = (double) $oOrderArticle->oxorderarticles__oxbprice->rawValue; $troFTotalbrutprice = $troDOxbprice * $troFOxAmount; // prices $oPrice = $oContent->getPrice(); $oOrderArticle->oxorderarticles__oxnetprice = new oxField( $troFTotalnetprice, oxField::T_RAW ); $oOrderArticle->oxorderarticles__oxvatprice = new oxField($oPrice->getVatValue(), oxField::T_RAW); $oOrderArticle->oxorderarticles__oxbrutprice = new oxField( $troFTotalbrutprice, oxField::T_RAW ); $oOrderArticle->oxorderarticles__oxvat = new oxField($oPrice->getVat(), oxField::T_RAW); $oUnitPtice = $oContent->getUnitPrice(); // $oOrderArticle->oxorderarticles__oxnprice = new oxField($oUnitPtice->getNettoPrice(), oxField::T_RAW); // $oOrderArticle->oxorderarticles__oxbprice = new oxField($oUnitPtice->getBruttoPrice(), oxField::T_RAW); |
|
An other update: I just found this ticket https://bugs.oxid-esales.com/view.php?id=5254 The attached module "cmselectionlistsrecalculate" by "Julian Rauscher" seems to fix this issue though it looks like it ignores at least the defined "Scale Prices". I assume the best and only solution is to fix the bug that no/the first selectionlist is found/used. |