Magento" Headers已经发送"升级后

时间:2016-08-07 23:03:44

标签: javascript magento templates header upgrade

我已经在网上搜索了好几天但却无法找到解决方案。我将Magento从1.5升级到1.9,一切正常。除了结账。在最后一步,它每次都被卡在"提交订单信息"。

系统日志说明以下内容(但错误发生前一分钟。在卡住位置我没有收到任何错误)

    2016-08-07T22:23:16+00:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0]    /var/www/html/app/code/core/Mage/Core/Controller/Response/Http.php:52
[1] /var/www/html/lib/Zend/Controller/Response/Abstract.php:768
[2] /var/www/html/app/code/core/Mage/Core/Controller/Response/Http.php:84
[3] /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php:184
[4] /var/www/html/app/code/core/Mage/Core/Model/App.php:365
[5] /var/www/html/app/Mage.php:684
[6] /var/www/html/index.php:83</pre>

结帐网站上的控制台:

    VK. Startup (background is ready)
prototype.js:5557 Uncaught TypeError: Cannot read property 'get' of undefined_createResponder @ prototype.js:5557observe @ prototype.js:5636(anonymous function) @ (index):896
prototype.js:5557 Uncaught TypeError: Cannot read property 'get' of undefined_createResponder @ prototype.js:5557observe @ prototype.js:5636(anonymous function) @ (index):1033
(index):1 Mixed Content: The page at 'https://www.owndomain.com/checkout/onepage/' was loaded over HTTPS, but requested an insecure script 'http://www.googleadservices.com/pagead/conversion.js'. This request has been blocked; the content must be served over HTTPS.
content.js:37 UA. Wait for background...

有人有额外的想法吗?我已使用formkey标签编辑了所有模板文件。

编辑:

找到的文件的代码:

  if (empty ($_POST)) {
        header("Location: " . $_SESSION['back_url']);
        $this->_redirect(str_replace(Mage::getBaseUrl(), '', $_SESSION['back_url']));

    }
    $formData = $this->getRequest()->getPost('super_attribute');
    $product_id = $this->getRequest()->getPost('pro_id');
    $options = $this->getRequest()->getPost('options');
    $params = $this->getRequest()->getParams();
    //mage::log($params);
    $url = $this->getRequest()->getPost('url');
    $qty = $this->getRequest()->getPost('qty');
    $type = $this->getRequest()->getPost('type');
    if (!isset($qty))
        $qty = 1;
    if (isset($product_id)) {
        try {
            $request = Mage::app()->getRequest();
            $product = Mage::getModel('catalog/product')->load($product_id);
            $session = Mage::getSingleton('core/session', array('name' => 'frontend'));
            $cart = Mage::helper('checkout/cart')->getCart();
            /*
            if (isset($formData)){
                $arr = array(
                    'qty' => $qty,
                    'super_attribute' => $formData,
                    'options'    => $options
                );
                $cart->addProduct($product, $arr);}
            else
                $cart->addProduct($product, $qty);
            */
            $cart->addProduct($product, $params);
            $session->setLastAddedProductId($product->getId());
            $session->setCartWasUpdated(true);
            $cart->save();
            $_cart = Mage::helper('checkout/cart')->getCart();
            $_cartcount = 0;
            $_cartsubtotal = 0;
            $items = $_cart->getItems();
            $_SESSION['back_url'] = $url;
            $result = $this->getLayout()->createBlock('checkout/cart_sidebar')->setTemplate('ajaxcart/cart/sidebar.phtml')
                ->addItemRender('simple', 'checkout/cart_item_renderer', 'checkout/cart/sidebar/default.phtml')
                ->addItemRender('configurable', 'checkout/cart_item_renderer_configurable', 'checkout/cart/sidebar/default.phtml')
                ->addItemRender('grouped', 'checkout/cart_item_renderer_grouped', 'checkout/cart/sidebar/default.phtml')
                ->toHtml();
            echo $result;

        } catch (Exception $e) {
            echo 1;
        }
    } else {
        echo 0;

最佳, IT0055

0 个答案:

没有答案