更改购物车列的顺序,而不覆盖Woocommerce中的模板文件 [英] Change order of cart columns without overriding template files in Woocommerce

查看:27
本文介绍了更改购物车列的顺序,而不覆盖Woocommerce中的模板文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有解决方案可以更改购物车列的顺序,而无需将文件复制到我自己的模板文件夹中?

Is there a solution to change the order of the cart columns without copying the file in my own template folder?

原因是,我不想覆盖这样重要的模板文件.

The reason is, that I don't want to overwrite such a crucial template file.

不幸的是,订单被硬编码为表中的 cart.php 文件,而不是函数内的文件.

Unfortunately, the order is hardcoded as table in the file cart.php and not inside a function.

在这种情况下,是否存在任何干净"的方式来更改列的顺序?

Is there in this case any "clean" way to change the order of the columns?

推荐答案

唯一的方法是通过您的活动主题覆盖Woocommerce cart/cart.php模板,因为它已硬编码在模板中.

The only way is to override Woocommerce cart/cart.php template via your active theme as it's hardcoded in the template.

Woocommerce模板被重写,因此这没什么大不了的.

Woocommerce template are made to be overridden so it's not a big deal to do it.

唯一令人讨厌的事情是,当模板文件在主要更新中更改时,如果模板已更改,则必须再次进行更改.

The only annoying thing, is when templates files change in major updates, you will have to make your changes again if the template has been changed.

这篇关于更改购物车列的顺序,而不覆盖Woocommerce中的模板文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆