<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>後台-OCMOD管理增加ID同時一頁顯示40筆</name>
<code>admin_OCMODM_anagement_increasedID</code>
<version>v1.0.1適用OPENCART2.3.x</version>
<link>http://blog.bkk.tw</link>
<author>suffixbig</author>
<!-- #目標-->
<file path="admin/view/template/extension/modification.tpl">
<operation>
<search><![CDATA[
<td class="text-left"><?php if ($sort == 'name') { ?>
]]></search>
<add position="before"><![CDATA[
<!--增加ID-->
<td class="text-left"><?php if ($sort == 'modification_id') { ?>
<a href="<?php echo $sort_modification_id; ?>" class="<?php echo strtolower($order); ?>">id</a>
<?php } else { ?>
<a href="<?php echo $sort_modification_id; ?>">id</a>
<?php } ?></td>
<!--增加ID-->
]]></add>
</operation>
<operation>
<search><![CDATA[
<td class="text-left"><?php echo $modification['name']; ?></td>
]]></search>
<add position="before"><![CDATA[
<td class="text-left"><?php echo $modification['modification_id']; ?></td>
]]></add>
</operation>
</file>
<file path="admin/controller/extension/modification.php">
<operation>
<search><![CDATA[
'name' => $result['name'],
]]></search>
<add position="before"><![CDATA[
'modification_id' => $result['modification_id'],
]]></add>
</operation>
<operation>
<search><![CDATA[
$sort = 'name';
]]></search>
<add position="replace"><![CDATA[
$sort = 'modification_id';
]]></add>
</operation>
<operation>
<search><![CDATA[
$data['sort_name'] = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . '&sort=name' . $url, true);
]]></search>
<add position="before"><![CDATA[
$data['sort_modification_id'] = $this->url->link('extension/modification', 'token=' . $this->session->data['token'] . '&sort=modification_id' . $url, true);
]]></add>
</operation>
<!--一頁40筆-->
<operation>
<search><![CDATA[
protected function getList() {
]]></search>
<add position="after"><![CDATA[
$this->config->set('config_limit_admin',40);
]]></add>
</operation>
</file>
<file path="admin/model/extension/modification.php">
<operation>
<search><![CDATA[
'name',
]]></search>
<add position="replace" ><![CDATA[
'modification_id',
'name',
]]></add>
</operation>
</file>
</modification>
OC+WP插件研究社 LINE討論群 http://line.me/R/ti/g/lzJUVUMW-0 網址要用LINE開
OC+WP插件研究社 LINE@帳號 https://line.me/R/ti/p/%40ijm8117i 這很少用
OC+WP插件研究社 其中之一 工程師的個人部落格 http://blog.bkk.tw/
OC+WP插件研究社 FB社團 https://www.facebook.com/groups/opencart.wordpress/