小编Rem*_*emy的帖子

Yeoman发电机可以更新现有文件吗?

所以只是为了给你一些上下文,我正在尝试创建一个生成器,它将创建一些文件(当然基于用户输入)以及更新项目中的一些现有文件(例如添加新路径).

使用创建文件this.template没有问题......问题是:有没有办法用Yeoman做这个,而不必使用Node读取文件并做一些奇特的查找和替换?

yeoman yeoman-generator

30
推荐指数
3
解决办法
9489
查看次数

未捕获的SoapFault异常:[HTTP]错误获取http标头

我正在尝试创建与Magento的Web服务的soap连接,但是当我尝试创建soap客户端类的实例时,我遇到了错误.我可以毫无问题地在firefox中查看wsdl文件,我可以看到php在apaches日志中发出wsdl的请求,但它仍然失败.Nusoap可以连接.

$proxy = new SoapClient('someaddress?wsdl');
Run Code Online (Sandbox Code Playgroud)

错误是

<b>Fatal error</b>:  Uncaught SoapFault exception: [HTTP] Error Fetching http headers in /home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php:29
Stack trace:
[internal function]: SoapClient-&gt;__doRequest('&lt;?xml version=&quot;...',    'http://cornishw...', 'urn:Mage_Api_Mo...', 1, 0)
[internal function]: SoapClient-&gt;__call('call', Array)
/home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php(29): SoapClient-&gt;call(NULL, 'catalog_categor...', 5, 'giftshop')
/home/sites/xxx/xxx_main/system/application/libraries/MY_Loader.php(586): include('/home/sites/cor...')
/home/sites/xxx/xxx_main/system/application/libraries/MY_Loader.php(228): MY_Loader-&gt;_ci_load(Array, '')
/home/sites/xxx/xxx_main/system/application/modules/contentpage/controllers/contentpage.php(44): MY_Loader-&gt;view('contentpage_tem...', false, true)
[internal function]: Contentpage-&gt;index()
/home/sites/xxx in <b>/home/sites/xxx/xxx_main/system/application/views/contentpage_templates/gift_service.php</b> on line <b>29</b>
Run Code Online (Sandbox Code Playgroud)

谢谢

php soap wsdl magento

25
推荐指数
3
解决办法
10万
查看次数

Magento我的帐户布局XML问题

我遇到问题,让customer.xml布局文件在客户的"我的帐户"页面上正常工作.

导航链接和通常位于页面左侧的先前订购的项目将不会显示在页面上,但如果我将参考名称更改为xml文件中的"content",则会显示(除了它之外)显然然后在右边).我已经检查了它引用的模板(2columns-left.phtml),并且getChildHtml('left')位于正确的位置.

导致问题的块:

<customer_account>
    <!-- Mage_Customer -->
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>

    <reference name="left">
        <action method="unsetChild"><name>catalog.navigation.all</name></action>
        <action method="unsetChild"><name>callout.sendcard</name></action>
        <action method="unsetChild"><name>callout.specialorder</name></action>
        <block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
            <action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
            <action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
            <action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
        </block>
        <block type="sales/reorder_sidebar" name="sale.reorder.sidebar" as="reorder" template="sales/reorder/sidebar.phtml"/>
        <remove name="tags_popular"/>
    </reference>
</customer_account>
Run Code Online (Sandbox Code Playgroud)

这基本上是从我们的另一个网站直接复制,这是100%的工作.我已经尝试了我能想到的一切(例如,在模板和布局xml中更改引用的名称)无济于事.布局引用的模板显然有效,因为它们在放入"内容"区域时会显示出来.

magento的安装版本为1.3.1.1.

我感谢您给我的任何建议......

更新:我尝试将引用更改为"global_messages",它也没有显示.它似乎只适用于"内容"部分.

更新2:这些是在使用Alan Storm非常方便的调试模块时在页面上使用"showLayout = page"查询字符串的结果(您可以在下面的答案中找到).

    <?xml version="1.0"?>
<layout><block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
    <block type="page/html_head" name="head" as="head">
        <action method="addJs">
            <script>prototype/prototype.js</script>
        </action>
        <action method="addJs">
            <script>prototype/validation.js</script>
        </action>

        <action method="addJs">
            <script>paypoint/validation.js</script> …
Run Code Online (Sandbox Code Playgroud)

php xml layout magento

9
推荐指数
1
解决办法
2万
查看次数

jQuery treeview with sortable

我只是想知道是否有人知道有什么办法让bassistance treeview插件与jQuery UI的可排序插件一起使用?特别是在能够将元素从它的嵌套ul拖放到父ul或反之亦然方面.另外两个要求是我能够防止掉到指定的元素上(例如:带有class ="no-drop"的元素),以及在drop事件之后引用函数的能力.

如果用这些插件没有真正可行的方法,有没有人碰巧知道另一个插件?

亲切的问候,雷米

treeview tree jquery jquery-ui-sortable

8
推荐指数
3
解决办法
1万
查看次数

页面未在IE7或IE8中完全加载(但在其他浏览器中有效)

我遇到了一个非常奇怪的问题,我试图在IE7和IE8中测试的页面需要永远加载.问题是它适用于所有其他浏览器就好了(是的...... 甚至是IE6).页面只是继续加载说:

'(剩余1件商品)等待http:// ......'

有谁知道这可能发生的任何原因?

internet-explorer pageload internet-explorer-8 internet-explorer-7

5
推荐指数
1
解决办法
8636
查看次数

具有嵌套元素的jQuery悬停事件

我现在已经获得了基本的,普通的菜单树,如下所示:

<ul id="nav">
  <li>
    <a href="#">home</a>
    <div class="controls">Some controls go here</div>
    <ul>
      <li>
        <a href="#">item 1</a>
        <div class="controls">Some controls go here</div>
      </li>
      <li>
        <a href="#">item 2</a>
        <div class="controls">Some controls go here</div>
      </li>
    </ul>
  </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

具有"控件"类的div被隐藏起来.我想要发生的是,当你将鼠标悬停在li上时,各个li显示的控件(当你移开鼠标时,它们会再次隐藏).当您将鼠标悬停在其中一个嵌套的li上时会出现问题,它也会显示它的父控件.这是我正在使用的jQuery:

    $("#nav li").hover(
        function() {
            $(".controls:first", this).css("display", "block");
        },
        function() {
            $(".controls:first", this).css("display", "none");
        }
    );
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助.雷米

jquery nested menu hover

2
推荐指数
1
解决办法
9207
查看次数