Post by ktm959 » Sun Sep 05, 2010 5:52 am

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!
Last edited by i2Paq on Sun Sep 05, 2010 5:21 pm, edited 1 time in total.
Reason: Topic moved

Newbie

Posts

Joined
Sun Sep 05, 2010 5:45 am

Post by Miguelito » Sun Sep 05, 2010 11:50 pm

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."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by netpox » Sat Sep 25, 2010 10:52 am

I also need to do that and i tried and once you remove those fields it doesnt work

Newbie

Posts

Joined
Fri Jul 23, 2010 11:54 pm

Post by jomoweb » Fri Jul 29, 2011 4:34 am

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>

Newbie

Posts

Joined
Thu Feb 21, 2008 3:11 am

Post by Purebeads » Sat Jan 26, 2013 3:14 pm

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.

Active Member

Posts

Joined
Fri Apr 30, 2010 12:07 pm

Post by jomoweb » Tue Jan 29, 2013 1:41 am

You are welcome, glad it helped you!

Newbie

Posts

Joined
Thu Feb 21, 2008 3:11 am

Post by javonanka » Tue Jan 29, 2013 9:06 am

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?

Newbie

Posts

Joined
Wed Sep 12, 2012 9:13 pm
Location - Brisbane, Australia

Post by jomoweb » Tue Jan 29, 2013 9:15 am

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.

Newbie

Posts

Joined
Thu Feb 21, 2008 3:11 am

Post by javonanka » Tue Jan 29, 2013 9:52 am

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

Newbie

Posts

Joined
Wed Sep 12, 2012 9:13 pm
Location - Brisbane, Australia

Post by javonanka » Tue Jan 29, 2013 8:58 pm

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

Newbie

Posts

Joined
Wed Sep 12, 2012 9:13 pm
Location - Brisbane, Australia

Post by eurekasprings » Wed Mar 27, 2013 7:29 am

This thread was so helpful. Thank you guys so much!!!!!

New member

Posts

Joined
Sun Feb 17, 2013 4:43 am

Post by mjind » Fri Jul 31, 2015 2:09 am

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>

Newbie

Posts

Joined
Wed Jul 22, 2015 9:11 am

Post by johnblood » Thu Oct 29, 2015 2:51 am

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?

Newbie

Posts

Joined
Fri Apr 17, 2015 2:07 am

Post by MrNubbins » Sat Mar 05, 2016 1:58 am

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:

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

Newbie

Posts

Joined
Fri Mar 04, 2016 11:50 pm
Who is online

Users browsing this forum: No registered users and 6 guests