View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002903 | OXID eShop (all versions) | 4.05. Performance | public | 2011-05-19 13:45 | 2012-12-10 13:29 |
| Reporter | tjungcl | Assigned To | |||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | Past development | ||||
| Fixed in Version | 4.5.3 revision 39087 | ||||
| Summary | 0002903: assigning stock loads variants as side effect | ||||
| Description | in oxarticle function assignstock: [...] //setting to non buyable when variant list is empty (for example not loaded or inactive) and $this is non buyable parent if ($this->_blNotBuyableParent && count($this->getVariants()) == 0) { $this->_blNotBuyable = true; } [...] The comment says: when the list is empty (for example not loaded). In fact the call to getVariants() loads the variants, so if it was not loaded (on purpose) it gets now. More: if $this->_blNotBuyable is already true, it must not be checked. so, do get the same result without forcing a variantload, change to //setting to non buyable when variant list is empty (for example not loaded or inactive) and $this is non buyable parent if (!$this->_blNotBuyable && $this->_blNotBuyableParent && $this->oxarticles__oxvarcount->value == 0) { $this->_blNotBuyable = true; } | ||||
| Tags | Performance | ||||
| Theme | Both | ||||
| Browser | All | ||||
| PHP Version | any | ||||
| Database Version | any | ||||