View Issue Details

IDProjectCategoryView StatusLast Update
0005413OXID eShop (all versions)4.01. Database handlingpublic2014-02-21 09:40
Reporterhenrik.steffen 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
PlatformallOSallOS Versionall
Product Version4.6.0 revision 44406 
Target Version4.8.5 / 5.1.5Fixed in Version 
Summary0005413: Active snippet doesn't give you all active parent products of variants
DescriptionIn OXID table oxarticles the OXSTOCK field has a default value of -1

If you have a product with oxstockflag = 2 and now you add variants with positive stock, the oxvarstock field of the parent product is automatically set to the sum of all oxstock fields of the variants of this parent, while the oxstock field of the parent remains -1.

If the sum of all variants oxstock is 1 , then you have a constellation, where the whole parent will be considered inactive using getSqlActiveSnippet()
Steps To ReproduceIn getSqlActiveSnippet() there is the following check routine:

oxv_oxarticles_1_de.oxstockflag != 2
or ( oxv_oxarticles_1_de.oxstock + oxv_oxarticles_1_de.oxvarstock ) > 0


Now if oxstock of the parent is -1 and oxvarstock (sum of all variants oxstock) is 1, you'll get:

-1 + 1 = 0

So the whole product is inactive.

TagsPayment, Stock, Variants
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Relationships

duplicate of 0004822 resolvedLinas Kukulskis Redirect when stock of variant is 1 
related to 0004968 resolvedLinas Kukulskis stocklevel set to -1 when creating new product 

Activities

leofonic

2013-09-26 08:26

reporter   ~0009112

probably related to:
https://bugs.oxid-esales.com/view.php?id=4822
https://bugs.oxid-esales.com/view.php?id=4968

jurate.baseviciene

2014-02-21 09:40

reporter   ~0009571

bug is closed as duplicate of 0004822.