If the cart has multiple line items of the same product (auto merge is not enabled), then the checkout registration forms only show up for one line of the product line items.

The attached patch solves the problem, which basically uses a counter for all the registrations instead of on a per line item basis.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

John Franklin’s picture

Status: Active » Needs review

Patch worked for me. Thanks.

Status: Needs review » Needs work

The last submitted patch, lineitem.patch, failed testing.

chertzog’s picture

Status: Needs work » Reviewed & tested by the community

+1. Works great.

blacklabel_tom’s picture

lineitem.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, lineitem.patch, failed testing.

blacklabel_tom’s picture

Status: Needs work » Needs review
FileSize
4.88 KB

Re-rolled the original patch

Status: Needs review » Needs work
blacklabel_tom’s picture

Rolled into 7.x-2.x-dev

  • Commit d1400d6 on 7.x-2.x by blacklabel_tom:
    Issue #2153321 by aj2: Added counter for registrations so that multiple...
alibama’s picture

I'm getting an File commerce_registration-7.x-2.x-dev.tar.gz?date=1403543627 is corrupt (wrong md5 checksum). and the multiple items are not showing up in the add to cart area. I can probably resolve by adding multiple product references to the registration... not very elegant, but doable

blacklabel_tom’s picture

Hi alibama,

Can you give this another try please? I've tried downloading this morning and it's OK at my end.

Cheers

Tom

blacklabel_tom’s picture

Version: 7.x-2.0-beta5 » 7.x-2.x-dev
blacklabel_tom’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
alibama’s picture

hey man - thanks for getting back to me on this - File commerce_registration-7.x-2.x-dev.tar.gz?date=1403543627 is corrupt (wrong md5 checksum). [error]

not sure - I mean, I can wget the file and unzip it, so it's not that?

Thanks again

blacklabel_tom’s picture

Hi alibama,

I thought you were having trouble downloading the module from the module page, is that right?

I checked this morning and it was OK for me (but I could be barking u the wrong tree!).

Can you let me know where you're getting the checksum error and a steps to re-produce on the issue please?

Cheers

Tom

alibama’s picture

Hi Tom - doh -should have mentioned that - I'm trying to download with drush

blacklabel_tom’s picture

No worries, can you knock over the drush command please?

alibama’s picture

sudo drush dl commerce_registration-7.x-2.x-dev

alibama’s picture

also fwiw am on IRC in #drupal-commerce

blacklabel_tom’s picture

FileSize
42.79 KB

Hi alibama,

I can dl from my machine OK, I had a quick Google and found this:

https://www.drupal.org/node/1961304

It could be that the dev branch has had a few updates and the XML cache is out of date?

Screenshot attached.

Cheers

Tom

alibama’s picture

OK - good news =
confirm drush dl commerce_registration-7.x-2.x-dev.zip --no-cache works

not as good news - (and this may be unrelated to commerce registration - please accept my apologies if it is)

in any case - if I add multiple products while registering for an event and click through the registration, on the next page where I'm adding to cart I'm given a select list, instead of the two selected options - picture attached

blacklabel_tom’s picture

Hi alibama,

Glad we got the drush thing sorted, I'll bear that trick in mind next time I have an issue with it.

Just so I'm clear your steps to re-produce are:

Add a couple of products to your cart
Then go to the 'register' tab on your event product and fill in the details
This is added to your cart
On your cart you then get a select list when you should have other options?

I haven't been using the module very long so I'm not 100% up to date on all it's functionality!

Cheers

Tom

alibama’s picture

hey man - it may be simpler to test online = go to vml.org/user log in as blacklabel password tom (yeah...) and then go to vml.org/node/499/register and select ~2 or more of the optional product stuff... in any case I'll plan to delete that account in ~30 minutes or so? :)

blacklabel_tom’s picture

HI alibama,

Thanks for giving me access, makes a lot more sense now!

On node/499 I'm guessing that each of the 10: Member - Prior to Sept. 19, 11: Non-Member - Prior to Sept. 19, etc are products being displayed on that node?

When you get to the next page should you be getting a form for each registration you have checked? Instead of a select list and one form?

Cheers

Tom

alibama’s picture

Hi Blacklabel_tom,
yeah - that's what I would have expected... again - I'm not 100% certain that this is a registration commerce issue - but it may be?

I'm going to get some better screen capture tools so you won't have to waste your time digging around on my site

ap

blacklabel_tom’s picture

Hi alibama,

I'll have a proper look, but it feels like it could be a registration module issue as the register tab is provided by them.

Oh if you could that would be brilliant, more pairs of eyes on it can only be a good thing right?

Cheers

Tom

alibama’s picture

I've pretty much concluded that this has nothing to do with commerce registration, or registration, but rather with commerce and that I'm "doing it wrong"

doesn't mean that I'm right though.. you're welcome to close this ticket on my account... or leave open in case it's something unrelated that I'm confused about :)

blacklabel_tom’s picture

Hi Alibama,

I'll close this ticket for now, if someone stumbles over this issue later they can re-open :)

Cheers

Tom

blacklabel_tom’s picture

Status: Needs work » Closed (works as designed)
nadavoid’s picture

Status: Closed (works as designed) » Needs work

I'm using the latest dev, but have to revert the commit introduced in this issue for one reason. If a user has multiple registrations of different types in their cart, there is a fatal error when proceeding past entering registration information. This is because there is a mismatch between the the $i variable which represents the global registration count, and $k which represents the count of registrations for a single registration product.

The solution may just be to update the for loop in commerce_registration_information_checkout_form_submit(), moving the $i outside of it, and using $k inside it, but I'm not sure.

aj2’s picture

Yes. seeing the same issue now with an update to latest rev.

Potentially a fix at this bug report below:

https://www.drupal.org/node/2400593

The fix at the link above fixes (although I chose to initialize variable i to zero, and update i++ after the loop)

Note: If the user changes the quantity to say 2 in the cart, then the system works as expected. If line items are not combined, then get the error.

blacklabel_tom’s picture

Status: Needs work » Needs review

Hi Aj2,

I've just committed the fix in https://www.drupal.org/node/2400593 to dev this morning so hopefully that has fixed this one too.

Will test when I get a chance.

Cheers

Tom