[support] CCK teaser template 'Add to cart' - button

Gordon Heydon gordon at heydon.com.au
Mon Feb 25 23:24:38 UTC 2008


Hi,

This is because the cart is not added for the teaser.

What you could do is do a

print drupal_get_form('product_cart_form', $node);

Gordon.

laura oldenbourg wrote:
> Hello there,
> I am having yet another problem with CCK teaser layout.
> I am using Drupal 5.x, CCK module and Contemplate module.
> 
> I would like to add an 'Add to cart'-button to the teasers of one of
> my CCK content types.
> 
> In the body template, by writing
> 
>   <div><?php print $node->content['cart']['#value'] ?></div>
> 
> I see a little field for inputting the 'Quantity', and then a button
> 'Add to cart'.
> 
> If I do the same to the teaser template, it doesn't display anything. Any help?
> In the end, I would like to display an 'Add to cart'-button only, with
> the quantity autonmatically set to '1'. Any suggestions?
> 
> Help much appreciated as always...
> 
> Laura


More information about the support mailing list