I have compared the difference between 2.3.0.2 and 3.0.2.0, The general difference, I can judge it.
The only thing I do not know is how the changes between * tpl and * twig are modified, Can someone tell me how to upgrade?
Thank you!
I got an error message:
I have tried to make changes, But I'm not sure how the code about the error message is modified.
Original file:
Original file:
In addition, The following code, how to modify?
Original file:
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!
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
Original file:
Change 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>
Based on fedex.tpl code, The error message is controlled by the following code:<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>
Original file:
Change file:<?php if ($error_key) { ?>
<div class="text-danger"><?php echo $error_key; ?></div>
<?php } ?>
In my code more than a "(!empty($error_mid))" sign, How should I modify this?{% if error_key %}
<div class="text-danger">{{ error_key }}</div>
{% endif %}
In addition, The following code, how to modify?
Original file:
Change 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>
Text color description:<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>
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!
The error you appear to be getting is regarding it not being able to find the .twig file.
As someone already mentioned, you need to modify your controller too. I give a rough overview of what needs to be changed in the controllers & views in the second part of my thread on How to successfully upgrade from OpenCart 2.3.02 to 3.0.2.0. I hope it helps.
As someone already mentioned, you need to modify your controller too. I give a rough overview of what needs to be changed in the controllers & views in the second part of my thread on How to successfully upgrade from OpenCart 2.3.02 to 3.0.2.0. I hope it helps.
Who is online
Users browsing this forum: nonnedelectari and 232 guests