以太我的状态从来没有过来或我不知道如何谷歌它!我的开发环境更新到ubuntu 14.04,phpStorm 2016.1(仍处于试用版),java版"1.7.0_95".所有设置都很好,我可以调试,但在调试启动后(一分钟或更短的时间),所有调试会话终止或从第一个断点重新启动.我也得到了很多"调试会话没有被暂停就完成"的通知而没有做任何调试请求(参见附件中的plz).
请让我知道要检查什么或可能是什么原因.提前致谢.
[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
Run Code Online (Sandbox Code Playgroud)
开发框架是magento 1.14.2 EE
我在搜索中找到的只是一个编程解决方案.我知道我们可以为英文商店修改/lib/Zend/Locale/Data/en.xml.这个部分在en.xml中有:
<currencyFormats>
<currencyFormatLength>
<currencyFormat>
<pattern>#,##0.00 ¤</pattern>
</currencyFormat>
</currencyFormatLength>
</currencyFormats>
Run Code Online (Sandbox Code Playgroud)
并且价格以这种格式显示:1,321.54现在从价格中删除小数部分我认为我唯一要做的就是将en.xml更改为如下所示:
<currencyFormats>
<currencyFormatLength>
<currencyFormat>
<pattern>#,##0 ¤</pattern>
</currencyFormat>
</currencyFormatLength>
</currencyFormats>
Run Code Online (Sandbox Code Playgroud)
问题是在此更改后,价格显示为所需(1,132格式),但没有货币符号($).我在这里失踪了什么?提前致谢.
更新 我仍在尝试,当模式节点更改为以下
<pattern>¤ #,##0</pattern>
Run Code Online (Sandbox Code Playgroud)
价格随货币符号($ 1,132)而来,但不是在期望的位置O_O,要求是右侧有货币符号没有左边:( SO ..
可能是一个愚蠢的问题,但我搜索了很多没有结果.我知道如何在服务器响应中设置缓存控制,但是如何在ajax请求中更改缓存控制的值?注意:我希望浏览器使用它的缓存.不希望它从服务器获取更新的json ..这是我想要做的全部事情.
I'm new to magento and always have issues.
For now, I managed to add subscribe popup message and want to add a child block to my main block.
Code:(my custom module is My_Module)
<reference name="before_body_end">
<block type="newsletter/subscribe" name="newsletter_popup" as="newsletter_popup" template="popup/subscribe.phtml">
<block type="Module/popup_newsletter" name="newsletter11" />
</block>
</reference name="before_body_end">
Run Code Online (Sandbox Code Playgroud)
and in subscribe.phtml I try the following:
var_dump($this->getChildHtml('newsletter11'))
Run Code Online (Sandbox Code Playgroud)
but the result is:
string(0)""
I tried to load the block from template in this way also:
var_dump($this->getLayout()->createBlock('module/popup_newsletter'));
Run Code Online (Sandbox Code Playgroud)
but the result is boolean(false).
what …
如果我们在文件system.xml中添加后端配置,我们可以使用validate标记为每个字段添加验证,如下所示:
<duration>
<label> ...</label>
<frontend_type >text</frontend_type>
<validate>required-entry validate-number</validate>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>70</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</duration>
Run Code Online (Sandbox Code Playgroud)
我的问题是,有相似的方法使magento中的小部件选项相同吗?例如,在widget.xml文件中这样:
<widget type="common/widget">
<name>new widget</name>
<description>new widget</description>
<parameters>
<template>
<visible>0</visible>
<value>template.phtml</value>
</template>
<after translate="label">
<visible>1</visible>
<label>...</label>
<type>text</type>
<validate>required-entry validate-number</validate>
</after>
</parameters>
</widget>
Run Code Online (Sandbox Code Playgroud) 我正在尝试将PHP 7与mongoDB连接,我按照此页面说明使用pecl安装了"新"MongoDB驱动程序.我可以从phpInfo()输出中看到MongoDB版本1.1.8 ,但我无法弄清楚如何从PHP代码启动连接:p.以下代码包括我尝试连接(尝试连接甚至使用旧时尚方式)
// new fashion way
$connection = new MongoDB\Driver\Client();
// or by using old fashion way
$conn = new MongoClient();
// random try :p
$randConn = new MongoDB\Client();
Run Code Online (Sandbox Code Playgroud)
在这两种情况下,我都没有定义类异常.请让我知道我错过了什么,我的错误在哪里,如果可能,请提供和示例以便更容易遵循;).
PS:用过的操作系统是ubuntu 14.04 LTS.
提前致谢.
我花了几个小时搜索找到magento存储完整县名的地方.我们可以使用此代码获取完整的国家/地区列表:
$_countries = Mage::getResourceModel('directory/country_collection')
->loadData()
->toOptionArray(false);
Run Code Online (Sandbox Code Playgroud)
这将返回一个包含国家/地区代码和名称的数组,我调查了目录模块,发现此调用从表中获取数据
directory_county
但是这张桌子没有完整的县名!那么它存储在哪里?以及如何使用该调用检索?
提前致谢.