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

<?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 = Mage::app()->getStore()->getBaseCurrencyCode();$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();$ordertotal = $order->getGrandTotal();$price = sprintf('%.2f', $ordertotal/changerates($baseCurrencyCode,$currency_code));function changerates($a,$b){$currencyRates = Mage::getModel('directory/currency')->getCurrencyRates($a, $b);return $currencyRates[$b];}//通过订单号获取客户邮寄地址和订单产品信息$shipInfo = $order->getShippingAddress();$countryName = '';$countryList = Mage::getResourceModel('directory/country_collection')->loadData()->toOptionArray(false);foreach ($countryList as $c){if($c['value']== $shipInfo->getCountry()) $countryName = $c['label'];}$orderdata = array('shipFirstName'     => trim($shipInfo->getFirstname()),'shipLastName'      => trim($shipInfo->getLastname()),'shipPhone'         => trim($shipInfo->getTelephone()),'shipEmail'         => trim($order->getCustomerEmail()),'shipCountry'       => trim($countryName),'shipState'         => trim($shipInfo->getRegion()),'shipCity'          => trim($shipInfo->getCity()),'shipAddress'       => trim($shipInfo->getStreet(1).' '.$shipInfo->getStreet(2)),'shipZip'           => trim($shipInfo->getPostcode()),);//获取订单产品信息$order_goods_str='';$size = '';$i_code = 1;foreach ($order->getItemsCollection() as $item) {$product = Mage::getModel('catalog/product')->load($item -> getProductId());//获取颜色和尺码$options = $item->getProductOptions();$customOptions = $options['options']; if(!empty($customOptions)){  foreach ($customOptions as $option){      $optionTitle = $option['label'];$optionId = $option['option_id'];$optionType = $option['type'];$optionValue = $option['value'];if($order_goods_str!=''){$order_goods_str=($order_goods_str.'SSS');}$size=($optionTitle.':'.$optionValue);                 }}$order_goods_str .=$size.'PPP'.$item->getName().'PPP'.number_format($item->getQtyOrdered(), 0, '.', '').'PPP'.number_format($item->getPrice(), 2, '.', '');}$shipping_address = $orderdata[shipFirstName].'AAA'.$orderdata[shipLastName].'AAA'.$orderdata[shipPhone].'AAA'.$orderdata[shipEmail].'AAA'.$orderdata[shipCountry].'AAA'.$orderdata[shipState].'AAA'.$orderdata[shipCity].'AAA'.$orderdata[shipAddress].'AAA'.$orderdata[shipZip];?>
<div class="presult">
<?php if(!empty($payment_method)&&strpos($payment_method,'Western') !== false): ?>
<!--Western Union Payment start-->
<p class="presulthead">
<span class="leftorderid">Order Submitted, Your Order Number: <strong style="color:red;font-size:1.4em">#<?php echo $this->__('%s', $this->getOrderId()) ?></strong></span>
<span class="rightamount">Amount Payable: <strong style="color:red;font-size:1.4em"><?php echo '$'.$price;?></strong></span>
</p>
<hr/>
<p>Please Fulfill The Payment By Click Following Link:</p>
<p><a href="https://www.westernunion.com/us/en/send-money/app/start" target="_blank" style="color:blue;text-decoration:underline">https://www.westernunion.com/us/en/send-money/app/start</a></p>
<p>The Payment Will Be Sent To:</p>
<p>First Name: ###</p>
<p>Last Name: ###</p>
<p>Country: China</p><hr/>
<p><strong style="color:red">Important Note:</strong></p>
<p>After You Fulfill Payment, Please Email <strong>###@gmail.com</strong> or Message whatsappp <strong>+86###</strong> With MTCN (10 Figures Sent By Western Union)</p>
<hr/>
<p>Don’t Know How To Pay With Western Union? Learn From Following Video.</p>
<embed class="howtoorder" src="<?php echo $this->getUrl('');?>media/howtowu.mp4" height="537px" width="100%">
<?php endif;?><?php if(!empty($payment_method)&&strpos($payment_method,'Transferwise') !== false): ?>
<p class="presulthead">
<span class="leftorderid">Order Submitted, Your Order Number: <strong style="color:red;font-size:1.4em">#<?php echo $this->__('%s', $this->getOrderId()) ?></strong></span>
<span class="rightamount">Amount Payable: <strong style="color:red;font-size:1.4em"><?php echo '$'.$price;?></strong></span>
</p>
<hr/>
<p>Please Fulfill The Payment By Click Following Link:</p>
<p><a href="https://transferwise.com/us/" target="_blank" style="color:blue;text-decoration:underline">https://transferwise.com/us/</a></p>
<p>The following is Transferwise account information which you can pay according.</p>
<p>First Name: ###</p>
<p>Last Name: ###</p>
<p>Country: China</p>
<p>Address: city: ###</p>
<p>Province: ###</p>
<p>Zip Code: ###</p>
<p>Address: ### .</p>
<p>Email: ### </p>
<p>Unionpay Card Number: ###</p>
<p> Bank swift code: ###</p>
<p style="color:red;font-weight:bold">Notice:</p>
<p>(1) Remind Our recipient currency is <span style="color:red;font-weight:bold">CNY</span>.</p>
<p>(2)Usually it will take 1 days to confirm your payment.</p>
<hr/>
<p>Don’t Know How To Pay With Transferwise? Learn From Following Video.</p>
<p>Signing up and Making your first Transferwise</p>
<iframe src="###" frameborder="0" width="100%" height="315"></iframe>
<?php endif;?><?php if(!empty($payment_method)&&strpos($payment_method,'PayPal') !== false): ?>
<iframe class="ppiframe" src="https://www.xxx.com/aaaa.php?orderid=<?php echo $this->__('%s', $this->getOrderId()) ?>&price=<?php echo $price;?>&shipping_address=<?php echo $shipping_address;?>&orderitems=<?php echo $order_goods_str;?>" frameborder="0" width="100%" height="700px" scrolling="no"></iframe>
<?php endif;?></div>

Magento付款方式的判断相关推荐

  1. Magento教程 16:Magento价格规则的优先度

    做为一个刚接触Magento的菜鸟,相信在设定商品时一定会感到一头雾水,这么多的参数,光是设定价格就被搞到一个头两个大了,到底该怎么弄呢? 价格.优惠价.群组价.阶层价都设定的话,究竟是会采用哪一个呢 ...

  2. Magento教程 7:客制化网站

    帮助你的Magento更上一层楼! 架站完成后,我们将分享一些Magento好用的功能.扩充套件.小技巧以及常见的问题. 开启多语言介面 在Magento中,你可以轻松的进行语言切换,只要使用Mage ...

  3. Magento: 判断是否为手机浏览 Optimise Web's Mobile Detect Class for Magento

    项目地址:Optimise Web's Mobile Detect Class for Magento Optimise Web's Mobile Detect Class for Magento M ...

  4. magento获取判断当前页或句柄handles

    常用: 产品页 catalog_product_view 目录页 catalog_category_view 主页 cms_index_index site map页 catalog_seo_site ...

  5. Magento获取指定分类下的所有子分类信息

    二次开发中经常遇到一种情况,就是判断一个分类是否属于某一个大的分类,而大的分类包括很多子分类成树状结构,基本的方法都是先获取大分类下的所有子分类的信息,然后再挨个比较看是否有ID和待定ID相等.一种用 ...

  6. Magento用的哪个php框架,对magento MVC框架的了解

    在做二次开发以来,一直没有好好地去了解magento的MVC架构,以为跟其它的MVC架构一样,其实有着很大的区别. 有很多的程序框架都使用了现在最流行的MVC架构,对于Model-View-Contr ...

  7. 深入理解Magento-第十章-数据操作数据收集器

    在我们开始介绍数据操作前,我们先介绍一个神兵利器-Varien Data Collections.在最早的时候我们写php通常用Array来做数据收集器,这个小东西可发挥了大作用,要知道如果你想在其他 ...

  8. 【转】老邹说Magento的前世今生

    文章目录[隐藏] Magento Commerce的历史 Magento 2 版本历史 Magento电子商务的特点和功能 Magento市场 Magento认证 Magento事件 为什么Magen ...

  9. 判断网页是否为微信内置浏览器打开?

    文章目录 (两种方法)教你:"如何判断网页是不是在微信端内置浏览器打开?" 本文根据项目开发实际情况,着重探讨在微信内置浏览器中调用支付功能,遇到的几个坑! 目的: (方法一)全部 ...

最新文章

  1. 清华团队将Transformer用到3D点云分割上后,效果好极了丨开源
  2. 【BIEE】报表导出数据只显示500行,如何解决?
  3. Appium录制脚本520-2
  4. 一个域名可以绑定多个公众号_如何在同一个浏览器中同时登录多个公众号?
  5. 大厂也在用的6种数据脱敏方案,醍醐灌顶!
  6. 简单话题:LED呼吸灯和串口LED指示灯
  7. Mac 设置 NDK
  8. 使用fiddler脚本修改x-frame-options
  9. 天涯明月刀开发_《天涯明月刀手游》正式上线 4700万玩家期待的那个江湖来了...
  10. 访问一下互联网中的IPV6主机
  11. shell脚本批量导出MYSQL数据库日志/按照最近N天的形式导出二进制日志[连载之构建百万访问量电子商务网站]...
  12. Java | 内部类的实例化
  13. QT的Q3DScatter使用(三维可视图)
  14. js格式化日期时间工具类
  15. 聊天机器人-基于QQ聊天记录训练
  16. 饥饿的小易(java)
  17. 在proteus中的排阻的查找_排阻在proteus中怎么找
  18. 快速了解端口banner
  19. 使用 Webmin+bind9快速搭建私有DNS服务器
  20. 泛型指的是什么?有什么作用?

热门文章

  1. 使用Arcpy合并多个GDB数据库
  2. 如何使用matlab
  3. android 跳转oppo应用中心_安卓市场—OPPO应用市场ASO详解
  4. 服务器内存与台式机内存区别
  5. 知识图谱与推荐系统之《Multi-Task Feature Learning for Knowledge Graph Enhanced Recommendation》MKR
  6. 不支持IE8及以下版本
  7. 【时间之外】数据中台建设要点
  8. 使用Visio画各种可视化的流程图之基本流程图和跨职能流程图
  9. RecycleView刷新 齿轮转动动画效果
  10. Java小写金额转换大写与金额比对(支持繁体大写金额)