How to checkout product which are added as node references to other node type on node submit

Project:Ubercart Contributions
Component:Code
Category:task
Priority:normal
Assigned:Ryan
Status:active
Description
Project: 
Ubercart

Hi,

My problem is as follows.

I have a content type called as "test1" which is of type product class.
I have another content type called as "test2" which has a node reference
checkbox field of type "test1".

Now when a node of type test2 is created and certain checkboxes are checked
from the node references field and the node is created.

What I want is when the node is submitted I want all the products which are
checked to be added to the cart.
and on node submit the user is redirected to the cart.

Version: 
Ubercart 2.0-beta6
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: How to checkout product which are added as node references t

You're going to have to write a custom module for this. You can use Drupal's hook_form_alter() or possibly hook_nodeapi() instead to capture those values when the node form is submitted and add the products to the user's shopping cart. The main difficulty is in ensuring a proper redirect to the cart page upon completion.