fecyo 手机版订单确认页面添加和修改收货地址报错

bug问题 · ssaw · 于 2年前 发布 · 966 次阅读

Unknown Property – yii\base\UnknownPropertyException Setting unknown property: fecyo\app\apphtml5\modules\Checkout\block\onepage\Addressedit::_address_id

  1. in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/BaseObject.phpat line 164

    public function __set($name, $value)
     {
         $setter = 'set' . $name;
         //var_dump($setter);die;
         if (method_exists($this, $setter)) {
             $this->$setter($value);
         } elseif (method_exists($this, 'get' . $name)) {
             throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
         } else {
             throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
         }
    }
    
  2. in /www/wwwroot/fecyo.openadc.top/addons/fecmall/fecyo/app/apphtml5/modules/Checkout/block/onepage/Addressedit.php at line 25– yii\base\BaseObject::__set('_address_id', '2')

    {
     protected $_address;
     
     public function initAddress()
     {
         //$address = Yii::$app->request->post('editForm');
         $this->_address_id = Yii::$app->request->get('address_id');
         if (!$this->_address_id) return;
         $addressModel = Yii::$service->customer->address->getByPrimaryKey($this->_address_id);
         $identity = Yii::$app->user->identity;
         $customer_id = $identity['id'];
         if ($addressModel['address_id']) {
             // 该id必须是当前用户的
    
  3. in /www/wwwroot/fecyo.openadc.top/addons/fecmall/fecyo/app/apphtml5/modules/Checkout/block/onepage/Addressedit.php at line 42– fecyo\app\apphtml5\modules\Checkout\block\onepage\Addressedit::initAddress()

    public function getLastData()
     {
         $this->initAddress();
         if (empty($this->_address)) {
             $this->_address = [];
         }
     
         return [
             'address' => $this->_address,
    
  4. in /www/wwwroot/fecyo.openadc.top/addons/fecmall/fecyo/app/apphtml5/modules/Checkout/controllers/OnepageController.php at line 113– fecyo\app\apphtml5\modules\Checkout\block\onepage\Addressedit::getLastData()

    }
             if ($this->getBlock()->save($address)) {
     
                 return Yii::$service->url->redirectByUrlKey('checkout/onepage/address');
             }
         }
         $data = $this->getBlock()->getLastData();
         return $this->render($this->action->id, $data);
     }
     
     // 地址删除
     public function actionAddressremove() 
     {
    
  5. fecyo\app\apphtml5\modules\Checkout\controllers\OnepageController::actionAddressedit()

  6. in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/InlineAction.php at line 57– call_user_func_array([fecyo\app\apphtml5\modules\Checkout\controllers\OnepageController, 'actionAddressedit'], [])

    $args = $this->controller->bindActionParams($this, $params);
         Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
         if (Yii::$app->requestedParams === null) {
             Yii::$app->requestedParams = $args;
         }
     
         return call_user_func_array([$this->controller, $this->actionMethod], $args);
     }
    }
    
  7. in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/Controller.php at line 181– yii\base\InlineAction::runWithParams(['address_id' => '2'])

    }
     
         $result = null;
     
         if ($runAction && $this->beforeAction($action)) {
             // run the action
             $result = $action->runWithParams($params);
     
             $result = $this->afterAction($action, $result);
     
             // call afterAction on modules
             foreach ($modules as $module) {
                 /* @var $module Module */
    
  8. in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/Module.php at line 534– yii\base\Controller::runAction('addressedit', ['address_id' => '2'])

    $parts = $this->createController($route);
         if (is_array($parts)) {
             /* @var $controller Controller */
             list($controller, $actionID) = $parts;
             $oldController = Yii::$app->controller;
             Yii::$app->controller = $controller;
             $result = $controller->runAction($actionID, $params);
             if ($oldController !== null) {
                 Yii::$app->controller = $oldController;
             }
     
             return $result;
         }
    
  9. in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/web/Application.php at line 104– yii\base\Module::runAction('checkout/onepage/addressedit', ['address_id' => '2'])

    $params = $this->catchAll;
             unset($params[0]);
         }
         try {
             Yii::debug("Route requested: '$route'", __METHOD__);
             $this->requestedRoute = $route;
             $result = $this->runAction($route, $params);
             if ($result instanceof Response) {
                 return $result;
             }
     
             $response = $this->getResponse();
             if ($result !== null) {
    
  10. in /www/wwwroot/fecyo.openadc.top/vendor/yiisoft/yii2/base/Application.php at line 392– yii\web\Application::handleRequest(fecshop\yii\web\Request)

    {
        try {
            $this->state = self::STATE_BEFORE_REQUEST;
            $this->trigger(self::EVENT_BEFORE_REQUEST);
     
            $this->state = self::STATE_HANDLING_REQUEST;
            $response = $this->handleRequest($this->getRequest());
     
            $this->state = self::STATE_AFTER_REQUEST;
            $this->trigger(self::EVENT_AFTER_REQUEST);
     
            $this->state = self::STATE_SENDING_RESPONSE;
            $response->send();
    
  11. in /www/wwwroot/fecyo.openadc.top/apphtml5/web/index.php at line 64– yii\base\Application::run()
    * 使用方法:Yii::$service->cms->article;
     * 上面的例子就是获取cms服务的子服务article。
     */
    new fecshop\services\Application($config);
    $application = new yii\web\Application($config);
    $application->run();
    
共收到 4 条回复
ssaw#22年前 0 个赞

@Fecmall #1楼 这种格式是否可以,这是fecyo 手机端订单确认页面选择其他地址,修改或编辑地址时报的错误,方便的时候麻烦帮忙看看哈 辛苦了

Fecmall#32年前 0 个赞

已处理,升级一下fecyo即可。

ssaw#42年前 0 个赞

@Fecmall #3楼 好的,非常感谢

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics