Drupal Ubercart get add to cart form

  1. $output .= drupal_get_form('uc_product_add_to_cart_form_'. $node->nid, $node);
Technology: 

Comments

Just what I need in time.. it's really helpful. Thanks for such a life saver :)

what if I built a add to cart image in photoshop - what code would I use to add the product to the cart on that image?

You can just use css, and use a font-size of 1px to hide the actual text.

That is a terrible, hackish answer. Try again. Even display:none would be better...

I created a Drupal7 module that exposes the "Add to Cart" form as a block, so its easier to access throughout site administration (Panels, Context, and the core Block Manager), and is easier to theme.

Pages

Add new comment