Magento付款方式的判断

本文介绍了Magento电子商务平台中,针对西联汇款和银行转账这两种付款方式的特殊处理。当客户选择这些支付选项后,系统会引导他们到一个页面,提示用户联系商家以完成支付过程。文章将通过代码示例展示这一功能的实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我们有这样的需求,当我们使用西联或者银行转账付款方式的时候,客户从网站提交订单过后需要有一个页面提示用户联系我们完成付款
代码块

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<style type="text/css">
	.presult{text-align:left;text-transform: unset;padding: 0 36px;}
	.presult .presulthead{height:40px}
	.presult p{font-size:1.1em; padding:3px 0}
	.presult .leftorderid{float:left}
	.presult .rightamount{float:right}
	@media only screen and (max-width: 770px) {
		.presult .leftorderid{width:100%;}
		.presult .rightamount{width:100%;}
		.presult .presulthead{height:65px}
	}
</style>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<?php
	$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());  
	$payment_method = Mage::helper('payment')->getInfoBlock($order->getPayment())->toHtml(); 
	$baseCurrencyCode = 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值