window 无大小写区别,所以可以显示表框

Linux 大小写敏感,显示不了

\app\code\community\Company\BabyPay\Model\Payment.php 里定义了form

protected $_code = 'BabyPay_payment';
protected $_formBlockType = 'BabyPay/form';  //大写

/app/design/frontend/default/default/template/BabyPay/ 所以这个文件夹也要大写

  • Magento自定义付款方式形式不显示

标签云

Magento自定义付款方式形式不显示

I wrote a custom payment module. It seems to be working fine but I can't show the method form in the checkout process. I mean: I see my method, I can select it, but can't see the form. I want to show a select box with a couple of options but no form is rendered.

app\code\local\Neurona\Sistarbanc\Block\Form\sistarbanc.php

class Neurona_Sistarbanc_Block_Form_Sistarbanc extends Mage_Payment_Block_Form
{
protected function _construct()
{
parent::_construct();
$this->setTemplate('payment/form/sistarbanc.phtml');
}
....

And the form in app\design\frontend\base\default\template\payment\form\sistarbanc.phtml

Any help will be appreciated!!

EDIT

 

So, it seems to be working in the default ckeckout process but not in the onestepcheckout

EDIT 2

I found that in onestepheckout this is the way the payment method form is rendered:

<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
<dd id="container_payment_method_<?php echo $_code; ?>" class="payment-method" <?php if(!$this->getSelectedMethodCode()==$_code || !($hide_nonfree_methods && $_code == 'free')): ?> style="display:none"<?php endif; ?>>
<?php echo $html; ?>
</dd>

So, for my method $this->getPaymentMethodFormHtml($_method) is FALSE. �0�7why?

2016年10月27日12分02秒

Your template filename is Sisterbanc.phtml, but your block will try to load sisterbanc.phtml (uppercase "s" vs lowercase "s").

2016年10月27日12分02秒

Maybe you need add this line in Model/Payment.php.

protected $_formBlockType = "sistarbanc/form/sistarbanc"

I don't know the reason why though. I compared with other payment module code, and got this.

2016年10月27日12分02秒

 

© 2016 91R.NET 版权所有

magento form.html不显示 window 和 Linux下的区别的更多相关文章

  1. socket在windows下和linux下的区别

    原文:socket在windows下和linux下的区别 1)头文件 windows下winsock.h/winsock2.h linux下sys/socket.h    错误处理:errno.h 2 ...

  2. window和Linux下的软链接

    window下开启软链接命令: mklink /J  "D:\IdeaProjects\bms_work\smartcity_govnet\base_web\target\base_web\ ...

  3. 负载均衡---在window与linux下配置nginx

    最近有些时间,开始接触负载均衡方面的东西,从硬件F5再到Citrix Netscalar.不过因为硬件的配置虽然不复杂,但昂贵的价格也让一般用户望而却步(十几万到几十万),所以只能转向nginx,sq ...

  4. 【转】玩玩负载均衡---在window与linux下配置nginx

    最近有些时间,开始接触负载均衡方面的东西,从硬件F5再到Citrix Netscalar.不过因为硬件的配置虽然不复杂,但昂贵的价格也让一般用户望而却步(十几万到几十万),所以只能转向nginx,sq ...

  5. 玩玩负载均衡---在window与linux下配置nginx

      最近有些时间,开始接触负载均衡方面的东西,从硬件F5再到Citrix Netscalar.不过因为硬件的配置虽然不复杂,但昂贵的价格也让一般用户望而却步(十几万到几十万),所以只能转向nginx, ...

  6. 在Window和Linux下使用Zthread库

    ZThread库是一个开源的跨平台高级面向对象的线性和sycnchronization 库,以运行POSIX 和Win32 系统中的C++程序. ZThread库的主页:http://zthread. ...

  7. 关于File.separator 文件路径:window与linux下路径问题(“No such file or diretory ”异常解决方案)

    最近有个在页面上传Excel文件至服务器指定目录并进行数据校验.最后入库及进行进一步处理的应用情境,我写好代码在模拟环境下测试,完全没问题:但客户试用的时候,却老是报告“No such file or ...

  8. 在Window和Linux下使用Zthread库(跨平台高级面向对象的线性和sycnchronization 库)

    ZThread库是一个开源的跨平台高级面向对象的线性和sycnchronization 库,以运行POSIX 和Win32 系统中的C++程序. ZThread库的主页:http://zthread. ...

  9. 转:socket编程在windows和linux下的区别

    如无其它说明,本文所指Linux均表示2.6内核Linux,GCC编译器,Windows均表示Windows XP系统,Visual Studio 2005 sp1编译环境. 下面大概分几个方面进行罗 ...

随机推荐

  1. IDEA创建spring加struts2项目

    选择spring和struts,注意版本,不同的struts版本,过滤器的位置不一样 选择存放位置,并点击完成创建项目,在创建过程中会自动下载相关jar 初始化完成后的目录结构为 修复生成的web.x ...

  2. vscode存盘时格式化

    1.文件->首选项->设置

  3. layer 1.8.5 引用样式失效

    在layer.min.js里,默认引用的官网的样式,目前,网址失效.所以使用本地的样式即可. 将e后面的网址去除,即使用本地的样式.

  4. Luogu P4708 画画 (Burnside引理、组合计数)

    题目链接 https://www.luogu.org/problem/P4708 题解 看上去Luogu P4706-4709是Sdchr神仙出的一场比赛,一道水题和三道很有趣的题终于全过了纪念QAQ ...

  5. Codeforces Round #201.C-Alice and Bob

    C. Alice and Bob time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  6. JAVA源文件中可以包含多个类

    可以的,一个“.java”源文件里面可以包含多个类,但是只允许有一个public类,并且类名必须和文件名一直:例如: package test; public class test { } class ...

  7. localhost与127.0.0.1的区别是什么?

    localhost与127.0.0.1的区别是什么?都代表本地服务器 相信有人会说是本地ip,曾有人说,用127.0.0.1比localhost好,可以减少一次解析. 看来这个问题还有人不清楚,其实这 ...

  8. C++入门经典-例3.2-根据分数判断是否优秀

    1:代码如下: // 3.2.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream> using ...

  9. 第六周课程总结&实验报告(四)

    实验报告(四) 一.实验目的 1.掌握类的继承 2.变量的继承和覆盖,方法的继承,重载和覆盖的实现 二.实验的内容 1.根据下面的要求实现圆类Circle. 圆类Circle的成员变量:radius表 ...

  10. python3笔记十八:python列表元组字典集合文件操作

    一:学习内容 列表元组字典集合文件操作 二:列表元组字典集合文件操作 代码: import pickle  #数据持久性模块 #封装的方法def OptionData(data,path):    # ...