简体   繁体   English

自定义magento扩展帮助

[英]custom magento extension help

I need help with a couple of problems in my magento sales module. 我的magento销售模块中有几个问题需要帮助。

  1. I have a mobile number text field in my magento extension back-end. 我的magento扩展后端中有一个手机号码文本字段。 I want to get it validated using this regular expression ^[a-z0-9\\. _\\'-]{1,11}$ 我想使用此正则表达式^[a-z0-9\\. _\\'-]{1,11}$对其进行验证^[a-z0-9\\. _\\'-]{1,11}$ ^[a-z0-9\\. _\\'-]{1,11}$ .Also want to show a help text for each fields. ^[a-z0-9\\. _\\'-]{1,11}$ 。还想显示每个字段的帮助文本。

  2. I want my extension to do some operations when the Admin ships the order.Please give a sample code of identify the event. 我希望我的扩展程序在管理员发送订单时进行一些操作。请提供识别事件的示例代码。

  3. I want to add a mobile number field to the magento customer registration page. 我想在magento客户注册页面中添加一个手机号码字段。

Any help is highly appreciated. 非常感谢您的帮助。

Ad. 广告。 2) 2)

I am running v1.3.2 and it does not seem like there are any events dispatched when shipment is created. 我正在运行v1.3.2,创建装运时似乎没有调度任何事件。 Your best bet is to override the default adminhtml shipment controller and add an event dispatch with an event name of your choice. 最好的选择是覆盖默认的adminhtml装运控制器,并添加具有您选择的事件名称的事件调度。 You can handle this event with an event observer in your module. 您可以使用模块中的事件观察器来处理此事件。

If your client is using the API to ship orders, you should also take care of raising an event in the api code responsible for creating shipments. 如果您的客户使用API​​运送订单,则还应注意在负责创建运送的api代码中引发事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM