Saturday 18 June 2016

How to create Product "Add to Cart" type Button manually in WordPress, WooCommerce?

First create product in WooCommerce.

Then Where You want to put button Put following code:


Button anchor tag:-
----------------------------------------
<a href="/test_new_guided/?add-to-cart=2526">Add to Bag</a>


Add direct 5 product in cart:-
----------------------------------------
<a href="/test_new_guided/?add-to-cart=2526&quantity=5">Add to Bag</a>


Here, 2526 is product id.



For more Interesting, Useful Article & codes visit IT New Code.

Ankit Shah PHP Expert

IT New Code suggest a solution for your problem related to coding, Specially .PHP, Wordpress, WooCommerce, Magento, HTML and CSS. Visit Our website for Information.

1 comments:

  1. Very Big help, I am looking for days to solve my problem. Like WordPress, WooCommerce is also capable of transforming itself in to many forms. In actual sense WooCommerce is a plugin which, you can use to run a web store on WordPress. For more on this you can visit my blog https://goo.gl/GikSN3

    ReplyDelete

 

Copyright @ 2016 IT New Code | Developing Code | Designing Code.

Designed by: Ankit Shah