Author Topic: Community Builder integration  (Read 414371 times)

sync

  • Jr. Member
  • **
  • Posts: 53
    • e-motion design
Re: Community Builder integration
« Reply #15 on: August 17, 2006, 02:17:14 am »
take attention a plugin is not a component (as so called in joomla)

Yes good point it can get confusing - but I meant 'component' in the sense of 'a part of ...' - maybe I should say something like 'there are 2 *parts* to this release', do you think that's clearer?

I do have to make my own zip in order to install the CB plugin, you might redo your zip file for the other who need just a click working solution ;-)

Yep thanks for the feedback, my fault - there's a new 0.1.5 release with a proper installable zip file and instructions that you need to unzip the first larger zip.

Cheers!

sync

  • Jr. Member
  • **
  • Posts: 53
    • e-motion design
Re: Community Builder integration
« Reply #16 on: August 17, 2006, 02:19:02 am »
I can't get it to work with dutch languages. I'm using CB 1.01, VM 1.06 and Joomla 1.0.10. I switched to english and it worked OK.

Is it possible to get it working with dutch languages?

I've never tried it in another language at all - how are you changing this setting? Let me know and I'll replicate it and see what I can do about the problem..

sync

  • Jr. Member
  • **
  • Posts: 53
    • e-motion design
Re: Community Builder integration
« Reply #17 on: August 17, 2006, 02:30:58 am »
moreover I guess we do have to change this line of code in virtuemart.php CB plugin also
Code: [Select]
DEFINE( '_VIRTUEMART_SECRET' , 'xxxx' ); in order to get our own secret key, right ?

Well spotted! No I should pull this secret from the config/database, I must have forgotten to do this. Will add it to the list!

in order to make a good shop, not a geek place  ;) we need:
1/ if the CB registration is on a page alone (has it is now), at least the registration process should avoid us to enter the nickname choosen and the password (I've already made this on phpshop and an old CB...), plus we need to have an automatic redirection to the checkout process from VM (all as to be hidden for the user)

2/if the CB registration field can be integrated in the checkout_register_form.php it would be better for the non geek understanding

3/ the better way would be to hack VM in order to populate CB with the new data just entered I'va also done that on phpshop...)
it's the better way in word of graphics integration and logical process for our costumers who're not 12 horus a day on their keyboard (like us I guess ;-) )

Thanks so much for the time you've spent looking at this and your detailed comments! I'm afraid that I don't understand what you mean here 100% - my idea of how the plugin should work is:

1. A customer goes to the website and registers - when they register they enter all standard Joomla rego stuff and the VM registration stuff too (all through the one CB registration page)
2. The customer goes through the shop, adds some items to cart, and goes to checkout
3. Customer goes through checked (as they've already logged in) and purchases

On a return visit:
1. Customer browses around the shop, adding things to their cart
2. Customer logs in, or is prompted to login at checkout
3. Customer completes checkout as normal

If a customer wants to edit their info, all links to edit their profile should go to the CB-edit-profile page where they can edit Joomla or CB info. That's one of the things I change in the hack to checkout.index.php.

Does that make sense? If it does, can you tell me which bits of that aren't working right at the moment, or which bits you think we should change?

I think that people can use Virtuemart in so many different ways, I might have one case in mind but other people might have different ways they want the process to work.

Thanks again Gwen!

gwen

  • Jr. Member
  • **
  • Posts: 332
Re: Community Builder integration
« Reply #18 on: August 17, 2006, 18:48:07 pm »
Hi Sync,

Quote
1. A customer goes to the website and registers - when they register they enter all standard Joomla rego stuff and the VM registration stuff too (all through the one CB registration page)
2. The customer goes through the shop, adds some items to cart, and goes to checkout
3. Customer goes through checked (as they've already logged in) and purchases

Actually ask to yourself...when you're looking for something to purchase on the net.... will you register to a web site in order to make an order...or will you make an order (on the website found...) and after that complete the registration process ?

I really think that my way is the best (not cause it's mine ;)) but cause I think in the shopper way.
A shopper won't make a registering process before making an order, unless you're on a community web site of course...but I'm talking about a shop website.

do you understand me ?

by the way I finisehd yesterday night a esay intergation of CB profil in VM...the VM shopper are added automaticly to the CB database, and can complete thezir profile later if they want to tahe part of the community !



Gwen ex-dev team member. I used virtuemart to build www.doudouplanet.com a very good experience for me !

gregdev

  • Full Member
  • ***
  • Posts: 968
    • PlainlyCode
Re: Community Builder integration
« Reply #19 on: August 18, 2006, 04:17:30 am »
I've been watching your discussion and your CB plugin with interest. Good work.

Regarding your most recents posts, I think it is important to allow both paths for registration:
1. From the CB side where a user registers on a site, then considers shopping after that (like sync suggested).
2. From the VM side, where the user is first a shopper, whose information gets carried over to VM during the checkout process (like gwen suggested).

I also wrote an integration between VM and CB on my site, from the VM side though. I ended up hacking core files, but I think I'll end up changing it to use a mambot. Meaning, I'll place a trigger in the VM code in the registration process that calls a mambot to do the syncronization work. This is similar to the concept of writing a plugin for CB. A plugin system for VM would be helpful for integrations like this. Until that happens, I just place triggers in VM code to call a mambot. This keeps my VM code much cleaner for upgrades.


Nicap

  • Beginner
  • *
  • Posts: 3
Re: Community Builder integration
« Reply #20 on: August 19, 2006, 17:36:05 pm »
I can't get it to work with dutch languages. I'm using CB 1.01, VM 1.06 and Joomla 1.0.10. I switched to english and it worked OK.

Is it possible to get it working with dutch languages?

I've never tried it in another language at all - how are you changing this setting? Let me know and I'll replicate it and see what I can do about the problem..

Standard language is english. If i set it om Joomla as default Dutch, then Virtuemart is also in Dutch. It takes the setting from Joomla.

gwen

  • Jr. Member
  • **
  • Posts: 332
Re: Community Builder integration
« Reply #21 on: August 19, 2006, 19:41:42 pm »
Hi gregdev,

you're right of course the better way to synchronize VM and CM is do to it in the both way !

do you have any file do send in orer to test the mambot you wrote?
so with your way you'll only have to hack an admin file (config?) this would be excellent to have a plugin option able to manage pluggin addition has you suggest (as in CB actually :-) )

Gwen ex-dev team member. I used virtuemart to build www.doudouplanet.com a very good experience for me !

Nicap

  • Beginner
  • *
  • Posts: 3
Re: Community Builder integration
« Reply #22 on: August 20, 2006, 01:00:08 am »
I have to add something:

when i select the english langauge in Global configuration, then in Virtuemart Language Manager english is the default mosConfig_lang?

But actually the language is still in dutch in VM(when browsing the shop). If i change dutch.php into something else it works, and then it is in english.

gregdev

  • Full Member
  • ***
  • Posts: 968
    • PlainlyCode
Re: Community Builder integration
« Reply #23 on: August 22, 2006, 23:14:26 pm »
do you have any file do send in orer to test the mambot you wrote?
so with your way you'll only have to hack an admin file (config?)

My hack for user integration, as I mentioned before, was in the core files. For other tasks, I've used the mambot concept. I want to apply it to user integration, but haven't implemented it yet.

But, you'd need to place mambot calling code wherever you want the synchronization to happen:

Code: [Select]
global $_MAMBOTS;
$_MAMBOTS->loadBotGroup( 'virtuemart' );
$_MAMBOTS->trigger( 'onVMUserAdd', array($d) );

You'd need this in multiple places to handle backend user registration, frontend user registration, etc.

Then, inside the mambot, register a function to handle the event:

Code: [Select]
$_MAMBOTS->registerFunction('onVMUserAdd', 'whateverFunctionYouWantToCall');

function whateverFunctionYouWantToCall($d) { ...

Oh, and inside the mambots .xml file, you'll need to use this:

Code: [Select]
<mosinstall type="mambot" group="virtuemart">
At least, that's my preference - I create a new mambot group for all my VirtueMart mambots.

See this URL for a previous post on VirtueMart mambots:

http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=18465.0

But, I should add that I've stepped back from using mambots in terms of strategy. I think that a VM-specific plugin system would be better than using mambots.


super_yupi

  • Beginner
  • *
  • Posts: 6
Re: Community Builder integration
« Reply #24 on: September 06, 2006, 19:09:36 pm »
Thank you so much for the wonderful plugin.
One problem I am facing is the process of changing the "shopper group"

I have a regular shopper group and discount shopper group.  When people register from Community builder/Virtuemart plugin registration form, I cannot seem to change the shopper group in the administration screen. 

In order for this to work, I had to go into Virtuemart and change the shopper group (which does not reflect change)--and then when I go back to the admin screen for community builder, I can change the shopper group in each user.  I tried "sync user" in the tool function, but this does nothing.

Any configuration I missed when I set the program up??

I appreciate your help :)

Solved

I found what was wrong.... I had the "default shopper group ID" to be "5" instead of defualt "0" in my Virtuemart.

I changed Virtuemart plugin's virtuemart.php (line 230)
   
if ( strlen($vm_sgi)==0 ) $vm_sgi=0; TO
if ( strlen($vm_sgi)==0 ) $vm_sgi=5;

and it's working now.. Thanks for the great module.

sync

  • Jr. Member
  • **
  • Posts: 53
    • e-motion design
Re: Community Builder integration
« Reply #25 on: September 08, 2006, 08:50:45 am »
I changed Virtuemart plugin's virtuemart.php (line 230)

Thanks super_yupi - I actually replied to your post on joomlapolis about this issue, I replicated it on my install so I've added it to the tracker. I'll try that fix ASAP.

Sorry all about my slowness replying - we've been flat-out on other jobs but I will definitely be getting back to this integration; I need to get it all sorted for use by one of our clients! But also I don't want to start this interesting integration and then leave it - I want to get this working for everyone in a simple solution!

Cheers..

super_yupi

  • Beginner
  • *
  • Posts: 6
Re: Community Builder integration
« Reply #26 on: September 11, 2006, 01:58:19 am »
I am still doing trying and error on tihs...but here are some changes I made to make it work.. :D

In admin section, I have to go to Virtuemart first and then go to Community builder.  I am not sure how to go around this....if I don't do this, "shopper" (perm) and "shopper group" drop down menu does show up on the screen.

Also- when I try to add new users from community builder, the user get added..but all the information for Virtuemart was not added.
I can update the user...but not add new user's billing address....

I used this script to fix..
      //see  if the database user exist in vm_user_info
         $q = 'SELECT * FROM #__vm_user_info WHERE `user_id`="' .$user->id.'"';
         $database->setQuery($q);
         $database->query();
         // Insert Shopper -ShopperGroup - Relationship if there is no database exist...
         if( sizeof($database->loadRowList()) < 1 ) {
         
         $q = 'INSERT INTO #__vm_user_info SET `user_id` = "'. $user->id .'" , `user_info_id` = "'. md5( uniqid( _VIRTUEMART_SECRET )) .'"';
         $database->setQuery( $q );
         $database->query();
         
                  }
         else {
      }

If anyone has better way, please let me know.


I am not sure if this will affect anything..but I changed these as well... (some '"' seemed to be missing...)
line 223 of Virtuemart.php  (plubin) change

         $vendor_id = 1; // *** fix up this hack!
         // *** working on this bit 20060712
         $q = "SELECT * FROM #__vm_shopper_vendor_xref WHERE `vendor_id`=".$vendor_id." AND `user_id`=" . $user->id;
         $database->setQuery($q);
         $database->query();
         $vm_sgi = $_REQUEST['vmart_shopper_group_id'];
         $vm_cn = $_REQUEST['vmart_customer_number'];
         if ( strlen($vm_sgi)==0 ) $vm_sgi=0;
         if ( strlen($vm_cn)==0 ) $vm_cn="''";
         if( sizeof($database->loadRowList()) < 1 ) {
            // Insert Shopper -ShopperGroup - Relationship
            $q  = "INSERT INTO #__vm_shopper_vendor_xref ";
            $q .= "(user_id,vendor_id,shopper_group_id,customer_number) ";
            $q .= "VALUES (".$user->id.", $vendor_id,".$vm_sgi.", ".$vm_cn.")";
         }

TO:

         $vendor_id = "1"; // *** fix up this hack!
         // *** working on this bit 20060712
         $q = "SELECT * FROM #__vm_shopper_vendor_xref WHERE `vendor_id`=".$vendor_id." AND `user_id`=" . $user->id;
         $database->setQuery($q);
         $database->query();
         $vm_sgi = $_REQUEST['vmart_shopper_group_id'];
         $vm_cn = $_REQUEST['vmart_customer_number'];
         if ( strlen($vm_sgi)==0 ) $vm_sgi="1";
         if ( strlen($vm_cn)==0 ) $vm_cn="''";
         if( sizeof($database->loadRowList()) < 1 ) {
            // Insert Shopper -ShopperGroup - Relationship
            $q  = "INSERT INTO #__vm_shopper_vendor_xref ";
            $q .= "(user_id,vendor_id,shopper_group_id,customer_number) ";
            $q .= "VALUES (".$user->id.", ".$vendor_id.",".$vm_sgi.", ".$vm_cn.")";
         }

mstookey

  • Beginner
  • *
  • Posts: 11
Re: Community Builder integration
« Reply #27 on: October 12, 2006, 17:30:32 pm »
hi-
I've been trying to get a virtuemart/cb integrated site going & i'm a little frustrated by the process of needing to register - then log in - then shop. OR shop - then get bumped out of shop to register - then told to login - then find my way back to shopping.

Are there any hacks available so that at least the registration process automatically logs you in to continue shopping?

Ideally i'd like to access the info from both the order - customer info direction as well as just let someone fill out a profile. But the order process right now seems a bit long and tedious.

Would love to hear if anyone has any suggestions/ hacks ...

thanks.

marilyn

Christopher Nielsen

  • Beginner
  • *
  • Posts: 2
Re: Community Builder integration
« Reply #28 on: November 10, 2006, 02:29:03 am »
I tried this and the plug in is nice that you can have the VM shipping info in CB. The bigger issue for me is that when a user trys to login from the shopping cart I get "you are not authorized to view this..."

I am using the CB login so when the user logs in from the CB login they are fine in the cart but it is very confusing to the users. Can the login  be turned off in VM to require the users to use the CB to log in first?

TwinStripe

  • Beginner
  • *
  • Posts: 13
Re: Community Builder integration
« Reply #29 on: November 22, 2006, 19:32:44 pm »
I'm actually using a renamed copy of the CB login script in place of the VM one - daft, but it works!