View Issue Details

IDProjectCategoryView StatusLast Update
0002121OXID eShop (all versions)1. ----- eShop frontend -----public2012-12-10 14:37
ReporterMBa 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version4.6.0_beta2 
Summary0002121: basket.tpl Exceptions are ambiguous
DescriptionThe article-exception throws the product-id of the article.
In the basket.tpl the product-id will be checked, too.

But, if you have two differnt articles with the same Id (eg. selectlists or parameters) then you have muliple error-messages under the specific basket-article.
Steps To ReproduceCreate a article
'Product can be customized' => true
Delivery Status = 'If out of Stock, not orderable'
Stock = 2

Put this article 2 times in the basket with different texts.
Go to basket.

Increase one of you basketproducts.
Remember the other one have a correct value.

So you see, both articles got a error-message.

If you increase both basket-articles, both articles have 2 error-messages.

The same with select list, too.
Additional InformationSolution:
Add to the Exceptions a basketitem-id und check in the template for this id instead the product-id.

For testing:
$oEx->setArticleNr($sBasketItemKey);//articleNr will be now index of basketitem

basket.tpl
Instead:
        <!-- display only the exceptions for the current article-->
           [{if $basketproduct->oxarticles__oxid->value == $oEr->getValue('productId') }]
               <tr>
                 <td class="brd"></td>
                 <td id="test_basket_StockError_[{ $basketproduct->oxarticles__oxid->value }]_[{$key}]" colspan="6">
                     <span class="err">[{ $oEr->getOxMessage() }] [{ $oEr->getValue('remainingAmount') }]</span>
                 </td>
                 <td></td>
               </tr>
            [{/if}]


this:
        <!-- display only the exceptions for the current basketitem-->
           [{if $basketindex == $oEr->getValue('articleNr') }]
               <tr>
                 <td class="brd"></td>
                 <td id="test_basket_StockError_[{ $basketproduct->oxarticles__oxid->value }]_[{$key}]" colspan="6">
                     <span class="err">[{ $oEr->getOxMessage() }] [{ $oEr->getValue('remainingAmount') }]</span>
                 </td>
                 <td></td>
               </tr>
            [{/if}]
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

MBa

2010-09-22 15:26

reporter   ~0003540

Last edited: 2010-09-22 15:29

View 2 revisions

I grep 'articleNr' over the complete oxid shop.
Found it in:
oxbasketitem.php
oxarticleexception.php
oxorder.php

Case sensitive it is only in oxarticleexeption.

In all files the articleNr will be only use for throw. - So these entree seems not in use.

ramunas.skarbalius

2011-11-23 16:07

reporter   ~0005440

bug was resolved adding a basketindex for checking which article was selected