Credit Card Field Not Posting Information

erika

No avatar

2010-04-17 19:33

Hi folks,

I've managed to add a credit card number field along with a credit card expiration date field, but neither one posts any information to the confirmation page or the back end of the site. Both the confirmation page and the back end of the site have fields for this information, but it's not getting posted.

I've modified the following pages in OpenCart 3.x:

core/orders.php
db/orders.def.php
templates/orders_form.tpl
templates/orders_print.tpl
templates/admin/orders.tpl

Am I missing something? You can test the orders here: goodeatspizza.com. Thanks in advance for your help.

» Quick.Cart v3.x

-EP

beholder

Avatar: beholder

2010-04-18 12:31

have you tried the aOrder[sCredit_card] in the orders_print.tpl template? Should work, as far as I know.
Administration should also work if you edit templates/admin/orders.tpl, table in the block FORM_MAIN.

erika

No avatar

2010-04-18 18:34

In the orders_print.tpl template I have the following:

<dt class="email">$lang[Email]:</dt><dd class="email">$aOrder[sEmail]</dd>

<
dt class="Credit_card">$lang[Credit_card]:</dt><dd class="Credit_card">$aOrder[sCredit_card]</dd>
    
<
dt class="Credit_expire">$lang[Credit_expire]:</dt><dd class="Credit_expire">$aOrder[sCredit_expire]</dd>

<
dt class="orderDate">$lang[Date]:</dt><dd class="orderDate">$aOrder[sDate]</dd>



And in templates/admin/orders.tpl under the block FORM_MAIN again under the email I have the following:


    
<!-- CC# Start -->
      
<tr class="l0">
        <
th>
          
$lang[Credit_card]
        </
th>
        <
td>
          <
input type="text" name="sCredit_card" value="$aData[sCredit_card]" size="50" maxlength="40" class="input" alt="Credit Card Number" />
        </
td>
      </
tr>
      <!-- 
CC# End -->
      
<!-- CC Exp Start -->
      <
tr class="l0">
        <
th>
          
$lang[Credit_expire]
        </
th>
        <
td>
          <
input type="text" name="sCredit_expire" value="$aData[sCredit_expire]" size="50" maxlength="40" class="input" alt="Credit Card Expiration" />
        </
td>
      </
tr>
      <!-- 
CC Exp End -->

-EP

beholder

Avatar: beholder

2010-04-19 22:43

please check if order ID 2 has cc number and cc expiry date filled correctly in file db/orders.php. If not then the problem is that order for doesn't save the order properly. If yes, then it's a matter of referencing the right order content in the template.

beholder

Avatar: beholder

2010-04-19 22:48

correction: If not then the problem is that order FORM doesn't save the order properly. If yes, then it's a matter of referencing the right order content in the template.

erika

No avatar

2010-04-19 23:36

No cc number or exipry date for ID 2 in db/orders/php.

So what do I have to go back and re-edit?

-EP

beholder

Avatar: beholder

2010-04-20 04:35

well, I am not sure. It SHOULD work the way you did it, no question about it.

beholder

Avatar: beholder

2010-04-20 04:39

So did you actually implement it ok in db/orders.def.php to all of the $aFieldsNames, $aFieldsSort and function en_products()?
Because if not, it could do this.
Also, make sure the old orders actually contain additional $$ at the end.
old orders = orders before you made this modification.

erika

No avatar

2010-04-20 06:06

In db/orders.def.php I missed the "s" before credit_card and credit_expire. Small mistake, big problem. It seems to be working now. I owe you one, Beholder! Thanks so much for your help!

-EP

beholder

Avatar: beholder

2010-04-21 01:46

No problem, I thought it could be something like this since adding a new field is pretty straightforward. (Well, unless you want to do something with the value...)

g0kh4n

Avatar: g0kh4n

2010-07-12 23:46

Erika,

Could you please share all the modifications you have done to implement the credit card payment option to your website?

Back to top
about us | contact