Author Topic: Credit Card Type not found  (Read 49519 times)

DDPaul

  • Beginner
  • *
  • Posts: 28
Credit Card Type not found
« on: May 19, 2008, 00:19:30 am »
I have a rather strange error that I haven't seen listed in the forum or explained in the users guide. When attempting a cart checkout I get to step 3 (payment method) where only one payment method is available - credit card payment. There a form is displayed with the following fields:

credit card type:
name on card:            
credit  card number:              
credit card security code:              
Expiration Date:                  

The problem is that all the fields have an input box except the credit card type. Since there is no way to enter a credit card type (e.g., visa or master card) this results in the following checkout error
Error: Credit Card Type not found

This happens when using the credit card payment method (code AN) and when using the method  suggested in the post  "How to Accept & store Credit Cards without a processor (manual processing)" posted in this forum.

I am running on a localhost with joomla 1.5.3  and virtuemart 1.1.0 using sample data until I understand the system. Any ideas how to get the credit card type to appear on the shopping cart checkout and avoid the above error. If I can't process credit cards then the software is useless. I assume I am missing something basic in the setup or configuration but have no idea what. Any help would be appreciated.





neeta

  • Beginner
  • *
  • Posts: 9
Re: Credit Card Type not found
« Reply #1 on: May 22, 2008, 13:47:18 pm »
administrator\components\com_virtuemart\html

go to this location

then open the file checkout.index.php

insert this code any where in this file

<script type="text/javascript">alert('<?php echo $VM_LANG->_('PHPSHOP_CHECKOUT_ERR_MIN_POV',false) ?>');</script>

in the html code but if you are entering this code in php code then

echo '<script type="text/javascript">alert('<?php echo $VM_LANG->_('PHPSHOP_CHECKOUT_ERR_MIN_POV',false) ?>');</script>';



Now after this change go to the payment page and you will see the credit card type

Tell me if it solve the problem

Neeta

DDPaul

  • Beginner
  • *
  • Posts: 28
Re: Credit Card Type not found
« Reply #2 on: May 27, 2008, 23:18:01 pm »

Neeta - Thanks for the tip but this appears to be a symptom of two more basic problems.

The first problem is that the javascript function writeDynaList is is generated by the module  list_payment_methods.tpl.php to create the list box but writeDynaList is undefined when run by the browser because list_payment_methods.tpl.php does not include the link
<script type="text/javascript" src="https://url/includes/js/joomla.javascript.js"></script> in the <head> part of the browser html. This should be done via the joomla <jdoc> head directive. The javascript statement appears to be included correctly in the "Bill to" part of the checkout process via the function ps_userfield::listUserFields but not in the credit card part of the checkout process. However, I don't know the joomla function call to do this.

The second problem is that no <noscript> block is created to create the listbox in the case where the user has disabled javascript. This means that credit cards cannot be used when javascript has been disabled (e.g., with firefox).

I believe the function creditcard_lists in the class ps_creditcard needs to be modified in order to correct these problems butI am just learning all this and don't know what modifications to make. I wish I had more time to work on this but being disabled and bed bound much of the day I just don't have the time or resources to chase all these bugs down.

If anyone figures out the correct modifications to make this work please post them. I'd appreciate it. Currently I am using a hack good only for manual credit card processing by adding a function manual_creditcard_lists to the class ps_creditcard and changing the function call in the template.

DDPaul

jcohencdm

  • Beginner
  • *
  • Posts: 1
Re: Credit Card Type not found
« Reply #3 on: May 28, 2008, 05:20:29 am »
To add a little more to this thread.
When you give a user the option to register and they don’t, the credit card list does not appear. If the user is registered the credit card list appears with no issues.

Does anyone know how to fix this issue.

Joel

searaig

  • Beginner
  • *
  • Posts: 3
Re: Credit Card Type not found
« Reply #4 on: June 21, 2008, 00:23:40 am »
jeez it seems that no one really answers any questions on these boards.

if you're using joomla 1.5.x the solution is a very easy one liner.

in the following file,
/components/com_virtuemart/themes/default/templates/checkou/list_payment_methods.tpl.php

add the following line anywhere after the comments,

Code: [Select]

JHTML::script('joomla.javascript.js','includes/js/');

skynet01

  • Beginner
  • *
  • Posts: 4
Re: Credit Card Type not found
« Reply #5 on: June 21, 2008, 01:34:25 am »
thanks for the tip Searaig, i tried it with joomla 1.1.15 (i know your tip is for 1.5)...and without surprise it didnt work. I tried just putting

 <script language="Javascript" type="text/javascript" src="http://MYURL/includes/js/joomla.javascript.js"></script>   

within that same file but that didn't work either, any tips on how to make it work with joomla 1.1 ?

skynet01

  • Beginner
  • *
  • Posts: 4
Re: Credit Card Type not found
« Reply #6 on: June 24, 2008, 19:02:19 pm »
anyone have a fix for this yet?

cnstrct

  • Beginner
  • *
  • Posts: 2
Re: Credit Card Type not found
« Reply #7 on: July 10, 2008, 16:25:31 pm »
Yes, the fix of adding JHTML::script('joomla.javascript.js','includes/js/');
 described in the earlier post works for my installation of Joomla 1.5.3 and VM 1.1.0

The problem with the credit card list not showing is related to the js not being loaded. Loads now! Thanks!

Sorry no ideas on earlier installations of Joomla and VM. The idea is sound: get the joomla/mambo js loaded.

mknz

  • Beginner
  • *
  • Posts: 31
    • National Underground
Re: Credit Card Type not found
« Reply #8 on: July 10, 2008, 19:27:16 pm »
still need a fix!!!

cjmicro

  • Beginner
  • *
  • Posts: 47
Re: Credit Card Type not found
« Reply #9 on: August 17, 2008, 22:52:02 pm »
I got the credit card types by adding this:

<script language="Javascript" type="text/javascript" src="/includes/js/joomla.javascript.js"></script>

on the first line of the components/com_virtuemart/themes/default/templates/checkou/list_payment_methods.tpl.phpfile! wooho!!!

I still can't get my transactions to process, but I think it's because the curl is not yet enabled on my site. At least the cc drop down is there (and it is on firefox too)

Cheryl

PS THANKS to you all who posted.

andymg

  • Beginner
  • *
  • Posts: 2
Re: Credit Card Type not found
« Reply #10 on: August 18, 2008, 15:21:31 pm »
Genius- that worked a treat order processed.Add the line on the first line and sorted!!!! cheers cjmicro..pc was due getting thrown out the window lol :-)

tired2008

  • Beginner
  • *
  • Posts: 15
Re: Credit Card Type not found
« Reply #11 on: September 01, 2008, 17:09:34 pm »
So is it confirmed that to get the drop down menu to show back up we have to go in and change the code manually?

James Friesen

  • Beginner
  • *
  • Posts: 16
Re: Credit Card Type not found
« Reply #12 on: September 25, 2008, 20:54:36 pm »
The javascript include fixed the problem for me too (J1.5.7 VM 1.1.2)

enap

  • Beginner
  • *
  • Posts: 19
Re: Credit Card Type not found
« Reply #13 on: October 02, 2008, 02:02:03 am »
Fixed missing drop down issue on J1.5.6 VM1.1.2

ufo_hk

  • Jr. Member
  • **
  • Posts: 79
    • 4success Ltd
Re: Credit Card Type not found
« Reply #14 on: October 15, 2008, 02:50:01 am »
Thanks fixed issue for me with joomla 1.5.7 VM 1.1.2