<commit_before><?php
class Vpc_Shop_Products_View_Component extends Vpc_Shop_Products_ViewWithoutAddToCart_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['flags']['processInput'] = true;
        return $ret;
    }
    public function getPartialVars($partial, $nr, $info)
    {
        $ret = parent::getPartialVars($partial, $nr, $info);
        $ret['item']->addToCart = $this->getData()->parent->getComponent()
            ->getItemDirectory()->getChildComponent('-'.$ret['item']->row->id);
        return $ret;
    }

    public function processInput(array $postData)
    {
        parent::processInput($postData);
        foreach ($this->getItems() as $i) {
            $addToCart = $this->getData()->parent->getComponent()
                ->getItemDirectory()->getChildComponent('-'.$i->row->id);
            $addToCart->getComponent()->processInput($postData);
        }
    }
}<commit_msg>Shop: Laestiger Cache-loesch Bug, wenn in einer Product-List was geaendert wird, muss auch der Cache geloescht werden - lieferte Exception, da processInput auf das falsche aufgerufen wurde<commit_after><?php
class Vpc_Shop_Products_View_Component extends Vpc_Shop_Products_ViewWithoutAddToCart_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['flags']['processInput'] = true;
        return $ret;
    }
    public function getPartialVars($partial, $nr, $info)
    {
        $ret = parent::getPartialVars($partial, $nr, $info);
        $ret['item']->addToCart = $this->getData()->parent->getComponent()
            ->getItemDirectory()->getChildComponent('-'.$ret['item']->row->id);
        return $ret;
    }

    public function processInput(array $postData)
    {
        parent::processInput($postData);
        foreach ($this->getItems() as $i) {
            $addToCart = $this->getData()->parent->getComponent()
                ->getItemDirectory()->getChildComponent('-'.$i->row->id);
            $addToCart->getComponent()->processInput($postData);
        }
    }
    public function getPartialCacheVars($nr)
    {
        $ret = parent::getPartialCacheVars($nr);
        // Wenn sich bei einer View ändert, was angezeigt wird
        $ret[] = array(
            'model' => 'Vps_Component_FieldModel',
            'field' => 'component_id',
            'value' => $this->getData()->parent->componentId
        );
        return $ret;
    }
}
{'fraction_non_alphanumeric': 0.15188335358444716, 'fraction_numerical': 0.0, 'mean_word_length': 2.8958990536277605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5090917', 'n_tokens_mistral': 705, 'n_tokens_neox': 715, 'n_words': 133}