OpenCart:下拉标题购物车信息的 div 在哪里? [英] OpenCart: Where is the div for the drop down header cart info?

查看:33
本文介绍了OpenCart:下拉标题购物车信息的 div 在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置 OpenCart 的样式,但是我很难找到哪个 TPL 文件包含当您单击标题中的购物车图标时出现的 div(向下滑动的迷你购物车" - 它允许您查看您的购物车而不去购物车页面).

有谁知道我在哪里可以找到包含这个 div 的 .tpl 文件(在默认结构模板中)?谢谢

解决方案

为什么人们不给你投票?

#content DIV 位于 #cart DIV 中 - 您应该搜索过这个.

打开/catalog/view/theme/default/template/common/header.tpl

购物车标题在 echo

查看代码视图/catalog/view/theme/default/template/module/cart.tpl(v1.5.3.1版本)

该部分位于 .mini-cart-info 类的顶部.以下部分代码片段的示例:

<div class="heading"><h4><?php echo $heading_title;?></h4><a><span id="cart-total"><?php echo $text_items;?></span></a></div><div class="内容"><?php if ($products || $vouchers) { ?><div class="mini-cart-info"><表格><?php foreach ($products as $product) { ?><tr><td class="image"><?php if ($product['thumb']) { ?><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>"alt="<?php echo $product['name']; ?>"title="<?php echo $product['name']; ?>"/></a><?php } ?></td><td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name'];?></a><div>

I am trying to style OpenCart but am having difficulty finding which TPL file holds the div that appears when you click the Shopping Cart icon in the header (the 'mini cart' that slides down - it allows you to view what's in your cart without going to the cart page).

Does anyone know where I can find the .tpl file that has this div (in the default structure template)? Thanks

解决方案

Why did people downvote you?

The #content DIV sits within the #cart DIV - you should have searched this.

Open /catalog/view/theme/default/template/common/header.tpl

The cart header is in the echo

<?php echo $cart; ?>

To see the code view /catalog/view/theme/default/template/module/cart.tpl (in version v1.5.3.1)

The section is in the top within .mini-cart-info class. Example from some of the code snippet below:

<div id="cart">
  <div class="heading">
    <h4><?php echo $heading_title; ?></h4>
    <a><span id="cart-total"><?php echo $text_items; ?></span></a></div>
  <div class="content">
    <?php if ($products || $vouchers) { ?>
    <div class="mini-cart-info">
      <table>
        <?php foreach ($products as $product) { ?>
        <tr>
          <td class="image"><?php if ($product['thumb']) { ?>
            <a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
            <?php } ?></td>
          <td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
            <div>

这篇关于OpenCart:下拉标题购物车信息的 div 在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆