I try to make my payment with credit card and i have some trouble with this.
Opencart version is 2.0.3.1
Problem is
I check this file on line 60 and im at a loss..PHP Notice: Undefined variable: creditcard_geo_zone_id in F:\Serv\OpenServer\domains\open-test.lol\admin\view\template\payment\creditcard.tpl on line 60
Code: Select all
<div class="col-sm-10">
<select name="creditcard_geo_zone_id" id="input-geo-zone" class="form-control">
<option value="0"><?php echo $text_all_zones; ?></option>
<?php foreach ($geo_zones as $geo_zone) { ?>
<?php if ($geo_zone['geo_zone_id'] == $creditcard_geo_zone_id) { ?> (Line 60 with error.)
<option value="<?php echo $geo_zone['geo_zone_id']; ?>" selected="selected"><?php echo $geo_zone['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $geo_zone['geo_zone_id']; ?>"><?php echo $geo_zone['name']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
catalog/model/payment/creditcard.php code is here
Code: Select all
<?php
class ModelPaymentPPPro extends Model {
public function getMethod($address, $total) {
$this->language->load('payment/creditcard');
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('creditcard_geo_zone_id') . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");
if ($this->config->get('creditcard_total') > 0 && $this->config->get('creditcard_total') > $total) {
$status = false;
} elseif (!$this->config->get('creditcard_geo_zone_id')) {
$status = true;
} elseif ($query->num_rows) {
$status = true;
} else {
$status = false;
}
$method_data = array();
if ($status) {
$method_data = array(
'code' => 'creditcard',
'title' => $this->language->get('text_title'),
'terms' => '',
'sort_order' => $this->config->get('creditcard_sort_order')
);
}
return $method_data;
}
}
Sry for my bad english. It's hard to explain thinks in language what you don't know good...