简体   繁体   English

结帐页面上的重复付款方式字段[woocommerce]

[英]Duplicated payment methods field on checkout page [ woocommerce ]

Having some problem setting up my woocommerce shop because of the checkout page. 由于结帐页面,在设置我的woocommerce商店时遇到了一些问题。 The problem is that I'm facing duplicated payment methods that appear on BILLING Page and also ORDER & PAYMENT page. 问题是我面临着BILLING Page以及ORDER&PAYMENT页面上出现的重复付款方式。

I'm using a theme that haves a one page checkout. 我正在使用一个有一页结帐的主题。 If anyone can indicate how can i remove the links 如果有人可以指示我如何删除链接

Images that explain the the situation http://i.imgur.com/ODCTERg.png - Billing and shipping page that show the wrong placement of the field http://i.imgur.com/s26UfjI.png - the payment page that show the right and wrong placement of the field 解释情况的图片http://i.imgur.com/ODCTERg.png - 显示该字段位置错误的结算和发货页面http://i.imgur.com/s26UfjI.png - 付款页面显示该字段的正确和错误位置

I'm not 100% sure why the payment options are appearing on your Billing Details step (this will be down to how the theme is built); 我不是100%确定为什么付款选项会出现在您的“结算明细”步骤中(这将取决于主题的构建方式); however I suspect this is happening because your theme has a woocommerce folder, and following one of the more recent WooCommerce updates (around 2.3.0 , I think), the WooCommerce theme files have changed slightly. 但是我怀疑这种情况正在发生,因为你的主题有一个woocommerce文件夹,并且遵循最新的WooCommerce更新之一(我认为大约是2.3.0 ),WooCommerce主题文件略有改变。

Previously, the payment options loop was in /woocommerce/checkout/review-order.php in your theme folder. 以前,付款选项循环位于主题文件夹中的/woocommerce/checkout/review-order.php中。 However, it was removed from this file and there are now two new files: payment.php and payment-method.php . 但是,它已从此文件中删除,现在有两个新文件: payment.phppayment-method.php

It's most likely that your existing review-order.php template contains the loop for displaying the available payment gateways, but WooCommerce sees that your theme doesn't have the payment.php file, so is helpfully using its default (located in /plugins/woocommerce/templates ) - as a result, your checkout is doubling up on displaying the payment options. 现有的 review-order.php模板很可能包含显示可用支付网关的循环,但WooCommerce看到您的主题没有payment.php文件,因此有助于使用其默认值(位于/plugins/woocommerce/templates ) - 结果,您的结帐会显示付款选项。

Try: 尝试:

Make a backup of your current review-order.php file, then copy 'review-order.php , payment.php & payment-method.php from /plugins/woocommerce/templates/checkout/ to your theme folder: [your-theme]/woocommerce/checkout/ . 备份您当前的review-order.php文件,然后将'review-order.phppayment.phppayment-method.php /plugins/woocommerce/templates/checkout//plugins/woocommerce/templates/checkout/复制到您的主题文件夹: [your-theme]/woocommerce/checkout/

Hopefully, you should no longer see the doubling-up of your payment methods. 希望您不再看到付款方式的加倍。 On the downside, you may well have to modify these files to bring them back in line with your theme. 在缺点方面,您可能需要修改这些文件以使它们与您的主题保持一致。

Just rename this folder: 只需重命名此文件夹:

/wp-content/themes/themename/woocommerce/ checkout / wp-content / themes / themename / woocommerce / checkout

It Is old code which is coming with theme. 这是与主题一起来的旧代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM