分页: 7/49 第一页 上页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 下页 最后页 [ 显示模式: 摘要 | 列表 ]
Jul
5

CGI Timeout的解决办法     2010

 21:54    2600    0   noel Ecshop/Ecmall/Smarty 不指定
CGI Timeout的解决办法
搭建好服务后访问时出现下面的问题:

CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process.


解决方案:更改ISS服务器的执行权限。

执行权限可以改为无或者纯脚本。
点击在新窗口中浏览此图片
Mar
27

PHP 飞信API接口     2010

 10:04    2858    0   noel 厦门资讯 老虎城 不指定
Mar
11

Ecmall 二次开发,最新测试     2010

 23:10    2763    0   noel Ecshop/Ecmall/Smarty 不指定
Ecmall 二次开发,最新测试。

http://www.shifenai.com
Mar
2

ecmall 增加市场价,登录可见     2010

 13:10    2936    0   noel Ecshop/Ecmall/Smarty 不指定
到数据库里面找到 ecm_goods这张表 然后添加字段market_price

在languages/sc-utf-8/common.lang.php  添加  语言 'market_price'     => '市 场 价','login_visitor' => '登录可见',

在根目录app/my_goods.app.php  
查找 function _get_post_data 大概1663行  
          在'tags'             => trim($_POST['tags']), 下面添加
          'market_price'     =>floatval($_POST['market_price']),
查找  $goods_info = array  大概在1638行  
           在 'price' => 1, 上面添加  
           'market_price' =>'',


完成以上步骤后, 调用的代码是{$lang.market_price}:  
                                                {$goods.market_price|price}  
商品详细页面那 市场价的展示,你们自己加上面的代码...
继续      在themes/mall/default/my_goods.form.html
大概 70行   找到
       price      : {
                number     : true
                        },
在这句话的上面添加
         market_price      : {
                 number     : true
                    },    //判断市场价只能为数字;
                                                                      
这个页面 100行左右(其实就在上面代码的下面一点点) 找到  
           price       : {
                                number     : '{$lang.number_only}'
                           },
在这句话的上面添加
          market_price       : {
                                 number     : '{$lang.number_only}'  //输出错误提示信息
                                 },                              
                                                                      
                                                                      
                                                                      
再这个页面 287行左右  找到

               <li>
                   <h2  ectype="no_spec">{$lang.price}: </h2>
在它的上面 添加  


<li>
            <h2  ectype="no_spec5">{$lang.market_price}: </h2>
            <div class="arrange"  ectype="no_spec5"><input name="market_price" value="{$goods.market_price}" type="text" class="text width_short" /></div>
</li>

=================
登录可见

<!--{if $visitor.user_id}--><span class="fontColor3" ectype="goods_price">{$goods._specs.0.price&#124;price}</span><!--{else}--><span><a href="{url index.php?app=member&act=login&ret_url=}">{$lang.login_visitor}</a></span><!--{/if}--><br />
Jan
21

ecmall 多系统商城     2010

 13:51    4001    0   noel Ecshop/Ecmall/Smarty 不指定
ecmall 二次开发
ecmall 多系统商城
ecmall 支付宝开发
ECSHOP 出现  XMlHttpRequest status:[500] Unknow status 这个错误啊?
Nov
24

ecshop关于邮件模板翻译的函数     2009

 11:41    1708    0   noel Ecshop/Ecmall/Smarty 不指定
ecshop关于邮件模板翻译的函数


{$user_name}您好!<br>
<br>
您已经进行了密码重置的操作,请点击以下链接(或者复制到您的浏览器):<br>
<br>
<a href="{$reset_email}" target="_blank">{$reset_email}</a><br>
<br>
以确认您的新密码重置操作!<br>
<br>
{$shop_name}<br>
{$send_date}


//以上代码 可以通过
$email_content = $smarty->fetch("str:$email_content");
//赋值得到变量里面的值
Nov
24

ecshop缓存函数     2009

 11:41    1851    0   noel Ecshop/Ecmall/Smarty 不指定
ecshop缓存函数

/**
* 读结果缓存文件
*
* @params  string  $cache_name
*
* @return  array   $data
*/
function read_static_cache($cache_name)
{
    if ((DEBUG_MODE & 2) == 2)
    {
        return false;
    }
    static $result = array();
    if (!empty($result[$cache_name]))
    {
        return $result[$cache_name];
    }
    $cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';
    if (file_exists($cache_file_path))
    {
        include_once($cache_file_path);
        $result[$cache_name] = $data;
        return $result[$cache_name];
    }
    else
    {
        return false;
    }
}
/**
* 写结果缓存文件
*
* @params  string  $cache_name
* @params  string  $caches
*
* @return
*/
function write_static_cache($cache_name, $caches)
{
    if ((DEBUG_MODE & 2) == 2)
    {
        return false;
    }
    $cache_file_path = ROOT_PATH . '/temp/static_caches/' . $cache_name . '.php';
    $content = "    $content .= "\$data = " . var_export($caches, true) . ";\r\n";
    $content .= "?>";
    file_put_contents($cache_file_path, $content, LOCK_EX);
}
Nov
24

把ECSHOP的升级提醒删除     2009

 11:40    1144    0   noel Ecshop/Ecmall/Smarty 不指定
把ECSHOP的升级提醒删除
删除ECSHOP版本更新提醒信息

打开

admin/index.php 删除如下

if (gmtime() - $_SESSION['last_check'] > (3600 * 12))
    {

        include_once(ROOT_PATH . 'includes/cls_transport.php');
        $ecs_version = VERSION;
        $ecs_lang = $_CFG['lang'];
        $ecs_release = RELEASE;
        $php_ver = PHP_VERSION;
        $mysql_ver = $db->version();
        $order['stats'] = $db->getRow('SELECT COUNT(*) AS oCount, IFNULL(SUM(order_amount), 0) AS oAmount' .
    ' FROM ' .$ecs->table('order_info'));
        $ocount = $order['stats']['oCount'];
        $oamount = $order['stats']['oAmount'];
        $goods['total']   = $db->GetOne('SELECT COUNT(*) FROM ' .$ecs->table('goods').
    ' WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1');
        $gcount = $goods['total'];
        $ecs_charset = strtoupper(EC_CHARSET);
        $ecs_user = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('users'));
        $ecs_template = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'template\'');
        $style = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'stylename\'');
        if($style == '')
        {
            $style = '0';
        }
        $ecs_style = $style;
        $shop_url = urlencode($ecs->url());

        $apiget = "ver= $ecs_version &lang= $ecs_lang &release= $ecs_release &php_ver= $php_ver &mysql_ver= $mysql_ver &ocount= $ocount &oamount= $oamount &gcount= $gcount &charset= $ecs_charset &usecount= $ecs_user &template= $ecs_template &style= $ecs_style &url= $shop_url ";

        $t = new transport;
        $api_comment = $t->request('http://api.ecshop.com/checkver.php', $apiget);
        $api_str = $api_comment["body"];
        echo $api_str;
    }
Nov
24

ecshop中调用smarty的foreach-iteration函数     2009

 11:40    1896    0   noel Ecshop/Ecmall/Smarty 不指定
ecshop中调用smarty的foreach-iteration函数
  ecshop中的模板技术确实不错,ecshop的smarty也写的很好,foreach标签是ecshop中smarty用的最多的一个标签了。而foreach中的iteration非常有用。

    iteration其实是foreach循环中的下标,而且从1开始.直接循环。所以在ecshop销售排行中,很多人用这个来区分销售的图标.他是foreach下name的键值.{foreach name=top_goods from=$top_goods item=goods}


   <meta http-equiv="Content-Type" content="text/html; charset=gbk">
<div class="mod2">
<h1><span class="left"></span><span class="right"></span>销售排行</h1>
<!-- {foreach name=top_goods from=$top_goods item=goods}-->
  <ul class="top10 clearfix">
<li><img src="../images/top_{$smarty.foreach.top_goods.iteration}.gif" class="iteration" />
<!-- {if $smarty.foreach.top_goods.iteration<2}-->

    <table width="185" border="0">
  <tr>
    <td><a href="{$goods.url}" target="_blank"><img src="{$goods.thumb}" alt="{$goods.name&#124;escape:html}" class="topimg" height="80px" width="80px" /></a></td>
    <td>售价:<font class="f1">{$goods.price}</font></td>
  </tr>
</table>



<!-- {/if} -->
       <{if $smarty.foreach.top_goods.iteration<4}class="iteration1"{/if}>
      <a href="{$goods.url}" title="{$goods.name&#124;escape:html}" target="_blank">{$goods.short_name}</a><br />

      </li>
   <div style="clear:both;"></div>
    </ul>
  <!-- {/foreach} -->
</div>
    这个是ecshop销售排行的模板,他通过巧妙使用foreach来实现了图标的对应
.><img src="../images/top_{$smarty.foreach.top_goods.iteration}.gif" class="iteration" />
分页: 7/49 第一页 上页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 下页 最后页 [ 显示模式: 摘要 | 列表 ]