Problem in conversion of tpl file to twig file in a custom payment module
Posted: Tue Nov 28, 2017 6:17 pm
I am writing a custom module for opencart 3 and I also have the same module for opencart 2.3 . I have successfully converted all the files but stuck in a twig file into catalog folder. That's why it's showing a blank page. Please help
opencart2.3.tpl file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $language; ?>" xml:lang="<?php echo $language; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
</head>
<body>
<div style="text-align: center;">
<h1><?php echo $heading_title; ?></h1>
<p><?php echo $text_response; ?></p>
<div style="border: 1px solid #DDDDDD; margin-bottom: 20px; width: 350px; margin-left: auto; margin-right: auto;">
<WPDISPLAY ITEM=banner>
</div>
<p><?php echo $payment_status_message; ?></p>
<p><?php echo $text_payment_wait; ?></p>
</div>
<script type="text/javascript">
</script>
</body>
</html>
opencart3.0.twig file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{{ direction }}" lang="{{ language }}" xml:lang="{{ language }}">
<head>
<title>{{ title }}</title>
<base href="{{ base }}" />
</head>
<body>
<div style="text-align: center;">
<h1>{{ heading_title }}</h1>
<p>{{ text_response }}</p>
<div style="border: 1px solid #DDDDDD; margin-bottom: 20px; width: 350px; margin-left: auto; margin-right: auto;">
<WPDISPLAY ITEM=banner>
</div>
<p>{{ payment_status_message }}</p>
<p>{{ text_payment_wait }}</p>
</div>
<script type="text/javascript">
</script>
</body>
</html>
If I'm wrong in conversion of same file from tpl to twig, then please rectify me.
opencart2.3.tpl file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $language; ?>" xml:lang="<?php echo $language; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
</head>
<body>
<div style="text-align: center;">
<h1><?php echo $heading_title; ?></h1>
<p><?php echo $text_response; ?></p>
<div style="border: 1px solid #DDDDDD; margin-bottom: 20px; width: 350px; margin-left: auto; margin-right: auto;">
<WPDISPLAY ITEM=banner>
</div>
<p><?php echo $payment_status_message; ?></p>
<p><?php echo $text_payment_wait; ?></p>
</div>
<script type="text/javascript">
</script>
</body>
</html>
opencart3.0.twig file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{{ direction }}" lang="{{ language }}" xml:lang="{{ language }}">
<head>
<title>{{ title }}</title>
<base href="{{ base }}" />
</head>
<body>
<div style="text-align: center;">
<h1>{{ heading_title }}</h1>
<p>{{ text_response }}</p>
<div style="border: 1px solid #DDDDDD; margin-bottom: 20px; width: 350px; margin-left: auto; margin-right: auto;">
<WPDISPLAY ITEM=banner>
</div>
<p>{{ payment_status_message }}</p>
<p>{{ text_payment_wait }}</p>
</div>
<script type="text/javascript">
</script>
</body>
</html>
If I'm wrong in conversion of same file from tpl to twig, then please rectify me.