magento form.html不显示 window 和 Linux下的区别
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自定义付款方式形式不显示
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 版权所有
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
2014-08-12 复制站方法:
2013-08-12 js zhi网马