10 replies [Last post]
Mariano's picture
Offline
Joined: 09/04/2007
Juice: 110
Was this information Helpful?

Hi.

I tried looking in various locations, but I couldn't find out where the 'collapsed by default' option for 'View card details' at the 'View order' screen is. I would like those card details to be shown as default, since I'm trying to add a print option at the order screen.

Thanks =)

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: View Card Details

There isn't a setting for that anywhere. (That makes it really hard to find. Eye-wink)

Mariano's picture
Offline
Joined: 09/04/2007
Juice: 110
Re: Re: View Card Details

Thanks, Ryan. I supposed there was no setting for that. Actually, I meant somehow tweaking the corresponding module. Do you know more or less which lines should I look for? I tried searching in several modules or js files (uc_payment, uc_order, uc_cart, uc_store, etc.), but couldn't find anything related to that setting. Maybe I just overlooked it.
Again, thanks for any suggestion.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
uc_credit.module

uc_credit.module

Mariano's picture
Offline
Joined: 09/04/2007
Juice: 110
Thanks for the hint. On

Thanks for the hint.

On uc_credit.module, I tried changing

onclick="return false;"

to

onclick="return true;"

which somehow reloaded the page every time the card details where displayed, by collapsing them again.

I also tried removing lines 282-284, which caused the 'View card details' link to dissapear.

$output .= '<span onclick="toggle_card_details();" style="cursor: pointer;">'
          .'<a id="cc_details_title" href="" onclick="return false;" '
          .'style="display: none;">View card details.</a>';

On uc_credit.js I tried changing:

$('#cc_details_title').show(0);
    $('#cc_details').hide(0);

to

$('#cc_details_title').show(1);
    $('#cc_details').hide(1);

None of the previous tries worked. Any idea about how should I proceed?
Thanks a lot! =)

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1057
Re: Thanks for the hint. On

Mariano, this is a great idea. Did you ever figure it out?

cha0s's picture
Offline
Getting busy with the Ubercode.
Joined: 08/22/2008
Juice: 416
Re: Re: Thanks for the hint. On

Try changing uc_credit.js to

<?php
     
$('#cc_details_title').hide(0);
      $(
'#cc_details').show(0);
?>

Untested... and UNSUPPORTED! Sticking out tongue

Try FreeBASIC!
My game Lynn's Legacy

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1057
cha0s wrote:Try changing
cha0s wrote:

Try changing uc_credit.js to

<?php
     
$('#cc_details_title').hide(0);
      $(
'#cc_details').show(0);
?>

Untested... and UNSUPPORTED! Sticking out tongue

Gotta mind the fine print Eye-wink

Mariano wrote:

None of the previous tries worked.

Mike

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1057
Ok, I got it In different to

EDIT: This post got posted out of line somehow. Please read my below post before reading this post. Thank you.

Ok, I got it Laughing out loud

In different to Mariano,

Mariano wrote:

None of the previous tries worked.

cha0s's fix does the trick in UC2.x:

cha0s wrote:

Try changing uc_credit.js to

<?php
     
$('#cc_details_title').hide(0);
      $(
'#cc_details').show(0);
?>

Yet, in my old UC1.x uc_credit.js file, this did not do the trick. So, in actuality, Mariano is correct for UC1.x and cha0s is correct for UC2.x.

Here is my uc_credit.js using D6.20 and UC2.4:

File: \sites\all\modules\ubercart\payment\uc_credit\uc_credit.js

// $Id: uc_credit.js,v 1.3.4.2 2008/11/07 21:13:23 islandusurper Exp $

if (Drupal.jsEnabled) {
  $(document).ready(
    function () {
      $('#cc_details_title').hide(0);
      $('#cc_details').show(0);
    }
  );
}

/**
* Toggle credit card details on the order view screen.

function toggle_card_details() {
  $('#cc_details').toggle();
  $('#cc_details_title').toggle();
}

*/

I also went ahead and disabled the on-click toggle because our employees double click the information to transfer to our internal sales processing software.

Peace out,
Mike

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1057
Re: View Card Details

Could someone share the solution to this for UC2.x please?

I had this working on my old UC1.x and for the life of me I can't remember what or where I modified the old 1.x files to expose the CC data.

If someone could please submit a fix for this that would be sa-weeeeet!

Until then I will keep looking through my old 1.x code to see what it was I did. I'll post up if I figure it out on my end.

Thanks
Mike

BigMike's picture
Offline
Joined: 10/20/2008
Juice: 1057
Re: Re: View Card Details

Okay my reply was posted above my previous post somehow and I cannot delete nor move it down beneath the above post like any other threaded display I've ever seen.

Crazy

Mike