<commit_before><?php
class Vpc_Shop_Products_Directory_AddToCart_Component extends Vpc_Form_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['flags']['processInput'] = false;
        $ret['placeholder']['submitButton'] = trlVps('add to cart');
        $ret['generators']['child']['component']['success'] = 'Vpc_Shop_AddToCartAbstract_Success_Component';
        return $ret;
    }

    protected function _initForm()
    {
        $id = $this->getData()->row->id;
        $addToCart = $this->getData()->parent->getComponent()->getItemDirectory()
            ->getChildComponent('_'.$id)
            ->getChildComponent('-addToCart');
        $this->_form = $addToCart->getComponent()->getForm();
        $this->_form->setName('order'.$id);
        parent::_initForm();
    }

    public function setActionUrl($url)
    {
        $this->_actionUrl = $url;
    }

    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $ret['action'] = '#';
        return $ret;
    }

    protected function _beforeInsert(Vps_Model_Row_Interface $row)
    {
        parent::_beforeInsert($row);
        $id = $this->getData()->row->id;
        $addToCart = $this->getData()->parent->getComponent()->getItemDirectory()
            ->getChildComponent('_'.$id)
            ->getChildComponent('-addToCart');
        $addToCart->getComponent()->_beforeInsert($row);
    }
}
<commit_msg>Shop: Formular Action von # auf  gesetzt, man hatte das # dann in der URL<commit_after><?php
class Vpc_Shop_Products_Directory_AddToCart_Component extends Vpc_Form_Component
{
    public static function getSettings()
    {
        $ret = parent::getSettings();
        $ret['flags']['processInput'] = false;
        $ret['placeholder']['submitButton'] = trlVps('add to cart');
        $ret['generators']['child']['component']['success'] = 'Vpc_Shop_AddToCartAbstract_Success_Component';
        return $ret;
    }

    protected function _initForm()
    {
        $id = $this->getData()->row->id;
        $addToCart = $this->getData()->parent->getComponent()->getItemDirectory()
            ->getChildComponent('_'.$id)
            ->getChildComponent('-addToCart');
        $this->_form = $addToCart->getComponent()->getForm();
        $this->_form->setName('order'.$id);
        parent::_initForm();
    }

    public function setActionUrl($url)
    {
        $this->_actionUrl = $url;
    }

    public function getTemplateVars()
    {
        $ret = parent::getTemplateVars();
        $ret['action'] = '';
        return $ret;
    }

    protected function _beforeInsert(Vps_Model_Row_Interface $row)
    {
        parent::_beforeInsert($row);
        $id = $this->getData()->row->id;
        $addToCart = $this->getData()->parent->getComponent()->getItemDirectory()
            ->getChildComponent('_'.$id)
            ->getChildComponent('-addToCart');
        $addToCart->getComponent()->_beforeInsert($row);
    }
}

{'fraction_non_alphanumeric': 0.16694546671127466, 'fraction_numerical': 0.0, 'mean_word_length': 2.944591029023747, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 55, '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': '3515674', 'n_tokens_mistral': 859, 'n_tokens_neox': 877, 'n_words': 130}