我在 Magento 的一家商店工作。我使用了一个自定义模板,在其中更改了一些颜色(当然是经过许可的),但是当我尝试更改某些内容时,旧样式仍然存在。我在本地运行 Magento,并尝试了从重新启动 MAMP 到刷新缓存的所有方法。
当我在浏览器上使用“检查元素”时,我发现我的商店代码如下所示;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vanilla Looks - Kettingen</title>
<meta name="description" content="Default Description" />
<meta name="keywords" content="Magento, Varien, E-commerce" />
<meta name="robots" content="INDEX,FOLLOW" />
<link rel="icon" href="http://127.0.0.1:8888/skin/frontend/base/default/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://127.0.0.1:8888/skin/frontend/base/default/favicon.ico" type="image/x-icon" />
<script type="text/javascript">
//<![CDATA[
var urlSkinsite='http://127.0.0.1:8888/skin/frontend/galaeva/default/';
//]]>
</script>
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
var BLANK_URL = 'http://127.0.0.1:8888/js/blank.html';
var BLANK_IMG = 'http://127.0.0.1:8888/js/spacer.gif';
//]]>
</script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://127.0.0.1:8888/skin/frontend/galaeva/default/css/styles.css" media="all" />
<link rel="stylesheet" type="text/css" href="http://127.0.0.1:8888/skin/frontend/galaeva/default/css/widgets.css" media="all" />
<link rel="stylesheet" type="text/css" href="http://127.0.0.1:8888/skin/frontend/galaeva/default/slideshowwidget/css/wt-rotator.css" media="all" />
<link rel="stylesheet" type="text/css" href="http://127.0.0.1:8888/skin/frontend/galaeva/default/css/print.css" media="print" />
<script type="text/javascript" src="http://127.0.0.1:8888/js/prototype/prototype.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/lib/ccard.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/prototype/validation.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/scriptaculous/builder.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/scriptaculous/effects.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/scriptaculous/dragdrop.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/scriptaculous/controls.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/scriptaculous/slider.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/varien/js.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/varien/form.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/varien/menu.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/mage/translate.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/js/mage/cookies.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/skin/frontend/galaeva/default/js/galaeva.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/skin/frontend/base/default/slideshowwidget/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/skin/frontend/base/default/slideshowwidget/js/jquery.wt-rotator.js"></script>
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="http://127.0.0.1:8888/skin/frontend/galaeva/default/css/styles-ie.css" media="all" />
<![endif]-->
<!--[if lt IE 7]>
<script type="text/javascript" src="http://127.0.0.1:8888/js/lib/ds-sleight.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8888/skin/frontend/base/default/js/ie6.js"></script>
<![endif]-->
<style type="text/css">
body {
font: 12px/1.5 Arial, sans-serif;
background-color:#fff;
background-image:url(http://127.0.0.1:8888/skin/frontend/galaeva/default/images/pattern/1.png);
}
.page { background-image:url(http://127.0.0.1:8888/skin/frontend/base/default/images/header_top.png); }
.nav-content { background-image:url(http://127.0.0.1:8888/skin/frontend/galaeva/default/images/bg_menu.png); }
a,
.product-detail-slide button.btn-cart span span,
.product-special button.btn-cart span span,
#tabs .ui-tabs-panel ul li button.btn-cart span span { color:#c20066; }
.block .block-title,
.latest-reviews h1,
.product-special h1,
.product-detail-slide .price-box,
.product-special .price-box,
#tabs .ui-tabs-panel ul li .price-box,
.cart .discount h2,
.cart .shipping h2,
.cart .totals h2 {
background-color:#000;
}
.menu { color:$settings->get_nav_text_color(); }
/* Top level menu */
#nav a.level-top,
.menu .submenu a {
font:normal bold 12px/1.55 Arial,sans-serif !important;
color:#fff;
}
#nav a.level-top:hover,
.menu .submenu:hover a { color:#fff; }
/* Sub #1 menu */
#nav li li a,
.menu li.submenu div a {
font:normal 12px/1.55 Arial,sans-serif !important;
color:#bebebe !important;
}
#nav li li a,
.menu li.submenu div a:hover{ color:#fff !important; }
.block .block-title strong,
.latest-reviews h1,
.product-special h1,
.cart .discount h2,
.cart .shipping h2,
.cart .totals h2 {
font:bold 14px/31px Arial, sans-serif;
color:#fff;
}
.block-subscribe .block-title strong { font:12px/1.5 Arial, sans-serif !important }
.widget .widget-title h2 { font:bold 14px/31px Arial, sans-serif; }
.price,
#opc-login h3,
#opc-billing #billing1,
#opc-shipping #shipping1,
#shipping_method1,
.checkout-onepage-success h2.sub-title {
color:#AB0051;
}
</style>
我删除了底部,因为它超出了 Stack 的正文限制。无论如何,我认为问题在于页面上出现的内联样式。
那里说;
.block .block-title,
.latest-reviews h1,
.product-special h1,
.product-detail-slide .price-box,
.product-special .price-box,
#tabs .ui-tabs-panel ul li .price-box,
.cart .discount h2,
.cart .shipping h2,
.cart .totals h2 {
background-color:#000;
}
这里它说我的块标题仍然是黑色的,即使我在 css 文件中将它们编辑为另一种颜色。我尝试在主题附带的每个 css 文件中查找这段 css,但这段代码不在任何文件中......
我现在很疑惑,magento是怎么得到这些css的,在哪里可以改?