Is it possible to automatically insert something into a cart? I would like the user to click on a link that takes them to a cart with a product already inserted.
That's something that's been on Ryan's list o' things to do. It seems like there's always something else that needs to be done first, though.
what about an uc_cart_add_item($nid, $qty)
You could then create a menu callback for uc_cart_add_item, with the node id and quantity arguments.
If this is just about adding a product to cart throught a regular link (not form) we have already made some code for this. I'll tell Erlend to post it out here.
______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no
Cool kulvik, I think a lot of people will be interested by that. Me include.
Does it work with attributes options ? to directly add a product with attribute ? it could be a very good things too.
zMove,
Do I understand that your uc_extra_column module satisfies the requirements of this thread? If so, could I see a snippet that utilzes this feature properly so that I can embed an add to cart mini form in an arbitray node?
My target node is actually a book page.
Thanks
Hi,
My module just add on product listing the same button with attribute selection you can find when you enter in the full node.
It's not the same thing that provide a a fuction that allow tu put a link that automatically add a defined product when you click on it.
zmove
Thank you, I believe you have clarified this for me. Just to be sure that my understanding is correct, do I understand that on my catalog product page, I will now have the attributes and "add to cart button" for each product shown and therefore I do not have to click a product and move past the catelog page into a product detail node before I can add that product to my cart?
Hear! Hear! This implementation will be a life-saver for me. I have managers waiting with baited breath! 
Awesome!
Anybody know how to contact Erlend to get this code posted?
You can go visit him in Norway. 
(Alternatively, you can private message him through our site - he's quaoar.)
Thanks Ryan
Hi guys. Sorry about that. I posted some code in another thread here:
http://www.ubercart.org/forum/support/360/possible_add_products_cart_tex...
It's about the same thing. That simple code does unfortunately not work with attributes yet. We just needed it for some quick functionality on one of our sites.
______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no
There is a LOT of overhead in this solution, but I have the add-to-cart thing licked by using Bwv's node view technique as seen here:
http://www.ubercart.org/contrib/96
this got the attributes in as well.
Ok i'll give that a go.
Overhead: I know, but as I said.. we needed this in 15 minutes or less 
______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no





