Skip to content

Commit

Permalink
Fix erroneous template path
Browse files Browse the repository at this point in the history
  • Loading branch information
mollierobbert committed Dec 10, 2014
1 parent f09d76b commit c3c6818
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions catalog/controller/payment/mollie_ideal.php
Original file line number Diff line number Diff line change
Expand Up @@ -521,16 +521,17 @@ protected function renderTemplate ($template, $data, $common_children = array(),
*/
protected function getTemplatePath ($template)
{
$config_template = $this->config->get("config_template");
$possible_paths = array();
$theme_path = $this->config->get("config_template") . "/template/payment/";
$default_path = "default/template/payment/";
$possible_paths = array();

if ($this->isOpencart2())
{
$possible_paths[] = $config_template . "/" . $template . "_2.tpl";
$possible_paths[] = "default/" . $template . "_2.tpl";
$possible_paths[] = $theme_path . $template . "_2.tpl";
$possible_paths[] = $default_path . $template . "_2.tpl";
}

$possible_paths[] = $config_template . "/" . $template . ".tpl";
$possible_paths[] = $theme_path . $template . ".tpl";

foreach ($possible_paths as $path)
{
Expand All @@ -540,7 +541,7 @@ protected function getTemplatePath ($template)
}
}

return "default/" . $template . ".tpl";
return $default_path . $template . ".tpl";
}

/**
Expand Down

0 comments on commit c3c6818

Please sign in to comment.