OpenCart: Where is the div for the drop down header cart info?

瘦欲@ 提交于 2019-11-30 17:47:11

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>

I agree With @TheBlackBenzKid.

1) View file can be found with below path

"catalog/view/theme/default/template/module/cart.tpl" .

2) Controller file can be found with below path

"catalog/controller/module/cart.php" . 

Below link can provide you where to modify the files related to the header drop-down cart. I have give instruction how to modify and created another drop down similar with previous.

Please have a look on this link "https://github.com/pantlavanya/copy-opencart-mini-cart"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!