Registration via Jomsocial.

  • Posts: 61
  • Thank you received: 2
11 years 4 months ago #115148

Hi guys,

I am running a Jomsocial registration as my master registration. I want to add the HikaMarket Vendor Paypal Email Address to the registration. I know i can use custom fields however, it won't enter into the Vendor Registration. Is there a way I can code it into the registration form to avoid repetition and confusion for our end users? Maybe a plugin to force it into the joomla user portion of the form? I know this isn't a Hikashop thing but would be willing to pay for help on this one.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 4 months ago #115175

Hi,

Yes a little plugin will be the best solution.
HikaMarket uses triggers like HikaShop, so you will find the trigger " onBeforeVendorCreate(&$vendor, &$do) {} " which allow you to modify the vendor object before his creation (and you have the same thing for the "update").

The paypal email is stored in the "vendor_params" which is a serialize object.

public function onBeforeVendorCreate(&$vendor, &$do) {
	$hk_user_id = $vendor->vendor_admin_id;
	if(empty($hk_user_id))
		return;
	$userClass = hikamarket::get('shop.class.user');
	$hkUser = $userClass->get($hk_user_id);
	$cms_user_id = $hkUser->user_cms_id;
	//
	// Do your job with Jomsocial using the $cms_user_id
	//
	if(!empty($vendor->vendor_params))
		$vendor->vendor_params = unserialize($vendor->vendor_params);
	else
		$vendor->vendor_params = new stdClass();
	$vendor->vendor_params->paypal_email = '...'; // Set the email from jomsocial

	$vendor->vendor_params = serialize($vendor->vendor_params);
}
Hope it will help you !

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: xsbucks

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2
11 years 4 months ago #115387

Okay, i built the plugin with XML as well. Obviously little.

What i am trying to understand is how to get the Custom Field in registration, FIELD_PAYPALEMAIL in my Phpadmin to Join the s:12 paypal_email in the Vendor Market Reg.

Example,

Currently the vendor 'Joomla' Data Auto Populates the Vender Profile Form in the few fields.

I want to be able to do the same thing with the rest of Jomsocial Registration. I am willing to pay for it and also quite sure it will be a good integration.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 4 months ago #115441

Hi,

The paypal email is stored in a special "vendor_params" column which is a serialized PHP object.
That's why I made a

$vendor->vendor_params = unserialize($vendor->vendor_params);
before reading/writing the value and I made a
$vendor->vendor_params = serialize($vendor->vendor_params);
at this end to re-set the data in the right form for the database insert.

The Paypal Adaptive plugin read the paypal email from that field and if the field is empty, it will use the vendor email (column: vendor_email).
Otherwise, it is possible to see to modify the paypal adaptive plugin in order to read the paypal email value from another field (before the "vendor email").
So you will be able to create a vendor custom field and link this custom field (which will be a column in your database) with JomSocial.

After that, if you want a quote for a custom plugin, please send me your requirements by email (jerome at hikashop.com).

Kind regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 2
11 years 4 months ago #115548

Sent an email off.

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum