Drupal E-com

Add items to the Ubercart cart with custom forms

The request for more robust Ubercart add to cart forms comes up fairly regularly. People generally have in mind the sort of form that allows customers to specify quantities for a set of products and add them to the cart all at once. The request came up so often that I put a short explanation on how to accomplish this through a custom form into an FAQ post on Ubercart.org.

This article will walk through a very basic example of how you can use the Ubercart function uc_cart_add_item() in a custom form submit handler to add multiple items to the cart at once. This article assumes a basic knowledge of Drupal's Forms API. Code examples are from Drupal 6, but they are mostly applicable to Drupal 5 as well.

Multi-buy

Provides two catalog display types that allow buying multiple items with one click. The catalog display types look the same as the default list table and grid formats, but without the add to cart buttons for individual products and with a button at the bottom of the catalog page instead. When the button is pressed all products with positive quantity field values will be added to the cart.

 

UC Ajax Cart - Drupal 6

UC Ajax Cart provide another block for cart. So disabled cart block and enable UC Ajax Cart block

Subject