OpenCart: Where is the div for the drop down header cart info?(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 在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:OpenCart:下拉标题购物车信息的 div 在哪里?
基础教程推荐
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
