【11】includes\cls_template.php文件中: 注释掉: if (file_put_contents($hash_dir . '/' . $cachename . '.php', '<?php exit;?>' . $data . $out, LOCK_EX) === false) { trigger_error('can\'t write:' . $hash_dir . '/' . $cachename . '.php'); } 【12】includes\cls_mysql.php文件中: var $max_cache_time的值改为0。如下: var $max_cache_time = 0; // 最大的缓存时间,以秒为单位 【13】data\order_print.html文件中: <table width="100%" border="1" style="border-collapse:collapse;border-color:#000;"> <tr align="center"> <td bgcolor="#cccccc">{$lang.goods_name} <!-- 商品名称 --></td> <td bgcolor="#cccccc">{$lang.goods_sn} <!-- 商品货号 --></td> <td bgcolor="#cccccc">{$lang.goods_attr} <!-- 商品属性 --></td> <td bgcolor="#cccccc">{$lang.goods_price} <!-- 商品单价 --></td> <td bgcolor="#cccccc">{$lang.goods_number}<!-- 商品数量 --></td> <td bgcolor="#cccccc">{$lang.subtotal} <!-- 价格小计 --></td> </tr> <!-- {foreach from=$goods_list item=goods key=key} --> <tr> <td> {$goods.goods_name}<!-- 商品名称 --> {if $goods.is_gift}{if $goods.goods_price gt 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if} {if $goods.parent_id gt 0}{$lang.remark_fittings}{/if} </td> <td> {$goods.goods_sn} <!-- 商品货号 --></td> <td><!-- 商品属性 --> <!-- {foreach key=key from=$goods_attr[$key] item=attr} --> <!-- {if $attr.name} --> {$attr.name}:{$attr.value} <!-- {/if} --> <!-- {/foreach} --> </td> <td align="right">{$goods.formated_goods_price} <!-- 商品单价 --></td> <td align="right">{$goods.goods_number} <!-- 商品数量 --></td> <td align="right">{$goods.formated_subtotal} <!-- 商品金额小计 --></td> </tr> <!-- {/foreach} --> <tr> <!-- 发票抬头和发票内容 --> <td colspan="4"> {if $order.inv_payee} {$lang.label_inv_payee}{$order.inv_payee} {$lang.label_inv_content}{$order.inv_content} {/if} </td> <!-- 商品总金额 --> <td colspan="2" align="right">{$lang.label_goods_amount}{$order.formated_goods_amount}</td> </tr> </table> 改为: <table width="100%" border="1" style="border-collapse:collapse;border-color:#000;"> <tr align="center"> <td bgcolor="#cccccc">{$lang.goods_name} <!-- 商品名称 --></td> <td bgcolor="#cccccc">{$lang.goods_sn} <!-- 商品货号 --></td> <td bgcolor="#cccccc">{$lang.goods_attr} <!-- 商品属性 --></td> <td bgcolor="#cccccc">{$lang.my_goods_comment} <!-- 个人批注 --></td> <td bgcolor="#cccccc">{$lang.goods_price} <!-- 商品单价 --></td> <td bgcolor="#cccccc">{$lang.goods_number}<!-- 商品数量 --></td> <td bgcolor="#cccccc">{$lang.subtotal} <!-- 价格小计 --></td> </tr> <!-- {foreach from=$goods_list item=goods key=key} --> <tr> <td> {$goods.goods_name}<!-- 商品名称 --> {if $goods.is_gift}{if $goods.goods_price gt 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if} {if $goods.parent_id gt 0}{$lang.remark_fittings}{/if} </td> <td> {$goods.goods_sn} <!-- 商品货号 --></td> <td><!-- 商品属性 --> <!-- {foreach key=key from=$goods_attr[$key] item=attr} --> <!-- {if $attr.name} --> {$attr.name}:{$attr.value} <!-- {/if} --> <!-- {/foreach} --> </td> <td align="right">{$goods.goods_comment} <!-- 个人批注 --></td> <td align="right">{$goods.formated_goods_price} <!-- 商品单价 --></td> <td align="right">{$goods.goods_number} <!-- 商品数量 --></td> <td align="right">{$goods.formated_subtotal} <!-- 商品金额小计 --></td> </tr> <!-- {/foreach} --> <tr> <!-- 发票抬头和发票内容 --> <td colspan="4"> {if $order.inv_payee} {$lang.label_inv_payee}{$order.inv_payee} {$lang.label_inv_content}{$order.inv_content} {/if} </td> <!-- 商品总金额 --> <td colspan="2" align="right">{$lang.label_goods_amount}{$order.formated_goods_amount}</td> </tr> </table> 【14】admin\templates\order_info.htm文件中: <table width="100%" cellpadding="3" cellspacing="1"> <tr> <th colspan="8" scope="col">{$lang.goods_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=goods" class="special">{$lang.edit}</a></th> </tr> <tr> <td scope="col"><div align="center"><strong>{$lang.goods_name_brand}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_sn}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.product_sn}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_price}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_number}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_attr}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.storage}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.subtotal}</strong></div></td> </tr> {foreach from=$goods_list item=goods} <tr> <td> {if $goods.goods_id gt 0 && $goods.extension_code neq 'package_buy'} <a href="../goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name} {if $goods.brand_name}[ {$goods.brand_name} ]{/if} {if $goods.is_gift}{if $goods.goods_price > 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if} {if $goods.parent_id > 0}{$lang.remark_fittings}{/if}</a> {elseif $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'} <a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})">{$goods.goods_name}<span style="color:#FF0000;">{$lang.remark_package}</span></a> <div id="suit_{$goods.goods_id}" style="display:none"> {foreach from=$goods.package_goods_list item=package_goods_list} <a href="../goods.php?id={$package_goods_list.goods_id}" target="_blank">{$package_goods_list.goods_name}</a><br /> {/foreach} </div> {/if} </td> <td>{$goods.goods_sn}</td> <td>{$goods.product_sn}</td> <td><div align="right">{$goods.formated_goods_price}</div></td> <td><div align="right">{$goods.goods_number} </div></td> <td>{$goods.goods_attr|nl2br}</td> <td><div align="right">{$goods.storage}</div></td> <td><div align="right">{$goods.formated_subtotal}</div></td> </tr> {/foreach} <tr> <td></td> <td> </td> <td> </td> <td>{if $order.total_weight}<div align="right"><strong>{$lang.label_total_weight} </strong></div>{/if}</td> <td>{if $order.total_weight}<div align="right">{$order.total_weight} </div>{/if}</td> <td> </td> <td><div align="right"><strong>{$lang.label_total}</strong></div></td> <td><div align="right">{$order.formated_goods_amount}</div></td> </tr> </table> 改为: <table width="100%" cellpadding="3" cellspacing="1"> <tr> <th colspan="9" scope="col">{$lang.goods_info}<a href="order.php?act=edit&order_id={$order.order_id}&step=goods" class="special">{$lang.edit}</a></th> </tr> <tr> <td scope="col"><div align="center"><strong>{$lang.goods_name_brand}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_sn}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.product_sn}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_price}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_number}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_attr}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.my_goods_comment}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.storage}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.subtotal}</strong></div></td> </tr> {foreach from=$goods_list item=goods} <tr> <td> {if $goods.goods_id gt 0 && $goods.extension_code neq 'package_buy'} <a href="../goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name} {if $goods.brand_name}[ {$goods.brand_name} ]{/if} {if $goods.is_gift}{if $goods.goods_price > 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if} {if $goods.parent_id > 0}{$lang.remark_fittings}{/if}</a> {elseif $goods.goods_id gt 0 && $goods.extension_code eq 'package_buy'} <a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})">{$goods.goods_name}<span style="color:#FF0000;">{$lang.remark_package}</span></a> <div id="suit_{$goods.goods_id}" style="display:none">// www.ldhost.cn {foreach from=$goods.package_goods_list item=package_goods_list} <a href="../goods.php?id={$package_goods_list.goods_id}" target="_blank">{$package_goods_list.goods_name}</a><br /> {/foreach} </div> {/if} </td> <td>{$goods.goods_sn}</td> <td>{$goods.product_sn}</td> <td><div align="right">{$goods.formated_goods_price}</div></td> <td><div align="right">{$goods.goods_number} </div></td> <td>{$goods.goods_attr|nl2br}</td> <td><div align="right">{$goods.goods_comment}</div></td> <td><div align="right">{$goods.storage}</div></td> <td><div align="right">{$goods.formated_subtotal}</div></td> </tr> {/foreach} <tr> <td></td> <td> </td> <td> </td> <td>{if $order.total_weight}<div align="right"><strong>{$lang.label_total_weight} </strong></div>{/if}</td> <td>{if $order.total_weight}<div align="right">{$order.total_weight} </div>{/if}</td> <td> </td> <td><div align="right"><strong>{$lang.label_total}</strong></div></td> <td><div align="right">{$order.formated_goods_amount}</div></td> </tr> </table> 【15】order_goods_info.htm文件改为: <table width="100%" cellpadding="3" cellspacing="1"> <tr> <td scope="col"><div align="center"><strong>{$lang.goods_name_brand}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_sn}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_price}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_number}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.goods_attr}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.my_goods_comment}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.storage}</strong></div></td> <td scope="col"><div align="center"><strong>{$lang.subtotal}</strong></div></td> </tr> {foreach from=$goods_list item=goods} <tr> {if $goods.goods_id gt 0 && $goods.extension_code neq 'package_buy'} <td><img src="{$goods.goods_thumb}" /><br /><a href="../goods.php?id={$goods.goods_id}" target="_blank">{$goods.goods_name} {if $goods.brand_name}[ {$goods.brand_name} ]{/if} {if $goods.is_gift}{if $goods.goods_price > 0}{$lang.remark_favourable}{else}{$lang.remark_gift}{/if}{/if} {if $goods.parent_id > 0}{$lang.remark_fittings}{/if}</a></td> {else} <td>{$goods.goods_name}{$lang.remark_package}</td> {/if} <td>{$goods.goods_sn}</td> <td><div align="right">{$goods.formated_goods_price}</div></td> <td><div align="right">{$goods.goods_number} </div></td> <td>{$goods.goods_attr|nl2br}</td> <td><div align="right">{$goods.goods_comment}</div></td> <td><div align="right">{$goods.storage}</div></td> <td><div align="right">{$goods.formated_subtotal}</div></td> </tr> {/foreach} </table> 【16】admin\order.php文件中: $sql = "SELECT o.*, IF(o.product_id > 0, p.product_number, g.goods_number) AS storage, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, '') AS brand_name, p.product_sn FROM " . $ecs->table('order_goods') . " AS o LEFT JOIN " . $ecs->table('products') . " AS p ON p.product_id = o.product_id LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id WHERE o.order_id = '$order[order_id]'"; 改为: $sql = "SELECT o.*, IF(o.product_id > 0, p.product_number, g.goods_number) AS storage, o.goods_attr, g.suppliers_id, IFNULL(b.brand_name, '') AS brand_name, p.product_sn , oc.goods_comment FROM " . $ecs->table('order_goods') . " AS o LEFT JOIN " . $ecs->table('products') . " AS p ON p.product_id = o.product_id LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " . "LEFT JOIN order_comment as oc ON oc.goods_id = o.goods_id AND oc.order_id = '" . $order[order_id] . "' ". "WHERE o.order_id = '$order[order_id]'"; 把: $sql = "SELECT o.*, g.goods_thumb, g.goods_number AS storage, o.goods_attr, IFNULL(b.brand_name, '') AS brand_name " . "FROM " . $ecs->table('order_goods') . " AS o ". "LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id " . "LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " . "WHERE o.order_id = '{$order_id}' "; 改为: $sql = "SELECT o.*, g.goods_thumb, g.goods_number AS storage, o.goods_attr, IFNULL(b.brand_name, '') AS brand_name, oc.goods_comment " . "FROM " . $ecs->table('order_goods') . " AS o ". "LEFT JOIN " . $ecs->table('goods') . " AS g ON o.goods_id = g.goods_id " . "LEFT JOIN " . $ecs->table('brand') . " AS b ON g.brand_id = b.brand_id " . "LEFT JOIN order_comment as oc ON oc.goods_id = o.goods_id AND oc.order_id = '" . $order_id . "' ". "WHERE o.order_id = '$order_id' "; 【17】user.php文件中: if ($rt > 0) { update_user_info(); recalculate_price(); $ucdata = isset($user->ucdata)? $user->ucdata : ''; show_message($_LANG['login_success'] . $ucdata , array($_LANG['back_up_page'], $_LANG['profile_lnk']), array($back_act,'user.php'), 'info'); } 改为: if ($rt > 0) { //Delete the goods_comment when the user login $sql = "DELETE FROM goods_comment WHERE user_id = '". $_SESSION["user_id"] ."'"; $GLOBALS['db']->query($sql); update_user_info(); recalculate_price(); $ucdata = isset($user->ucdata)? $user->ucdata : ''; show_message($_LANG['login_success'] . $ucdata , array($_LANG['back_up_page'], $_LANG['profile_lnk']), array($back_act,'user.php'), 'info'); } (责任编辑:好模板) |