Page 1 of 1
Remove "Card Valid From Date" and "Card Issue Number" fields
Posted: Sun Sep 05, 2010 5:52 am
by ktm959
Hi Everyone:
I am getting ready to run a store in the US and only sell to US customers. I am using PayPal Website Payments Pro and the actual payment is working just fine. But what I need to do is remove the "Card Valid From Date" text and data box and also remove the "Card Issue Number" text and data box from the Credit Card Details area. Both of these fields aren't necessary for US based customers.
I saw one other topic about this situation but there was not a complete answer for how to remove the text and data boxes. Thanks so much in advance for any help!
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Sun Sep 05, 2010 11:50 pm
by Miguelito
You need to edit the payments controller and template files in catalog directory to get rid of those unwanted fields. If you don't know how to do that - PM me

Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Sat Sep 25, 2010 10:52 am
by netpox
I also need to do that and i tried and once you remove those fields it doesnt work
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Fri Jul 29, 2011 4:34 am
by jomoweb
I found the easiest way to do this is to just hide the entire <tr> from view
in your template's template\payment\pp_pro.tpl file
Find this:
<tr>
<td><?php echo $entry_cc_start_date; ?></td>
Change to this:
<tr style="display: none;">
<td><?php echo $entry_cc_start_date; ?></td>
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Sat Jan 26, 2013 3:14 pm
by Purebeads
After years of having those extraneous fields in my checkout procedure, a customer complained, so I searched the forum and found this thread.
Jomoweb's solution worked perfectly. What Jomoweb said will get rid of the starting date. To get rid of the Solo/Maestro field, search for this:
<tr>
<td><?php echo $entry_cc_issue; ?></td>
... and change the first of those lines to this:
<tr style="display: none;">
Once you have changed the <tr> line, the unwanted entry will simply disappear.
And just in case it isn't clear, the file you want is:
catalog/view/theme/template/payment/pp_pro.tpl
(If you are using a custom theme, replace "theme" in the address above with whatever directory your custom theme is in. My custom theme is in a directory called "mytheme". I am using OpenCart version 1.4.8b.)
Thank you, Jomoweb.
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Tue Jan 29, 2013 1:41 am
by jomoweb
You are welcome, glad it helped you!
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Tue Jan 29, 2013 9:06 am
by javonanka
Are those fields used for anything?
I'm just testing my payment module and had some issues paying with MasterCard. Visa works fine.
Should the issue number field be used for MasterCard?
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Tue Jan 29, 2013 9:15 am
by jomoweb
Not that I know of. I looked back at this project, and I have hidden both those fields, and my client has never told me of anyone ever having problems. It must be from something else. Does your code look exactly like this?
<tr style="display: none;">
<td><?php echo $entry_cc_issue; ?></td>
<td><input type="text" name="cc_issue" value="" size="1" />
<?php echo $text_issue; ?></td>
</tr>
Also, what are you doing to test? Make sure you are using paypal's test mastercard if you are in text mode. The module is setup to setup an error alert, so you should see that if there is an error.
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Tue Jan 29, 2013 9:52 am
by javonanka
I haven't hidden them yet. Will look at code tonight.
Tried with a real MasterCard and it didn't work. Will give it a try withpaypals in the sandbox environment and see how it works.
Thanks for the quick reply.
Cheers,
Johan
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Tue Jan 29, 2013 8:58 pm
by javonanka
I think I got it wrong. The last field is asking for issue number which is just for Maestro/Solo cards. Must have got the details wrong when testing. When trying in paypal's sandbox and it worked fine.
Do you know how to get rid of the Maestro/Solo alternatives in the credit card drop down list?
Edit: Found a solution in this thread
http://forum.opencart.com/viewtopic.php?f=20&t=6128
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Wed Mar 27, 2013 7:29 am
by eurekasprings
This thread was so helpful. Thank you guys so much!!!!!
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Fri Jul 31, 2015 2:09 am
by mjind
I wonder why mine doesn't go away after adding the "display none"?
Code: Select all
<form class="form-horizontal">
<fieldset id="payment">
<legend><?php echo $text_credit_card; ?></legend>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-cc-type"><?php echo $entry_cc_type; ?></label>
<div class="col-sm-10">
<select name="cc_type" id="input-cc-type" class="form-control">
<?php foreach ($cards as $card) { ?>
<option value="<?php echo $card['value']; ?>"><?php echo $card['text']; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-cc-number"><?php echo $entry_cc_number; ?></label>
<div class="col-sm-10">
<input type="text" name="cc_number" value="" placeholder="<?php echo $entry_cc_number; ?>" id="input-cc-number" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cc-start-date"><span data-toggle="tooltip" title="<?php echo $help_start_date; ?>">
<tr style="display: none;">
<?php echo $entry_cc_start_date; ?></span></label>
<div class="col-sm-3">
<select name="cc_start_date_month" id="input-cc-start-date" class="form-control">
<?php foreach ($months as $month) { ?>
<option value="<?php echo $month['value']; ?>"><?php echo $month['text']; ?></option>
<?php } ?>
</select>
</div>
<div class="col-sm-3">
<select name="cc_start_date_year" class="form-control">
<?php foreach ($year_valid as $year) { ?>
<option value="<?php echo $year['value']; ?>"><?php echo $year['text']; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-cc-expire-date"><?php echo $entry_cc_expire_date; ?></label>
<div class="col-sm-3">
<select name="cc_expire_date_month" id="input-cc-expire-date" class="form-control">
<?php foreach ($months as $month) { ?>
<option value="<?php echo $month['value']; ?>"><?php echo $month['text']; ?></option>
<?php } ?>
</select>
</div>
<div class="col-sm-3">
<select name="cc_expire_date_year" class="form-control">
<?php foreach ($year_expire as $year) { ?>
<option value="<?php echo $year['value']; ?>"><?php echo $year['text']; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group required">
<label class="col-sm-2 control-label" for="input-cc-cvv2"><?php echo $entry_cc_cvv2; ?></label>
<div class="col-sm-10">
<input type="text" name="cc_cvv2" value="" placeholder="<?php echo $entry_cc_cvv2; ?>" id="input-cc-cvv2" class="form-control" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cc-issue"><span data-toggle="tooltip" title="<?php echo $help_issue; ?>">
<tr style="display: none;">
<?php echo $entry_cc_issue; ?></span></label>
<div class="col-sm-10">
<input type="text" name="cc_issue" value="" placeholder="<?php echo $entry_cc_issue; ?>" id="input-cc-issue" class="form-control" />
</div>
</div>
</fieldset>
</form>
<div class="buttons">
<div class="pull-right">
<input type="button" value="<?php echo $button_confirm; ?>" id="button-confirm" data-loading-text="<?php echo $text_loading; ?>" class="btn btn-primary" />
</div>
</div>
<script type="text/javascript"><!--
$('#button-confirm').bind('click', function() {
$.ajax({
url: 'index.php?route=payment/pp_pro/send',
type: 'post',
data: $('#payment :input'),
dataType: 'json',
beforeSend: function() {
$('#button-confirm').attr('disabled', true);
$('#payment').before('<div class="alert alert-info"><i class="fa fa-info-circle"></i> <?php echo $text_wait; ?></div>');
},
complete: function() {
$('#button-confirm').attr('disabled', false);
$('.attention').remove();
},
success: function(json) {
if (json['error']) {
alert(json['error']);
}
if (json['success']) {
location = json['success'];
}
}
});
});
//--></script>
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Thu Oct 29, 2015 2:51 am
by johnblood
I'm using OpenCart 2.0.2.0 and the temple looks different. It look this this
Code: Select all
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cc-start-date"><span data-toggle="tooltip" title="<?php echo $help_start_date; ?>"><?php echo $entry_cc_start_date; ?></span></label>
<div class="col-sm-3">
<select name="cc_start_date_month" id="input-cc-start-date" class="form-control">
<?php foreach ($months as $month) { ?>
<option value="<?php echo $month['value']; ?>"><?php echo $month['text']; ?></option>
<?php } ?>
</select>
</div>
and
Code: Select all
<div class="form-group">
<label class="col-sm-2 control-label" for="input-cc-issue"><span data-toggle="tooltip" title="<?php echo $help_issue; ?>"><?php echo $entry_cc_issue; ?></span></label>
<div class="col-sm-10">
<input type="text" name="cc_issue" value="" placeholder="<?php echo $entry_cc_issue; ?>" id="input-cc-issue" class="form-control" />
</div>
How do I hide these?
Re: Remove "Card Valid From Date" and "Card Issue Number" fi
Posted: Sat Mar 05, 2016 1:58 am
by MrNubbins
I ran into this problem today and it took a little while to find a solution for Opencart 2 so since some people might want to know here is how to do it.
Works For Opencart 2 - Version 2.1.0.2
To hide/remove visually "
Card Valid From Date" from the paypal pro checkout,
Go to:
catalog/view/theme/default/stylesheet/stylesheet.css and add this to the top of the file:
Code: Select all
div.div_class_name_pp { /* this will hide div with class div_class_name_pp */
display:none;
}
Now go to:
catalog/view/theme/default/template/payment/pp_pro.tpl
Find on line 20:
Change to:
To remove "
Card Issue Number",
Find on line 60:
Change to
Save and enjoy like a boss lol
Re: Remove "Card Valid From Date" and "Card Issue Number" fields
Posted: Mon Mar 01, 2021 7:02 am
by bobcah12
Hi ,
I jave made the changes to the required files for OpenCart 2.02 as described yet the Credit Card Valid field still shows ? Do I have to do anything else to make the change visible. Is there a precompiler , etc that needs to be run ?