VirtueMart Integration?

17 years 6 months ago #22544 by mstookey
Replied by mstookey on topic Re:VirtueMart Integration?
I do have the new account activation set to no. Can I use the integration without swapping the checkout.index.php file to the hacked version? I had tried that & it seemed that the users info wasn't synching up correctly. While the extra fields in the initial reg process is nice, i'd be ok saving them for updating a profile but i thought i had to use the hacked checkout.index.php & get bumped out to the CB registration form for all to work properly - so i've been taking advantage of the extra field option in the reg process.

Just an automatic login when registering would help... anyone know how to do that?

Please Log in to join the conversation.

17 years 6 months ago #22550 by pjoomla
Replied by pjoomla on topic Re:VirtueMart Integration?
I apologize, I missed a few post in this topic and didn't realize you were referring to Ben's plugin + vm hack. You are right. Again, sorry.

But...

The vm hack in checkout.index.php exits the VM workflow completely and goes to CB's registration process. Unless I missed something in CB's code, there is no quick way to pass a return URL along through CB's registration process so that you can get back to VM's checkout process. The CB login module has a return URL, but the registration process does not. You could hack CB code, of course, to pass this through.

I wonder, though, whether you could hook into CB's process at the end of saveRegistration by adding a response in the vb_cb plugin for the onAfterUserRegistrationMailsSent event. That occurs very last after someone submits their registration through CB. If you could know that you were coming from the VirtueMart checkout process, you could possibly redirect in response to that event. Knowing that you came from VM's process, though, would probably require the same hacking of CB that I mentioned above to pass a return URL along, since you are passed completely through CB's registration page before ever getting to saveRegistration.

You can't really leave out the hack to checkout.index.php. Otherwise, the user's record won't be inserted into the CB user table (jos_comprofiler). The user won't exist in CB.

Unless... you hack from VM's side.

I did this on one of my sites (that doesn't use Ben's nice plugin) by hacking VM to have it update CB's jos_comprofiler table, rather than use CB's registration process. It is static and ugly, though, and doesn't handle CB's dynamic fields.

I'm sure there's an elegant way to handle this.

Please Log in to join the conversation.

17 years 6 months ago #22568 by beat
Replied by beat on topic Re:VirtueMart Integration?
pjoomla wrote:

Unless I missed something in CB's code, there is no quick way to pass a return URL along through CB's registration process so that you can get back to VM's checkout process. The CB login module has a return URL, but the registration process does not. You could hack CB code, of course, to pass this through.

I wonder, though, whether you could hook into CB's process at the end of saveRegistration by adding a response in the vb_cb plugin for the onAfterUserRegistrationMailsSent event.
...

CB 1.0.2 due begin of next week will have such an additional API event :)

mstookey wrote:

...
Just an automatic login when registering would help... anyone know how to do that?


That's a very nice idea. The 1.0.2 API will allow for this in the same event than the above one. :)

I like the way you guys want to streamline the user interface. Wish only I had a little more free time for better VirtueMart integration, but currently finishing the long-awaited paid subscriptions plugin as first priority, sorry. ;)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.221 seconds

Facebook Twitter LinkedIn