I got an error message:
Code: Select all
Fatal error: Uncaught exception 'Twig_Error_Loader' with message 'Unable to find template "extension/shipping/ecpaylogistic.twig" (looked into: /home/*.*/public_html/demo/3020/admin/view/template).' in /home/*.*/public_html/demo/3020/system/library/template/Twig/Loader/Filesystem.php:215 Stack trace: #0 /home/*.*/public_html/demo/3020/system/library/template/Twig/Loader/Filesystem.php(139): Twig_Loader_Filesystem->findTemplate('extension/shipp...') #1 /home/*.*/public_html/demo/3020/system/library/template/Twig/Environment.php(312): Twig_Loader_Filesystem->getCacheKey('extension/shipp...') #2 /home/*.*/public_html/demo/3020/system/library/template/Twig/Environment.php(378): Twig_Environment->getTemplateClass('extension/shipp...', NULL) #3 /home/*.*/public_html/demo/3020/system/library/template/twig.php(33): Twig_Environment->loadTemplate('extension/shipp...') #4 /home/*.*/public_html/demo/3020/system/library/template.php(51): Template\Twig->render('extension/shipp...', '1') #5 /home/open in /home/*.*/public_html/demo/3020/system/library/template/Twig/Loader/Filesystem.php on line 215
I have tried to make changes, But I'm not sure how the code about the error message is modified.
Original file:
<div class="form-group">
<label class="col-sm-2 control-label" for="input-name"><?php echo $entry_mid; ?></label>
<div class="col-sm-10">
<input type="text" name="ecpaylogistic_mid" value="<?php echo $ecpaylogistic_mid; ?>" placeholder="<?php echo $entry_mid; ?>" id="input-name" class="form-control" />
<?php if (!empty($error_mid)) { ?>
<div class="text-danger"><?php echo $error_mid; ?></div>
<?php } ?>
</div>
</div>
Change file:
<div class="form-group">
<label class="col-sm-2 control-label" for="input-name{{ entry_mid }}</label>
<div class="col-sm-10">
<input type="text" name="shipping_ecpaylogistic_mid" value="{{ ecpaylogistic_mid }}" placeholder="{{ entry_mid }}" id="input-name" class="form-control" />
<?php if (!empty($error_mid)) { ?>
<div class="text-danger{{ error_mid }}</div>
<?php } ?>
</div>
</div>
Based on fedex.tpl code, The error message is controlled by the following code:
Original file:
<?php if ($error_key) { ?>
<div class="text-danger"><?php echo $error_key; ?></div>
<?php } ?>
Change file:
{% if error_key %}
<div class="text-danger">{{ error_key }}</div>
{% endif %}
In my code more than a "
(!empty($error_mid)
)" sign, How should I modify this?
In addition, The following code, how to modify?
Original file:
<div class="form-group">
<label class="col-sm-2 control-label" for="input-ecpaylogistic-type"><?php echo $entry_type; ?></label>
<div class="col-sm-10">
<select name="ecpaylogistic_type" id="input-ecpaylogistic-type" class="form-control">
<?php foreach ($ecpaylogistic_types as $ecpayl_type) { ?>
<?php if ($ecpayl_type['value'] == $ecpaylogistic_type) { ?>
<option value="<?php echo $ecpayl_type['value']; ?>" selected="selected"><?php echo $ecpayl_type['text']; ?></option>
<?php } else { ?>
<option value="<?php echo $ecpayl_type['value']; ?>"><?php echo $ecpayl_type['text']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
</div>
Change file:
<div class="form-group">
<label class="col-sm-2 control-label" for="input-ecpaylogistic-type{{ entry_type }}</label>
<div class="col-sm-10">
<select name="shipping_ecpaylogistic_type" id="input-ecpaylogistic-type" class="form-control">
{% for ecpaylogistic_types in ecpayl_type %}
<?php if ($ecpayl_type['value'] == $ecpaylogistic_type) { ?>
<option value="{{ ecpayl_type['value'] }}" selected="selected{{ ecpayl_type['text'] }}</option>
{% else %}
<option value="{{ ecpayl_type['value'] }}{{ ecpayl_type['text'] }}</option>
{% endif %}
<?php } ?>
</select>
</div>
</div>
Text color description:
red Represents a modified code by comparing the differences.
blue Represents a Do not know how to modify or is not sure the code.
Would you understand what I mean?
If you can please advise!