忽略了儿童主题中的Woocommerce添加到购物车模板

时间:2016-01-26 15:55:29

标签: php wordpress woocommerce

事实是,使用高级自定义字段时,我必须检索添加到每个产品页面中的自定义字段的链接,这样,当用户点击"添加到购物车"时,它会将他发送到网页在自定义字段中提供。

我似乎以不同的方式尝试,例如https://docs.woothemes.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons。问题是模板路径被忽略。我做的就像有说:wp-content / themes / YOUR-THEME / woocommerce / loop / add-to-cart.php - WooCommerce真的忽略了模板!

使用一些垃圾回声进行测试,没有任何显示,这只会意味着模板被忽略。 add-to-cart.php中的代码位于http://pastebin.com/hLhwWggh

该模板完全被忽略,我不知道如何处理它。也许有些东西在模板本身不起作用?

1 个答案:

答案 0 :(得分:0)

当我启用{ "name": "xx", "place": { "native": "aa", "school": "ee", "college": "dd" }, "dob": "ss", "ids": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120 ], "mark": [ { "10thmark": "345", "12thmark": "1100" }, { "Diploma": "G", "Diploma PG": "R" }, { "Ug": "D", "PG": "E" } ] } “添加到购物车”时,我已经安装了特殊的变体插件,然后woocommerce中的数量将不起作用。

当我禁用AJAX时,一切正常!

---- stooni