0

I need to create two additional fields for the ccsave checkout form. I created in the tables sales_flat_quote_payment and sales_flat_order_payment two fields called cc_parcelas and cc_csc.

In html, I put:

<li> 
    <div class="input-box" style="width: 100%!important">
        <div class="v-fix" style="width: 48%!important;float: left">
            <label for="<?php echo $_code ?>_cc_csc" class="required"><em>*</em><?php echo $this->__('CVV') ?></label><br>
            <input type="text" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Name on Card')) ?>" class="input-text required-entry" id="<?php echo $_code ?>_cc_csc" name="payment[cc_csc]" value="<?php echo $this->escapeHtml($this->getInfoData('cc_csc')) ?>" style="width:87%!important" />
        </div>
        <div class="v-fix" style="width: 48%!important">
            <?php $_ccCsc= $this->getInfoData('cc_csc') ?>
            <label for="<?php echo $_code ?>_parcelas" class="required"><em>*</em><?php echo $this->__('Núm. de parcelas') ?></label><br>
            <select id="<?php echo $_code ?>_cc_parcelas" name="payment[cc_parcelas]" class="required-entry" style="width: 100%!important">
            <?php for($t = 1; $t <= 10; $t++) { ?>
                <?php $arr = [1, 3, 6, 10]; ?>
                <?php if(in_array($t, $arr)) : ?>
                    <option value="<?php echo $t ?>"<?php if($t == $_ccCsc): ?> selected="selected"<?php endif ?>><?php echo $t ?></option>
                <?php endif; ?>
            <?php } ?>
            </select>
        </div>
    </div>
</li>

Even sending the fields in html and having created these fields in the tables cited, the information is not written in the database. What am I forgetting? I'm new with Magento development.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.