-1
请让我知道如何在付款成功屏幕上找到付款成功或失败的信息。请向我发送代码段。Magento检查付款是否付清成功页面
以上要求是在完成付款后,我们需要提供可下载的链接给客户,而不必更改管理界面中的订单状态。
由于提前,
P.Karthikeyan
请让我知道如何在付款成功屏幕上找到付款成功或失败的信息。请向我发送代码段。Magento检查付款是否付清成功页面
以上要求是在完成付款后,我们需要提供可下载的链接给客户,而不必更改管理界面中的订单状态。
由于提前,
P.Karthikeyan
创建的结构和文件:
app/etc/modules/Myproyect_Mymodule.xml
app/code/local/Myproyect/Mymodule
app/code/local/Myproyect/Mymodule/etc/config.xml
app/code/local/Myproyect/Mymodule/Model/Mymodel.php
创建XML文件来设置模块:应用程序的/ etc /模块/ Myproyect_Mymodule。 xml
<?xml version="1.0"?>
<config>
<modules>
<Myproyect_Mymodule>
<active>true</active>
<codePool>local</codePool>
</Myproyect_Mymodule>
</modules>
</config>
在这里您将看到挂钩配置。在“事件”选项卡中,您可以通过设置事件的名称(第21行),模块(第23行)和类的方法(第26行)将任何观察者添加到任何事件中。
app/code/local/Myproyect/Mymodule/etc/config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Myproyect_Mymodule>
<version>0.0.1</version>
</Myproyect_Mymodule>
</modules>
<global>
<helpers>
<mymodule>
<class>Myproyect_Mymodule_Helper</class>
</mymodule>
</helpers>
<models>
<mymodule>
<class>Myproyect_Mymodule_Mymodel</class>
</mymodule>
</models>
<events>
<!-- here the event to hook: -->
<checkout_onepage_controller_success_action>
<observers>
<mymodule_model_mymodel>
<type>model</type>
<class>Myproyect_Mymodule_Model_Mymodel</class>
<method>myModelMethod</method>
</mymodule_model_mymodel>
</observers>
</checkout_onepage_controller_success_action>
</events>
</global>
</config>
这里在第6行,您必须创建针对especified事件执行的方法。 app/code/local/MyProject/MyModulo/Model/MyModel.php:
class Myproyect_Mymodule_Model_Mymodel extends Mage_Core_Model_Abstract
{
public function myModelMethod()
{
// acciones.
}
}