我很惊讶我问这个,因为我认为这很容易做但我已经尝试使用插件好几天而且无法得到我需要的结果。
我正在尝试为woocommerce产品添加多个交叉销售选项,以便用户可以选择多个附加产品,并使用产品页面中的主要产品将其添加到购物车中。
例如:如果主要产品是玩具车,附加选项可能是电池,额外的遥控器等。客户可以检查他们想要的物品,所有物品都将单独添加到购物车中(单独购买)我的意思是,顾客以后可以决定将玩具车从推车中取出,但是电池和额外的遥控器仍会留在推车中,直到它们也被移除。)
我尝试了各种各样的东西,包括:产品变体(核心),产品捆绑(woo和yith),产品插件(woo和yith),复合产品(woo和yith)。没有人可以做到以上所有。
如果有人可以提出使用核心或插件的方法,我将非常感激!
感谢阅读:)
答案 0 :(得分:1)
It's been a while and I assume you already found the answer, but in case you haven't, you may add (manually) all the products that matches the product in the cart. You can do so in the product's page (admin panel) in "linked products", where "Cross-Sells" are the ones that will show in the cart.
The only thing is that by default, WooCommerce allows only 2 products to be linked. You may override that limit by inserting in your theme's "functions.php" file, the following line.
add_filter( 'woocommerce_cross_sells_columns', 'change_cross_sells_columns' ); function change_cross_sells_columns( $columns ) { return 6; }
In the example above, "6" is the limit. You may use any number, but you should use it wisely, as too many products shown in the cart will only confuse customers.
I hope this helps.