Automatic Coupons - Assign to Specific User

  • Posts: 51
  • Thank you received: 2
  • Hikashop Business
3 years 10 months ago #328588

Hi,
I have configured a Coupon Pack which creates a product category specific, time limited coupon.
The coupon is set to automatically load if possible.

So far - perfect!

The trouble is, the coupon needs to be assigned to the purchasing user and I don't seem to be able to find the right settings to enforce this.
I have changed the Pack settings (I've tried various options, but currently have:
Unlimited Qty: Y
Consumable: Y
Consume will check: Y
Websvc Access: N
No User Assign: N <-- Not "No User Assign" (double negative) should mean "Assign to User" shouldn't it?
Random: N

The No User Assign doesn't seem to make any different - I've had another user add products to their cart and they automatically get *my* coupon assigned.

Where am I going wrong here?
Many thanks,
Oliver

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 10 months ago #328602

Hello,

The configuration for the generation of the "coupon" is related to the "coupon generator".
There is no setting in the pack settings to change that.

The user assignation is not available in the current version of the coupon generator ; it has not be requested before since the coupon code is random and only the user know it in its order configuration email (and can be use only once if you configure the "coupon template" accordingly).
www.hikashop.com/support/documentation/1...ugins-coupongen.html

But if you really need to have a user assignation on the coupon generator ; it is something we can add in your TODO list for future improvements.

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: joomleb

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

  • Posts: 51
  • Thank you received: 2
  • Hikashop Business
3 years 9 months ago #328705

Hi Jerome,
It's a shame that isn't already supported - so - yes, if I could request that as a future feature, I think it would be a better user experience to have a discount coupon automatically add to cart if it's available (and still "in date").
We'll just have people do it manually for now.
Thanks,
Oliver

The following user(s) said Thank You: joomleb

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 9 months ago #328728

Hello,

Can you please describe your "need" regarding that auto-coupon you want to generate for your customers ?
I want to fully understand what you want to implement in order to see what can be done.
Generally, HikaSerial users want to create a coupon with the same price than the bought product ; so they can sell "gift cards" (And gift cards do not require a user restriction).

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: 51
  • Thank you received: 2
  • Hikashop Business
3 years 9 months ago #328746

Hi Jerome,

By "need" I assume you're talking about "requirements gathering"? ("need" is possibly a bit strong here!)

The use case is:
We sell software modules - each module purchase generates a key which is delivered to the customer. This part of the process is fine (we use custom fields to collect customer info and a custom serial generator for this).

We would like to offer discounts to customers for qualifying products (products that are listed under a specific, unpublished, category) where they are awarded a time-limited (e.g. 30 day) coupon code that will give them a percentage discount on a future purchase. We're using the canned coupon generator plugin with a specific product category, a time limit and a single use quota.

At the moment, this serial is attached to the qualifying order and the user will have to (a) remember they have a coupon and (b) apply it manually at their next purchase.

I would prefer that the coupon could automatically apply to the next purchase. This would require the original user being assigned to the new coupon at generation. This currently doesn't appear to be possible.

Request: Could the coupon serial generator please add the purchasing user to the generated coupon so that we can enable "automatically apply" and have the whole process "hands free" from the customer's perspective?

I hope that makes sense.
Oliver

The following user(s) said Thank You: Jerome

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 9 months ago #328773

Hello,

Try to replace that code

	$result = $discountClass->save($data);
By
	$data->discount_user_id = !empty($order->order_user_id) ? $order->order_user_id : @$order->old->order_user_id;
	if(empty($data->discount_user_id))
		unset($data->discount_user_id);
	$result = $discountClass->save($data);
In the plugin hikaserial/coupongen/coupongen.php

It would copy the order user ID into the generated coupon.
If it suits your needs, I'll add a new setting in the plugin to enable that assignation.

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: 461
  • Thank you received: 36
3 years 8 months ago #330344

Hi guys,
@Jerome +1 about the "User assignation coupon" that could be really useful like in this case
and would be great to have the AcyMailing 7 integration, to be able to send the assigned coupon to the user directly by email...

Please, Do you have any plan for it ?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 8 months ago #330354

Hello,

The feature has been implemented and will be in the next release.

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: joomleb

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

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