致命错误:在第745行的/home/thetiresquire/public_html/app/code/core/Mage/Sales/Model/Quote.php中调用boolean上的成员函数setQuote()

时间:2018-01-27 11:33:52

标签: function call member

请帮我解决主页上的错误。

(function() {

  var bng_app = angular.module('myApp', []);

  bng_app.controller("myCtrl", function($scope) {

    $scope.wrap_up_errors = [{
      Name: "Alfreds Futterkiste",
      City: "Berlin",
      Country: "Germany"
    }];

    $scope.wrapUpError = function(a) {
      $scope.wrap_up_errors = a;
      $scope.$apply()
      console.log($scope.wrap_up_errors)
    }

  });
})();

function myFunc() {
  angular.element($('#home')).scope().wrapUpError([{
    Name: "1",
    City: "2",
    Country: "3"
  }]);
}

这是它所指向的代码

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<body id="home" data-ng-app="myApp" data-ng-controller="myCtrl">

  <div class="exist-file-alert" id="exist-file-alert-id">
    <table>
      <tbody>
        <tr data-ng-repeat="x in wrap_up_errors">
          <td>{{ x.Name }}</td>
          <td>{{ x.Country }}</td>
        </tr>
      </tbody>
    </table>
  </div>

<button onclick="myFunc()">Click</button>

</body>

错误指向第MY CART : 0 item(s) - Fatal error: Call to a member function setQuote() on boolean in /home/thetiresquire/public_html/app/code/core/Mage/Sales/Model/Quote.php on line 745 行 我已清除缓存并从 public function getItemsCollection($useCache = true) { if ($this->hasItemsCollection()) { return $this->getData('items_collection'); } if (is_null($this->_items)) { $this->_items = Mage::getModel('sales/quote_item')->getCollection(); $this->_items->setQuote($this); } return $this->_items; }

刷新缓存

请帮助magento新手。

谢谢, 谢花

0 个答案:

没有答案