php - Magento - 购物车未显示且结帐/购物车页面为空(不显示 .cart div)

标签 php magento shopping-cart

好吧,我是 Magento 的新手,并且一直在进行大量更改以使其按照客户想要的方式工作。

显然在安装时和早期,购物车运行良好。我用 CSS 将它移动到右上角一段时间,然后我认为我显示了:没有它,因为我只是想在继续设计它之前先关注其他事情一段时间。现在我已经完成了所有其他事情并想要处理购物车。问题是 - 它无处可寻,而且我以为我用来关闭它的 display:none 也同样丢失了。也许我从来没有这样做过?

我在 CSS 中找不到任何会关闭购物车的内容 - 我找不到 display:none 或任何父项。该网站的大部分内容都使用带有左侧边栏布局的 2 列,我知道购物车默认位于右侧。但是当我返回右侧边栏时 - 没有购物车。此外,当我将产品添加到购物车时,我会按预期重定向到 mydomain.com/checkout/cart,但页面上没有任何内容。我的样式、菜单等都存在,但全页详细购物车所在的 .col-main 元素是空的。这让我再次思考问题不在于 CSS。

就好像该网站只是不要求购物车(我假设是 cart.phtml?)。我完全有可能在搞乱其他事情的同时搞砸了一些事情(在顶部添加一个 CMS 页面菜单,与调整图像大小、将类别菜单移动到左侧边栏有很大关系)。我的 php 不够好,无法找到罪魁祸首,我什至不确定应该查看哪个文件 - checkout.phtml?

我意识到这个问题几乎没有什么有值(value)的信息,但是有人知道我应该在哪里寻找吗?如果我知道要查看哪个文件,我可以发布相关代码。该网站是 cart.oldfloridian.com。如果您想尝试添加产品,目前只有一个,位于“ak starfish --> starfish Women's”

编辑:因此/checkout/cart 页面是 3 列布局。这是 3columns.phtml 代码:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
<head>
<?php echo $this->getChildHtml('head') ?>
</head>
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>>
<div id="cms-menu">
    <?php $collection = Mage::getModel('cms/page')->getCollection()->addStoreFilter(Mage::app()->getStore()->getId());?>
    <?php  $collection->getSelect()
          ->where('is_active = 1'); ?>
    <ul>
    <?php foreach ($collection as $page): ?>
      <?php $PageData = $page->getData(); ?>
      <?php if($PageData['identifier']!='no-route') { ?>
      <li>
        <a href="/<?php echo $PageData['identifier']?>"><?php echo $PageData['title'] ?></a>
      </li>
      <?php } ?>
    <?php endforeach; ?>
    </ul>
</div>
<?php echo $this->getChildHtml('after_body_start') ?>
<div class="wrapper">
    <?php echo $this->getChildHtml('global_notices') ?>
    <div class="page">
        <?php echo $this->getChildHtml('header') ?>
        <div class="main-container col3-layout">
            <div class="main">
                <?php echo $this->getChildHtml('breadcrumbs') ?>
                <div class="col-wrapper">
                    <div class="col-main">
                        <?php echo $this->getChildHtml('global_messages') ?>
                        <?php echo $this->getChildHtml('content') ?>
                    </div>
                    <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
                </div>
                <div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
            </div>
        </div>
        <?php echo $this->getChildHtml('footer') ?>
        <?php echo $this->getChildHtml('before_body_end') ?>
    </div>
</div>
<?php echo $this->getAbsoluteFooter() ?>
</body>
</html>

最佳答案

某处似乎确实存在一个错误 - 我们遇到了类似的问题,团队中的两个开发人员看不到购物车,而 1 个可以 - 但这不仅仅是购物车,而是整个客户部分(登录、购物车、我的帐户等)。

我们尝试启用模板路径提示,但页面主要部分中唯一的内容是“frontend/default/default/template/catalog/msrp/popup.phtml”。我们重新安装了大部分 magento - 不走运

我们几乎尝试了所有方法,解决这个问题的方法是将所有主题文件复制到一个新主题中并重新命名。我唯一能想到的是主题名称中的连字符

关于php - Magento - 购物车未显示且结帐/购物车页面为空(不显示 .cart div),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12754096/

相关文章:

php - 更新图像的问题

c# - 使用 PayPal REST API ASP.NET MVC 一次支付多个项目

c# - 如何让我的变量从 dropdownlist asp.net 携带到总计并在 c# 中打印出来?

php - 非注册用户的购物车

php - HTTP 请求失败! HTTP/1.1 503 服务暂时不可用

Windows 上的 PHP proc_open 问题

PHP - 在数组中搜索,如果有肯定结果,则将属性添加到原始数组

php - "Notice: Undefined variable"、 "Notice: Undefined index"、 "Warning: Undefined array key"和 "Notice: Undefined offset"使用 PHP

magento - 在 Magento 订单状态更改事件上触发观察者

mysql - Magento 分号中断查询