View Issue Details

IDProjectCategoryView StatusLast Update
0004330OXID eShop (all versions)1.03. Basket, checkout processpublic2015-12-01 10:03
Status acknowledgedResolutionopen 
Product Version4.6.3 revision 47975 
Target VersionFixed in Version 
Summary0004330: When sending order emails, all informatin used for formating email should be done using oxorderarticle object
DescriptionWhen sending order emails, all informatin used for formating email should be done using oxorderarticle object, not oxbasketitem object. It is not correct to use oxbasketitem object as after finishing order it can change. E.g. stock reduced from 1 to 0 and article becomes not valid so if page reloads, basket item is invalidated. So after page reload if you want to send email, there is call in email template oBasket->getBasketArticles() and on this call it throws error as one article is not valid (stock = 0).
TagsBasket, Email, Order
ThemeNot defined
PHP VersionNot defined
MySQL VersionNot defined


parent of 0004271 resolved module PayPal When ordering last article with PayPal, user will be notified about "the article XY is no longer available" 
related to 0002995 acknowledged OXID eShop (all versions) Redundant (4x) call for oxBasket::getBasketArticles 
related to 0005357 resolvedjurate.baseviciene module PayPal When ordering last article with PayPal this article will be missing on confirmation email. 



2012-08-08 18:08

reporter   ~0007272

The Error occurred already in Version 4.6.3 if you need further information in thankyou.tpl like:

[{assign var="basket" value=$oView->getBasket()}]
[{foreach from=$basket->getContents() item=basketitem}]
    [{assign var="priceObj" value=$basketitem->getPrice() }]
    [{assign var="productIDs" value=$basketitem->getProductId()|cat:"|$productIDs" }]
    [{assign var="productQtys" value=$basketitem->getAmount()|cat:"|$productQtys" }]
    [{assign var="productPrices" value=$priceObj->getNettoPrice()|string_format:"%.2f"|cat:"|$productPrices" }]

    [{assign var="objCurrent" value=$basketitem->getArticle()}]
    [{assign var="objParent" value=$objCurrent->getParentArticle()}]

    [{assign var="productNumbers" value=$objParent->oxarticles__oxartnum|cat:"|$productNumbers" }]

Is there a hotfix available?

As you can see here in the errorlog, we have some modules:

Der Artikel "Sup00008-4" ist leider nicht mehr verf├╝gbar

#0 /core/oxutilsobject.php(125): oxUtilsObject->_getObject('oxnoarticleexce...', 0, Array)
#1 [internal function]: oxUtilsObject->oxNew('oxNoArticleExce...')
#2 /core/oxfunctions.php(314): call_user_func_array(Array, Array)
#3 /core/oxbasketitem.php(471): oxNew('oxNoArticleExce...')
#4 /tmp/55567e90bc43c4056907cd0b326eabb7^%%33^334^334F7E49%%thankyou.tpl.php(244): oxBasketItem->getArticle()
#5 /core/smarty/Smarty.class.php(1263): include('/usr/local/zend...')
#6 /views/oxshopcontrol.php(446): Smarty->fetch('page/checkout/t...', 'ox|0|0|1|0')
#7 /views/oxshopcontrol.php(317): oxShopControl->_render(Object(pi_ratepay_thankyou))
#8 /views/oxshopcontrol.php(114): oxShopControl->_process('thankyou', NULL)
#9 /modules/d3log/views/d3_oxshopcontrol_errorhandler.php(14): oxShopControl->start()
#10 /modules/d3clrtmp/views/d3_oxshopcontrol_clrtmp.php(19): d3_oxshopcontrol_errorhandler->start()
0000011 /modules/d3/autoload/views/d3_oxshopcontrol_autoload.php(33): d3_oxshopcontrol_clrtmp->start()
0000012 /index.php(110): d3_oxshopcontrol_autoload->start()
0000013 {main};

Installed Modules:

PayPal (eFire)
Sofort├╝berweisung (tronet)
Heidelpay (D3)
Amazon Payments


2012-08-14 09:28

reporter   ~0007299

Found the problem. Solution is to deactivate the stock validation:

[{assign var="objCurrent" value=$basketitem->getArticle(false)}]


2012-08-23 15:56

reporter   ~0007382

While functionality might need a refactoring,the behavior in standard shop is correct. Every email send shows full basket information, even in the described situation. This kind of behavior might be risky for module developers, but this could be handled fully from module side.

As for the code what solidEvolution noted, I could not find it in standard shop or modules. But the principle is correct: you should use the getter getArticle(false) with additional false parameter to solve the situation.

Resolution for this bug would be fixing it in the next major release.


2012-09-19 08:48

reporter   ~0007459

I installed the 4.5.11 shop and 2.0.2 paypal module. I could not reproduce this behaviour. The last item bought is displayed correctly in customer email and then it goes offline in shop. Works correctly as it should.


2012-12-05 20:41

reporter   ~0008062

I've developed a module for credit card payment and I'm having the same problem.
I tried to implement the proposal above, setting the $blCheckProduct in oxBasketItem::getArticle()to false, but emails are still not containing the 0 quantity products. I'm using OXID CE 4.5.7_41909. How can i fix this from my module?