分享个自己写的自动完成限制增加到20个的插件
- <?xml version="1.0" encoding="utf-8"?>
- <modification>
- <name>Auto Complete Limit Enlarge</name>
- <version>1.0.1</version>
- <code>auto_complete_limit_enlarge</code>
- <author>Brain Yang</author>
- <link>https://d1p.net</link>
- <file path="admin/controller/catalog/attribute.php,admin/controller/catalog/category.php,admin/controller/catalog/download.php,admin/controller/catalog/filter.php,admin/controller/catalog/manufacturer.php,admin/controller/catalog/option.php">
- <operation error="skip">
- <search index="0"><![CDATA['limit' => 5]]></search>
- <add position="replace"><![CDATA['limit' => 20]]></add>
- </operation>
- </file>
- <file path="admin/controller/catalog/product.php">
- <operation error="skip">
- <search index="0"><![CDATA[$limit = 5;]]></search>
- <add position="replace"><![CDATA[$limit = 20;]]></add>
- </operation>
- </file>
- <file path="admin/controller/module/bestseller.php,admin/controller/module/featured.php,admin/controller/module/latest.php,admin/controller/module/special.php">
- <operation error="skip">
- <search index="0"><![CDATA[$data['limit'] = 5;]]></search>
- <add position="replace"><![CDATA[$data['limit'] = 20;]]></add>
- </operation>
- </file>
- </modification>
复制代码
拷贝以上代码,用记事本编辑后,保存为 "文件名.ocmod.xml" 格式,即可在opencart2.0后台安装. |