fecshoper

第 28 位会员

会员
个人信息
  • 加入于 2017-06-03 10:20:44
  • 最后登录时间 3个月前
个人成就
  • 发表文章次数 40
  • 发布回复次数 45
  • 个人主页浏览次数 11
1年前

@Terry #14楼 有图片配置

1年前

@Terry #10楼 我补充一下,刚刚有点忙

1年前

@Terry #1楼 就是改的这个大哥,去掉sandbox了,图片就是那里的配置

1年前

@Terry [#4楼](#comment4) checkout/onepage, 只在common中配置了,我没有改什么,默认的

1年前

@terry 大神帮帮忙,最后一个问题 ![](https://i.loli.net/2017/11/06/5a002cabeda14.png)

fecshop 怎么部署到线上啊? lnmp环境1年前
server {
    listen       80;
    #server_name ;
    index        index.html index.htm index.php;
    root         /var;
    error_log    /var/log/nginx/var.error.log;
    access_log   /var/log/nginx/var.access.log;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php$ {
        try_files      $uri = 404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   unix:/run/php/php7.0-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}

$this->_product->collCount()1年前

@Terry #4楼 laravel用多了

$this->_product->collCount()1年前

@Terry #1楼 $category_id就是数组

@terry,我重新支付订单,不让他进入购物车好改么1年前

@Terry #1楼 就是在买家后台Reorder的时候,不要进入购物车,直接重订单拿产品信息,付款

麻烦帮我看下,总是有些产品缩略图有问题,1年前

@Terry #19楼 我改了下这个方法

    protected function getProductNewPath($imageVal, $imgResize, $waterImgPath)
    {
        if (!$this->_md5WaterImgPath) {
            if (!$waterImgPath) {
                $waterImgPath = 'defaultWaterPath';
            }
            //echo $waterImgPath;exit;
            $this->_md5WaterImgPath = md5($waterImgPath);
        }

        $baseDir = '/cache/'.$this->_md5WaterImgPath;
        if (is_array($imgResize)) {
            list($width, $height) = $imgResize;
        } else {
            $width = $imgResize;
            $height = '0';
        }
        $imageArr = explode('/', $imageVal);
        unset($imageArr[0]);
        $dirArr = ['cache', $this->_md5WaterImgPath, $width, $height];
        foreach ($imageArr as $igf) {
            if (!strstr($igf, '.')) {
                $dirArr[] = $igf;
            }
        }
        \fec\helpers\CDir::createFloder($this->getBaseDir(), $dirArr);
        $newPath = $this->getBaseDir().$baseDir .'/'.$width.'/'.$height.$imageVal;
        $newUrl = $this->getBaseUrl().$baseDir .'/'.$width.'/'.$height.$imageVal;
        return [$newPath, $newUrl];
    }
麻烦帮我看下,总是有些产品缩略图有问题,1年前

@Terry [#17楼](#comment17) 问题已找到

array(5) {
  [0]=>
  string(5) "cache"
  [1]=>
  string(32) "bd935443df1c50537d4edaab4af5d446"
  [2]=>
  int(500)
  [3]=>
  string(1) "0"
  [4]=>
  string(2) "z4"
}
string(35) "/0/z4/0z4ff9jah03x32p1506442965.jpg"
string(103) "/www/yii2_fecshop/appimage/common/media/catalog/product/cache/bd935443df1c50537d4edaab4af5d446/500/0/z4"

拼的路径不同

搜索突然报错了,之前是好的1年前

@Terry #6楼 主要不知道后面为什么是这个路径

搜索突然报错了,之前是好的1年前

@Terry [[#4楼](#comment4)](#comment4) 好,但是搜索遇到另外的问题,如图


An Error occurred while handling another error:
exception 'ReflectionException' with message 'Method fecshop\services\product\Image::getResize() does not exist' in /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php:195
Stack trace:
#0 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php(195): ReflectionMethod->__construct('fecshop\\service...', 'getResize')
#1 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/views/errorHandler/callStackItem.php(26): yii\web\ErrorHandler->addTypeLinks('fecshop\\service...')
#2 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/View.php(330): require('/alidata/www/yi...')
#3 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/alidata/www/yi...', Array)
#4 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php(249): yii\base\View->renderFile('@yii/views/erro...', Array, Object(yii\web\ErrorHandler))
#5 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php(304): yii\web\ErrorHandler->renderFile('@yii/views/erro...', Array)
#6 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php(326): yii\web\ErrorHandler->renderCallStackItem('/alidata/www/yi...', 73, 'fecshop\\service...', 'getResize', Array, 11)
#7 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/views/errorHandler/exception.php(381): yii\web\ErrorHandler->renderCallStack(Object(Imagine\Exception\RuntimeException))
#8 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/View.php(330): require('/alidata/www/yi...')
#9 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/alidata/www/yi...', Array)
#10 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php(249): yii\base\View->renderFile('@yii/views/erro...', Array, Object(yii\web\ErrorHandler))
#11 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/ErrorHandler.php(116): yii\web\ErrorHandler->renderFile('@yii/views/erro...', Array)
#12 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(Imagine\Exception\RuntimeException))
#13 [internal function]: yii\base\ErrorHandler->handleException(Object(Imagine\Exception\RuntimeException))
#14 {main}
Previous exception:
exception 'ErrorException' with message 'imagejpeg(/alidata/www/yii2_fecshop/appimage/common/media/catalog/product/cache/bd935443df1c50537d4edaab4af5d446/230/230http://img.51openheart.cn/media/catalog/product/default.jpg): failed to open stream: No such file or directory' in /alidata/www/yii2_fecshop/vendor/imagine/imagine/lib/Imagine/Gd/Image.php:584
Stack trace:
#0 [internal function]: Imagine\Gd\Image->Imagine\Gd\{closure}('<span class="nu...', '<span class="st...', '<span class="st...', '<span class="nu...', '...')
#1 [internal function]: imagejpeg('<span class="ke...', '<span class="st...')
#2 /alidata/www/yii2_fecshop/vendor/imagine/imagine/lib/Imagine/Gd/Image.php(584): call_user_func_array('<span class="st...', '[<span class="n...')
#3 /alidata/www/yii2_fecshop/vendor/imagine/imagine/lib/Imagine/Gd/Image.php(210): Imagine\Gd\Image->saveOrOutput('<span class="st...', '[]', '<span class="st...')
#4 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fec/helpers/CImage.php(140): Imagine\Gd\Image->save('<span class="st...')
#5 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/product/Image.php(129): fec\helpers\CImage::saveResizeMiddleWaterImg('<span class="st...', '<span class="st...', '[<span class="n...', '<span class="st...')
#6 [internal function]: fecshop\services\product\Image->actionGetResize('<span class="st...', '[<span class="n...', '<span class="ke...')
#7 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/services/Service.php(48): call_user_func_array('[<span class="t...', '[<span class="s...')
#8 /alidata/www/yii2_fecshop/appfront/theme/terry/theme01/catalogsearch/index/index.php(73): fecshop\services\Service->__call('<span class="st...', '[<span class="s...')
#9 /alidata/www/yii2_fecshop/appfront/theme/terry/theme01/catalogsearch/index/index.php(73): fecshop\services\product\Image->getResize('http://img.51op...', Array, false)
#10 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/View.php(330): require('/alidata/www/yi...')
#11 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/View.php(250): yii\base\View->renderPhpFile('/alidata/www/yi...', Array)
#12 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/app/appfront/modules/AppfrontController.php(95): yii\base\View->renderFile('/alidata/www/yi...', Array, Object(fecshop\app\appfront\modules\Catalogsearch\controllers\IndexController))
#13 /alidata/www/yii2_fecshop/vendor/fancyecommerce/fecshop/app/appfront/modules/Catalogsearch/controllers/IndexController.php(30): fecshop\app\appfront\modules\AppfrontController->render('index', Array)
#14 [internal function]: fecshop\app\appfront\modules\Catalogsearch\controllers\IndexController->actionIndex()
#15 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#16 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array)
#17 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/Module.php(523): yii\base\Controller->runAction('', Array)
#18 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/web/Application.php(102): yii\base\Module->runAction('catalogsearch/i...', Array)
#19 /alidata/www/yii2_fecshop/vendor/yiisoft/yii2/base/Application.php(380): yii\web\Application->handleRequest(Object(fecshop\yii\web\Request))
#20 /alidata/www/yii2_fecshop/appfront/web/index.php(85): yii\base\Application->run()
#21 {main}

搜索突然报错了,之前是好的1年前

@Terry [#2楼](#comment2) 只有 english,报错不可怕,主要是不好定位错误

Your Site Analytics