skip to Main Content
Drupal 7 Ubercart Programmatically Add To Cart Product

Drupal 7 Ubercart programmatically add to cart product

Today we are learning about how to add the product to cart programmatically using Ubercart on Drupal 7. Let’s see we can add the product to cart using uc_cart_add_item¬†function¬†like.

uc_cart_add_item($nodeId, 1, array());

Using above function we can add the product to cart. The first argument is the “node id” and the second argument is the quantity of the product.

If you face any issue write the comment below.


I am a web designer and developer part-time blogger. Write something on some free time. Find my every day thought here :)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top