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!
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!
Last edited by i2Paq on Sun Sep 05, 2010 5:21 pm, edited 1 time in total.
Reason: Topic moved
Reason: Topic moved
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
The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."
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>
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>
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.
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.
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.
<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.
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
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
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
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
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>
I'm using OpenCart 2.0.2.0 and the temple looks different. It look this this
and
How do I hide these?
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>
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>
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:
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
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;
}
Find on line 20:
Code: Select all
<div class="form-group">
Change to:
Code: Select all
<div class="div_class_name_pp">
To remove "Card Issue Number",
Find on line 60:
Code: Select all
<div class="form-group">
Change to
Code: Select all
<div class="div_class_name_pp">
Save and enjoy like a boss lol
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 ?
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 ?
Who is online
Users browsing this forum: No registered users and 42 guests