宝塔面板定时清空Whos Online表

新建脚本nano /root/truncate_whos_online.sh给脚本执行权限chmod +x /root/truncate_whos_online.sh手动测试一次bash /root/truncate_whos_online.sh查看日志:cat /www/wwwlogs/truncate_whos_online.log 宝塔里设置定时任务计划任务 → 添加任务 → Shell脚本

- 阅读全文 -

把Marcus的短代码写进Ez Page

1、/includes/languages/english/html_includes/marcus/define_xxx.php2、编辑,参考附件ez pages bak.txt3、设置文件权限555,防止客户在后台乱改

- 阅读全文 -

Zencart提交订单出现WARNING: An Error occurred

使用二开的PPOffline等支付接口时,提交订单出现WARNING: An Error occurred。环境Debian10+Mysql5.7,原因是MySQL 5.7 很常见的严格模式。在MySQL的cnf里找到sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES把STRICT_TRANS_TABLES删除,然后重启MySql和PHP即可

- 阅读全文 -

后台管理员列表页功能增强

一、隐藏ID=1的超级用户1、adminpath/user.php2、在103行左右,找到$userList = zen_get_users();3、在下边加一行$userList = array_values(array_filter($userList, function($u) {return (int)$u['id'] !== 1;}));二、设置只有ID=1的Supe

- 阅读全文 -

Marcus商品详情页的radio美化

1、覆盖原版的/includes/modules/marcus/attributes.php文件2、将/includes/templates/marcus/templates/tpl_modules_attributes.php里的46行的<ul class="options-swatch options-swatch--color options-swatch--lg"

- 阅读全文 -

Zencart 1.56c增加邮件订阅功能

第一步:创建订阅表单在 ZenCart 模板文件(如 includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php 或合适的位置)插入以下 HTML 代码:<form id="subscribe-form">... 第二步:创建 subscribe_handler.php 处理订阅请求在 ZenCart 网站根目

- 阅读全文 -

Marcus模板首页短代码展示多行产品

1、网站后台“最大值/Maximum Values”里设置这三个参数为60或者其他数字新进产品 / New Products Module推荐商品 - 首页 / Maximum Display of Featured Products - Main Page特价商品 - 首页 / Maximum Display of Specials Products - Main Page2、在短代码[prod

- 阅读全文 -

Zencart156c使用nginx的伪静态规则

rewrite "^(.)-p-(.).html" /index.php?main_page=product_info&products_id=$2&% last;rewrite "^(.)-c-(.)" /index.php?main_page=index&cPath=$2&% last;rewrite "^(.*)-m-([0-9]+).html" /index.php?main_page=i

- 阅读全文 -

Marcus模板增加可选字体

修改/admin/includes/functions/extra_functions/pzen_marcus_template.php文件中的function pzen_marcus_generate_fontfamily_pull_down直接把https://www.google.com/webfonts里的名称复制粘贴追加到最后即可

- 阅读全文 -

Zencart系统开启缓存技术

可以选择以下缓存系统:Memcached:内存缓存系统,访问速度最快。Redis:内存缓存系统,功能强大。APCu:PHP内置缓存系统,易于使用。然后修改/includes/configure.php文件define('CACHE_ENABLED', true);define('CACHE_TYPE', 'memcached');define('MEMCACHED_HOST', 'localhos

- 阅读全文 -

Zencart的Marcus模板增加自定义联系方式字段

自带的联系方式太少了,于是又自己增加了一些。Step 1:数据库加字段INSERT INTO pzen_marcus_template (opt_id, lang_id, opt_name, opt_value) VALUES (994, 0, 'store_amazon', '0'); Step 2:修改后台的模板文件/admin/pzen_marcus_

- 阅读全文 -

Zencart常用伪静态url

新闻列表 /news_archive关于我们 /about_us运输和回款 /shippinginfo使用说明 /conditions隐私条款 /privacy新进商品 /products_new精选商品 /featured_products特价商品 /specials联系我们 /contact_usFAQ(非系统自带) /faq我们的优势(非系统自带) /why_us付款方式(非系统自带) /p

- 阅读全文 -

Zencart增加自定义页面

没办法,ZC的EZ Pages功能没法自定义伪静态地址,只好自己上,以新建一个test_page为例:1、在/includes/modules/pages/下新建test_page目录,目录下创建一个header_php.php文件,内容参考其他页面2、在/includes/filenames.php里新增加常量定义FILENAME_TEST_PAGEdefine('FILENAME_D

- 阅读全文 -