News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Offline Credit Card Processing

Started by trodat, October 23, 2012, 05:50:41 AM

Previous topic - Next topic

trodat

Joomla v2.5.7 VM v2.0.12b

I am using the Offline Credit Card processing v1.4 from iStraxx (http://extensions.virtuemart.net/extensions-virtuemart-2/offline-credit-card-processing-detail).

I set a "Minimum Amount" in the offline credit card method. On the select_payment.php (components/com_virtuemart/views/cart/tmpl/select_payment.php) I am trying to put a php if statement so that if the cart total is less then the minimum amount, the following statement will echo, otherwise it won't: "The credit card payment option is viewable once a minimum of $20 has been added to your shopping cart."

Can you help me construct the php statement? I don't know what variables to use (Not a php programmer) or is there a better way to handle this?

jjk

If you set a minimum amount, the Credit Card option doesn't show if the cart total is below the minimum. I would just leave away the minimum and add a sentence in the Offline Credit Card plugin - 'Payment description' saying "Credit card usage: 20$ Minimum" or something similar. I would expect customers neglecting this to be very rare.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

trodat

I like (and agree with) your solution, but the minimum is not my decision (just the website designer).

jjk

A simple stupid workaround might be to add that Credit Card comment at the bottom of the description field of the last displayed other payment method.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

trodat

that would certainly work too jjk, thanks. I was hoping to have a conditional statement that would explain why the user does not see the credit  card option, not be seen if the minimum was met, and be 100% sure that all credit cards orders meet the minimum. maybe that's a tall order though.

I was playing with some of the php I found in the select_payment.php file for about 4-5 hours to see if I could get something to work, basically (i think) it checks if there is an array and if so echos stuff... i thought I could alter it but I don't even know what to change:

<?php
     
if ($this->found_payment_method) {
    echo 
"<fieldset>";
foreach ($this->paymentplugins_payments as $paymentplugin_payments) {
    if (is_array($paymentplugin_payments)) {
foreach ($paymentplugin_payments as $paymentplugin_payment) {
    echo $paymentplugin_payment.'<br />';
}
    }
}
    echo 
"</fieldset>";
    } else {
 echo "<h1>".$this->payment_not_found_text."</h1>";
    }
    
?>