Preserve qty. from add to cart form through node checkout

cmslounge - March 20, 2009 - 18:52
Project:UC Node Checkout
Version:6.x-2.0-beta3
Component:Code
Category:feature request
Priority:normal
Assigned:rszrama
Status:closed
Description

I'm testing this out, and wondering whether we can add a quantity field in the node creation stage. From UC I can add a quantity box to the initial product page, but I'm wondering whether it can be added to the second page, the node/add/nodecheckout_type (where nodecheckout_type is the chosen type that's linked to node checkout).

I have a scenario where I'm asking users to input other info in that screen (like a date) and thus it would help to have the quantity there as well.

Thanks

#1

ransom - June 27, 2009 - 23:57

Fairly sure a modified version of http://drupaleasy.com/blogs/ultimike/2009/03/event-registration-ubercart would work.. facing the same issue myself, however I'm also finding that UC node is some how braking the quantity from the initial product page, so even that won't work for me. Not sure however if that's my setup or an actual bug, have you tested?

#2

fred0 - July 6, 2009 - 19:58

I'm also seeing the product quantity not preserved when using the steps
Select Product -> Create Node Checkout -> Add to Cart
One would expect that this approach would carry the product quantity through tot he cart.

The other approach
Create Node Checkout -> Select Product -> Add to Cart
provides no option for quantity because the creation of the node adds the product to the cart. In this case, I believe the quantity would have to be passed from a cck field in the node via custom code.

So, my take on this is that the first scenario I describe here could be considered a bug report while the second scenario is either a feature request or a custom implementation outside the scope of this module.

#3

glennnz - July 29, 2009 - 07:58

I'm seeing this too.

I am building event registration, where the original purchase form's quantity field will dictate how many peop[le are being registered, then I want to use this to set up information fields on the node creation form (Name etc), with the correct number of fields being displayed.

I've tried a few methods, but can't get the quantity to carry through. Once I get the quantity through to the node creation page, the custom code there is easy and am happy to share.

Can anyone help with this? Ryan?

Cheers

Glenn

#4

rszrama - July 30, 2009 - 16:16
Title:Can the order node have a quantity field?» Preserve qty. from add to cart form through node checkout
Component:Miscellaneous» Code
Category:support request» feature request
Assigned to:Anonymous» rszrama
Status:active» fixed

Alrighty, if you have enabled the optional qty. field on your add to cart forms, the value the customer enters will now be preserved through the node checkout process. It was fairly simple to add in. : )

The only hitch, and this is due to some behavior of Ubercart that I'm questioning Lyle about, is that if you set a default qty. greater than 1, this will be ignored unless you enable the optional qty. field.

#5

glennnz - August 2, 2009 - 22:01

Ryan

Fantastic, thanks for this fix. This solves part of my challenge here.

--UPDATE--
Hmm... except I can't see how to use the qty value in my hook_form_alter...

--UPDATE--
Solved

$qty = $_GET['qty'];

Cheers

Glenn

#6

drewish - August 5, 2009 - 17:48

Humm... I just updated to CVS head but I'm not seeing any difference in the behavior so I'm not sure if I'm understanding this issue correctly. What I'd like is to set the default quantity and not let them be able to edit the quantity once it's in the cart. Because I'm selling nodes with phone number attached and allowing them to buy 3 of them makes no sense, they need to purchase 3 separate nodes.

#7

rszrama - August 5, 2009 - 18:21

Sorry, I might be using the "alternate" CVS methodology here. Instead of developing in HEAD, I branched for 6--2. Update there instead, or even to 6--2-0-BETA4. What you need is actually to use the UC Restrict Qty. module. I'd use the 6--1. The only thing is b/c of the way Ubercart core works, you can't do a default value without showing the Qty. form to the customer on the product node. If you just need to restrict them to 1 of everything, though, UC Restrict Qty. should solve it for ya.

#8

glennnz - August 5, 2009 - 21:08

You can then just hide the Qty field too, that's what I'm doing

#9

System Message - August 19, 2009 - 21:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.