1
Answers
How to print "add to cart form" with views_php
Hi,
I want to print the "add to cart form" by using a views_php field.
I use thie code in Global PHP field
<?php
$form = drupal_get_form('commerce_cart_add_to_cart_form');
print drupal_render($form);
?>
But i get this error on the product display page.
Warning : Missing argument 3 for commerce_cart_add_to_cart_form() dans commerce_cart_add_to_cart_form() (ligne 1427 dans ......\sites\all\modules\commerce\modules\cart\commerce_cart.module).
The add to cart button is not shown.
Kind regard
Comments
@creativepragmatic. Sadly for me the thread you refer to isn't specific enough about how to achieve this in Views PHP. Could you elaborate ?
Thanks