我是 Magento 的新手,所以如果这是一个新手问题,请多多包涵
基本上在 layout.xml 文件中有一个声明如下的块:
<block type="checkout/cart" name="checkout.cart">
<action method="setCartTemplate"><value>checkout/cart.phtml</value></action>
<action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
<action method="chooseTemplate"/>
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
Run Code Online (Sandbox Code Playgroud)
我想<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>用自定义模板覆盖。
既然这里调用了一个方法,那模板怎么改呢?
非常感谢!
Krt_马耳他
我需要以编程方式阅读 magento 中购物车价格规则的条件。
Mage_SalesRule_Model_Rule有一种方法getConditionsSerialized()确实提供了条件,但以一种神秘的方式至少可以说如下:
a:7:{s:4:"type";s:32:"salesrule/rule_condition_combine";s:9:"attribute";N;s:8:"operator";N;s:5:"value";s:1:"1";s:18:"is_value_processed";N;s:10:"aggregator";s:3:"all";s:10:"conditions";a:1:{i:0;a:5:{s:4:"type";s:32:"salesrule/rule_condition_address";s:9:"attribute";s:13:"base_subtotal";s:8:"operator";s:2:">=";s:5:"value";s:1:"1";s:18:"is_value_processed";b:0;}}}
Run Code Online (Sandbox Code Playgroud)
有谁知道如何以更人道的方式阅读条件?我希望能够读取某些属性。
谢谢一堆!
Krt_马耳他
嗨,大家好,
我有一个URL,我想将它嵌入到一个mailto.直到现在,我已经尝试了两种方法对URL进行编码,这两种方法都没有给我带来好的结果:
URLEncoder - 这给了我电子邮件中的加号,因为显然URLEncoder仅适用于查询参数.
org.apache.commons.httpclient.URI - 这不会给我完整的URL.它给了我与之前在帖子中解释的结果相同的结果:MailTo中的Escape和符号
我能做什么?
谢谢:) Krt_Malta
我想向Local Solr发送查询.目前我发送的是:
如您所见,查询是 keyword_text_mv : apple
我想送apple AND orange.
我怎么写这个?以下是否可以?
http:// localhost:9001/solrfacetsearch/master_Shop/select /?q = keyword_text_mv%3Aapple和orange&version = 2.2&start = 0&rows = 10&indent = on&qt = geo&lat = 52.398&long = 4.93653&radius = 2000&debugQuery = true
我在端口80上运行Varnish,在同一台机器上运行8088端口的Apache(我用它进行开发/测试).
Apache被定义为VCL中的后端,如下所示:
backend default {
.host = "127.0.0.1";
.port = "8088";
.first_byte_timeout = 600s;
.probe = {
.request = "GET /index.php HTTP/1.1"
"Host: example.com"
"Connection: close";
.interval = 5s;
.timeout = 1s;
.window = 10;
.threshold = 8;
}
}
Run Code Online (Sandbox Code Playgroud)
如您所见,我设置了探针.但是,当我做varnishadm backend.list时,我得到了
Backend name Refs Admin Probe
default(127.0.0.1,,8088) 1 probe Sick 0/10
Run Code Online (Sandbox Code Playgroud)
当我执行wget 127.0.0.1:8088时,我得到了
--2017-04-17 10:20:20-- http://127.0.0.1:8088/
Connecting to 127.0.0.1:8088... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://magento2.dev/?SID=obcv7ifsq5b4ro9jr3hmpb7oi4 [following]
--2017-04-17 10:20:20-- http://magento2.dev/?SID=obcv7ifsq5b4ro9jr3hmpb7oi4
Resolving magento2.dev... 127.0.53.53
Connecting to magento2.dev|127.0.53.53|:80... …Run Code Online (Sandbox Code Playgroud) magento ×2
apache ×1
java ×1
php ×1
solr ×1
uri ×1
url-encoding ×1
varnish ×1
varnish-vcl ×1
virtualhost ×1