VirtueMart Integration?

13 years 3 months ago #20416 by yupio
help... I cannot change the shopper group (no shopper shows up) in CB admin for each users.

The shopper group start showing once I go into Virtumart admin screen for user management. (I cannot actually change the shopper group in Virtuemart, however)

What am I doing wrong? I am using the latest plugin 0.1.5/Virtumart 1.06, Joomla 1.0.10

Thanks for your attention and support in advance...
13 years 3 months ago #20543 by ben_emo
yupio: Thanks for that report - definitely looks like a bug! I think maybe it became introduced in VM 1.0.5, I don't actually use these admin functions much so probably forgot to test them on the newest VM. I'll post a bug report on the forge and get onto this ASAP.

Thanks!
13 years 3 months ago #20693 by yupio
I figured out what was going on... Seems like a minor coding error. (missing ' " ', etc...)

line 223 of Virtuemart.php (plubin):

$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;
$vm_cn = $_REQUEST;
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;
$vm_cn = $_REQUEST;
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.")";
}

----
this is assuming default shopper group is "1"
Thank you :)

---
I hope this helps...

Post edited by: yupio, at: 2006/09/11 01:52
13 years 2 months ago #22511 by mstookey
hi-
I'm looking for any suggestions or hacks related to a CB/virtuemart integration which would automatically log a customer in during the CB registration process.

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 ...

thanks.

marilyn
13 years 2 months ago #22532 by robidigital
It also frustrates me when - Shopping -> Checkout -> Register -> Login -> Checkout -> Finished. :blink:

Wish you could be redirected back to the Cart after registering and logging in.
13 years 2 months ago #22538 by pjoomla
Do you have the Joomla setting 'Use New Account Activiation' set to 'No'? If set to 'No', then the flow is like this:

shop -> checkout -> register -> back to the next checkout step

or, if you are already registered:

shop -> checkout -> login right there -> back to the next checkout step

You only have to login after registering if you require new account activation through email.

The difficulty is if you need extra CB fields to be filled out that are not included in your VirtueMart registration process. You'd have to add custom fields to VirtueMart's registration to handle this and use them to populate CB's fields. In the next full release of VirtueMart, 1.1, VirtueMart will be able to handle custom fields the same way that CB does now. So, adding new fields will at least be easier.
Moderators: beatnantkrileon
Time to create page: 0.418 seconds

Facebook Twitter LinkedIn