admin管理员组文章数量:1130349
I want to add a custom "ADD TO CART" button in the single product page.
I have done it using the id of the product.
<?php echo '<a href="?add-to-cart='.get_the_id($product_id).'">ADD TO CART</a>'; ?>
I want to add quantity, variation and attribute tags too.
so that I can get sth like:
domain/myproduct/?add-to-cart=100&variation_id=200&attribute_pa_colour=blue
I want to add a custom "ADD TO CART" button in the single product page.
I have done it using the id of the product.
<?php echo '<a href="?add-to-cart='.get_the_id($product_id).'">ADD TO CART</a>'; ?>
I want to add quantity, variation and attribute tags too.
so that I can get sth like:
domain/myproduct/?add-to-cart=100&variation_id=200&attribute_pa_colour=blue
本文标签: phpWoocommerce Add custom quotAdd to cart buttonquot in single page with tags
版权声明:本文标题:php - Woocommerce Add custom "Add to cart button" in single page with tags 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749139451a2321903.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论