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

<?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. R语言dataframe数据列中的缺失值NA的个数统计实战:特定数据列的NA值统计、所有特征的NA值统计
  2. Jquery UI dialog 详解 (中文)
  3. [翻译]为什么你不要收缩数据库文件
  4. ITK:按标量乘以图像
  5. 多线程编程之四——线程的同步
  6. React Native - FlexBox弹性盒模型
  7. 牛客题霸 [丑数] C++题解/答案
  8. 天龙2 场景地图人物 方向箭头 方法
  9. Linux各发行版本简介
  10. win7个人计算机的ip地址,win7计算机ip地址查询_win7本机ip地址查询
  11. ASP.NET高级配置Web.config和Machine.Config
  12. visual studio 2019 Intel Parallel Studio XE2020下FORTRAN安装及MPI并行配置计算
  13. 教你不要光驱一样重装系统
  14. 正逻辑与负逻辑的关系
  15. PLC是什么?它的作用是什么?
  16. max计算机什么函数,计算机max函数使用方法
  17. Kaggle--房价预测
  18. 为什么有的python内置函数怎么就一个pass?
  19. 安卓Native Memory Leak(本地服务内存泄露)分析
  20. passive-interface的含义

热门文章

  1. 『Batch Normalization』Batch Normalization一文吃透
  2. 字符型数据与数值型数据之间的转换
  3. u盘Linux、window双系统文件格式安装
  4. 为什么都说Dubbo不适合传输大文件?Dubbo支持的协议
  5. linux去除重复字符,Linux去除重复项命令uniq
  6. 市场监管新规下Android接入的友盟Umeng移动统计/推送/分享SDK过程问题总结
  7. 中国SAP顾问在美国的跳槽经历
  8. 【转】 浅谈Radius协议
  9. Google Cloud Platform 注册
  10. 下载b站外挂字幕,用 potplayer 播放视频也能看字幕了