Generate serial from email address?

  • Posts: 3
  • Thank you received: 0
9 years 5 months ago #180008

-- HikaShop version -- : 2.3.4
-- HikaSerial version -- : 1.8.5
-- Joomla version -- : 3.3.6

I need to port an existing shop to hikashop, and for this I need to generate a license key based on the customer's email address. Is this possible?

Thanks,
Stefan

Last edit: 9 years 5 months ago by Stenzel. Reason: typo

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
9 years 5 months ago #180019

Hi,

The "generate" function of the HikaSerial generator plugins have in his parameters the order object.
Thanks to the order object, you can have the "$order->order_user_id", so you can access to the user email by loading the HikaShop user.

$userClass = hikaserial::get('shop.class.user');
$user = $userClass->get( $order->order_user_id );
$user->user_email;
www.hikashop.com/support/documentation/1...er.html#fct_generate

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.

Moderators: Obsidev
Time to create page: 0.056 seconds
Powered by Kunena Forum