小编Han*_*utz的帖子

Magento 1.7*:如何在my-account-page的侧边栏中添加"Logout"链接

我想添加一个"注销"链接到我正在开发的Magento商店.

在"我的帐户"页面中,所有链接下的左侧边栏(底部的最后一个链接):

  • 帐户信息中心
  • 帐户信息
  • 地址簿
  • 等等.

如何在底部添加链接?

我想我应该在customer.xml中添加一行代码.

我想它应该在这个块中:

        <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>
Run Code Online (Sandbox Code Playgroud)

还有以下内容:

<action method="addLink" translate="label" module="customer"><name>LOGOUT</name><path>LOGOUT_PATH</path><label>Logout</label></action>
Run Code Online (Sandbox Code Playgroud)

我只是不确定具体代码应该是什么.

在此先感谢您的帮助

xml magento-1.7

4
推荐指数
1
解决办法
5412
查看次数

PHP和XML - 如何使用此XML在PHP中生成soap请求?

我完全不熟悉SOAP操作.

我已经获得了一个XML文档(SOAP)来获取一些送货方法的收集点.

从位于此处的手册:

http://privpakservices.schenker.nu/package/package_1.3/packageservices.asmx?op=SearchCollectionPoint

我可以看到我需要使用以下SOAP请求:

POST /package/package_1.3/packageservices.asmx HTTP/1.1
Host: privpakservices.schenker.nu
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://privpakservices.schenker.nu/SearchCollectionPoint"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SearchCollectionPoint xmlns="http://privpakservices.schenker.nu/">
      <customerID>long</customerID>
      <key>string</key>
      <serviceID>string</serviceID>
      <paramID>int</paramID>
      <address>string</address>
      <postcode>string</postcode>
      <city>string</city>
      <maxhits>int</maxhits>
    </SearchCollectionPoint>
  </soap:Body>
</soap:Envelope>
Run Code Online (Sandbox Code Playgroud)

问题是我不知道如何使用PHP将此作为请求发送,以及如何获得响应.

非常感谢任何帮助我找到正确方向的帮助.

UPDATE

我可以用var_dump读取响应数据.但是,我无法读取单个元素数据.

我需要读取如下数据

foreach($parser as $row) {
  echo $row->customerID;
  echo $row->key;
  echo $row->serviceID;  
}
Run Code Online (Sandbox Code Playgroud)

php xml soap

4
推荐指数
2
解决办法
3万
查看次数

在Umbraco 7中,如何使用自定义属性搜索所有成员?

我正在使用Umbraco 7(C#).

有没有一种简单的方法/方法来搜索具有自定义属性的所有成员?

我知道有一种简单的方法可以使用该方法通过用户名搜索所有成员

GetByUsername(string username) : returns IMember
Run Code Online (Sandbox Code Playgroud)

并通过电子邮件进行搜索:

GetByEmail(string email) : returns IMember
Run Code Online (Sandbox Code Playgroud)

你知道这种搜查财产的方法吗?

我尝试过使用方法".Where",如下所示:

GetService().GetAllMembers().Cast<IMember>().Where("permalink=SOMESTRING").ToArray();
Run Code Online (Sandbox Code Playgroud)

不幸的是有一个错误,因为我不能在这里使用.Where()方法.

有什么建议?

谢谢

c# linq umbraco umbraco7

4
推荐指数
1
解决办法
3641
查看次数

在C#中,String .Replace不会替换丹麦字符

所以我有一个包含丹麦字符(æ)的字符串,说:

string textString = "tæst"; string newString = "";

由于某种原因

newString = textString .Replace("æ", "e");
Run Code Online (Sandbox Code Playgroud)

未正确替换,newString = "tæst"应按原样生成newString = "test"

但是,并非总是如此

我已经在多台服务器上进行了测试,在某些服务器上可以正确返回,而"test"在其他服务器上则可以"tæst"

我在想,也许该字符串不能被识别为utf8字符串,并且应该被强制识别为utf8。只是一个猜测,您有想法/猜测吗?

谢谢

.net c# string str-replace

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

标签 统计

c# ×2

xml ×2

.net ×1

linq ×1

magento-1.7 ×1

php ×1

soap ×1

str-replace ×1

string ×1

umbraco ×1

umbraco7 ×1