Hikashop User Points

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #245864

Hi,

I finally found time to enable and configure user points. All works fine.

However after searching I couldn't find some features or answers to my questions...

1. Is there a way to give user points on registration? If yes, how? Can this be done with mass action?
2. On product page I would like to add some custom code which, if user registered, would show how many points/worth amount he has and what price of that product would be if he use them. Is there a way to do it with custom code.

3. How can i echo how much points user will get if he buys this product?

4. Does acymailing has tags for hika user points? Couldn't find them....

5. "Points earning on groups" I am looking to use this feature later but how this would work if user is in 2 groups? Like "registered" and "Silver" and both has different values set. Which value will be used then?

6. I have used access level to limit "give points" to registered user only. Should I use "Access level" or "Looking into points earning on groups" for my needs? Or both do same?



Thanks

Last edit: 7 years 9 months ago by kyratn.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
7 years 9 months ago #245868

Hi,

1. If you use a custom user field to store the user points, then yes, a mass action with a trigger "on after user creation" with an action "update the values" on the user points column with the value you want should do the trick.
For other points systems, you'll have to seek advice with the points system support what they have for that.

2. and 3. You can do anything with custom code and enough time. Loading the points of the user and calculating the amount of points necessary based on the price of the product shouldn't be complex for a developer and the custom code can be added in one of the files of the "product" view.

4. No. The integration between HikaShop and AcyMailing doesn't support custom user fields. It would be an interesting thing to add.

5. The sum will be used then.

6. I'm not following you. What need do you have with the restriction of access levels ? Could you do some screenshots of the pages with the options you're talking about ?

Last edit: 7 years 9 months ago by nicolas.

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #245944

Hi,

2. and 3. Can I ask this to be added to TODO list? I think this would be great feature. I found that many sites use it. Mostly talking about 3.

5. So if user is in 2 groups. First has value 1, second 2 so it will be used 3? This is what you mean?

6. I want that only registered user could use points. So I have set access level for user points gain and user points payment to "registered"
But I also saw that there is "Looking into points earning on groups" settings. So if I use "registered" there with some value. Would it be same as access level?

7. Not related to points... How can i hide in checkout progress bar the last step? I dont want it to be displayed in progress bar during checkout. I have 5 steps but with this it looks like 6 steps...

Thanks

Last edit: 7 years 9 months ago by kyratn.

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

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
7 years 9 months ago #245960

Hi,

2&3 - We can add them in the TODO list but we can't provide any schedule for his implementation.

5 - Yes

6 - Please answer the Nicolas question for that point.
If you want more details for the "earning" part, you can check that documentation page :
www.hikashop.com/support/documentation/2...-points.html#earning

7 - Please use another thread for that.

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

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

  • Posts: 1119
  • Thank you received: 114
7 years 9 months ago #246227

Hi,

I am playing around with alpha user points component as I want to add more functionality for user points...

Right now I am using hikashop user points and all works fine. I do not have points payment visible in checkout and have added hikashop user points field in checkout flow. So buyer can choose to use points or not. However I cant get it to work like that with alpha user points.
In plugin "Hikashop UserPoints Plugin" I don't see availability to use alpha user points, only hikashop, alta and easysocial. So which one I should use?

Update. Found that i need to use altauserpoints. So all fine.

Thanks

Last edit: 7 years 9 months ago by kyratn.

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

  • Posts: 1119
  • Thank you received: 114
7 years 8 months ago #246698

Hi,

To email notification I would like to add something like this "You have received xx points with this order"
I use custom field user_points. I know how to show that custom field in email but how to show user points received based on order?
Is this possible?

Thanks

Last edit: 7 years 8 months ago by kyratn.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
7 years 8 months ago #246747

Hi,

You can edit the emails via the menu System>Emails with the Business edition.
The points received for AlphaUserPoints/AltaUserPoints with an order can be displayed like that in the HTML version:

<?php echo $data->cart->order_payment_params->userpoints->earn_points['aup']; ?>

The following user(s) said Thank You: kyratn

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

  • Posts: 1119
  • Thank you received: 114
7 years 8 months ago #246761

Hi,

Thank you Nicolas. This is what i was looking for.

Regards

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

  • Posts: 1119
  • Thank you received: 114
7 years 8 months ago #246790

Hi,

I just fount that alta user points can send email by it self so I don't need to include it to hikashop emails...
I have used code below in mod_login view to display how many points user has. After I switched to alta I cant find a way to show it...

if(!defined('DS'))
define('DS', DIRECTORY_SEPARATOR); if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;


$hkUser = hikashop_loadUser(true);
$Title = JText::_('');
$user = JFactory::getUser();
$groups = $user->groups;
if($user->id)  {
if (isset($groups[2])) echo '<a class="uservip gold"><i class="fa fa-star-o fa-lg" style="color: #ffd700;><span class="hika_user_points">','<span class="hk-user-points">',$hkUser->user_points,'</span>','</span></i></a>'

I clearly understand that this is not 100% related to hikashop but maybe someone could give me an example how could I load alta user points?

Thank you

Last edit: 7 years 8 months ago by kyratn.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
7 years 8 months ago #246820

Hi,

It is indeed not related to HikaShop... You're modifying the login module of Joomla and you want code to get the points from AUP. So you should ask that to the support of AUP. They should be able to tell you. I'm in a good mood today, and had some time to look at it, so here you go:

require_once (JPATH_SITE.DS.'components'.DIRECTORY_SEPARATOR.'com_altauserpoints'.DIRECTORY_SEPARATOR.'helper.php');
$user = JFactory::getUser();
$userInfo = AltaUserPointsHelper::getUserInfo('', $user->id);
echo (int)$userInfo->points;
Please contact AUP for further advise on AUP's API coding.

The following user(s) said Thank You: kyratn

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

  • Posts: 1119
  • Thank you received: 114
7 years 8 months ago #246830

Thank you Nicolas

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

  • Posts: 1119
  • Thank you received: 114
7 years 8 months ago #247181

Hi,

I have asked on altauserpoints forum but it looks like my question is more related to hikashop here.

In Altauserpoints I am trying to configure Rule named "Order_validation" It looks like it is coming from hikashop userpoints plugin. Inside email notification settings I have added template and used tags like "username", "points", "newtotal"
The problem is that it would send same email template for any order update and I cant have different text based on order. Example:
If I write something like: "You have gained 30 points with this order" then if order cancelled it will send same email but now with sum of points were used for that order which are credited back to account and it makes no sense....

So my question:
Is there a way to have different plugin function? Right now it is set to "plgaup_orderValidation"
So I could copy Rule and set different function for each Rule. Functions like orderCreated, order Cancelled would be welcome....

Or if it is not possible then how can I exclude email to be send only after order is created and no more?

Thank you

Last edit: 7 years 8 months ago by kyratn.

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

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
7 years 8 months ago #247186

Hi,

I am afraid that it won't be possible unless you want to modify the source code of the HikaShop user points plugins.
Regarding the plugins structure, changing the "AltaUserPoint rule" depending an externa event is something very complicated to do.
The plugins have a function to interact with point systems ; that function do not have any order context information, it just know the number of points to credit or debit.

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

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

  • Posts: 1119
  • Thank you received: 114
7 years 8 months ago #247251

Hi,

Thanks for replay. That's sad...

I will have to make my text user friendly for all messages somehow.

Thank you

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

  • Posts: 267
  • Thank you received: 5
3 years 8 months ago #323274

My question is about point 3.

I have made a modification of the product view to show the points that are earned with each product:

echo '<a href="soporte/informar-de-una-incidencia/faq/como-funcionan-mis-puntos-de-fidelidad-36" target="_blank"> ... ¡ y consigue '.(int)(($this->element->product_sort_price)*1.21).' puntos de fidelidad !</a>';

Where 1.21 calculates the tax.

The problem is when I use variants.

I use a variant that is "select options" by default, in my case it tells me that the points are zero, since all the variants that I use have the same price and those of the main product are published by default.

I would like to know can you give the value of the main product to the variants through mass action, I have not been able to find it.
Or if there is some way to automate it.

Thanks and kind regards.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 8 months ago #323300

Hi,

On a product with variants, $this->element->product_sort_price will be zero as $this->element is the data of the default variant and variants don't have a sort price.
Instead you can use $this->element->main->product_sort_price for products with variants.
So you'll want something like that:

$sort_price = $this->element->product_sort_price;
if(!empty($this->element->main->product_sort_price))
 $sort_price = $this->element->main->product_sort_price;
echo '<a href="soporte/informar-de-una-incidencia/faq/como-funcionan-mis-puntos-de-fidelidad-36" target="_blank"> ... ¡ y consigue '.(int)(($sort_price)*1.21).' puntos de fidelidad !</a>';

The following user(s) said Thank You: dvddvd

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

  • Posts: 267
  • Thank you received: 5
3 years 8 months ago #323315

¡Great!, tanks

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

  • Posts: 267
  • Thank you received: 5
3 years 3 months ago #327806

Hello Nicolas,

When posting offers, I have noticed that the above code shows the original price without discount. Therefore, the user points that it shows are not those that actually correspond when the product has a discount.
How can I get the discounted price for sale products to be displayed?

Kind regards, thank you very much and happy Christmas!

$sort_price = $this->element->product_sort_price;
if(!empty($this->element->main->product_sort_price))
 $sort_price = $this->element->main->product_sort_price;
echo '<a href="soporte/informar-de-una-incidencia/faq/como-funcionan-mis-puntos-de-fidelidad-36" target="_blank"> ... ¡ y consigue '.(int)(($sort_price)*1.21).' puntos de fidelidad !</a>';

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
3 years 3 months ago #327815

Hi,

The sort price doesn't take into account the discounts as that's a price which is stored in the backend.
If you want to use the price with discount and with taxes then you'll want to use instead:

$sort_price = @$this->element->prices[0]->price_value_with_tax;
if(!empty($this->element->main->prices[0]->price_value_with_tax))
 $sort_price = $this->element->main->prices[0]->price_value_with_tax;
echo '<a href="soporte/informar-de-una-incidencia/faq/como-funcionan-mis-puntos-de-fidelidad-36" target="_blank"> ... ¡ y consigue '.(int)(($sort_price)*1.21).' puntos de fidelidad !</a>';

The following user(s) said Thank You: dvddvd

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

  • Posts: 267
  • Thank you received: 5
3 years 3 months ago #327832

Thanks Nicolás, the solution is perfect !.
I see that alpha user pionts are no longer used in hikashop and that alta user points have not been updated in the developers' website for years.
Is it still possible to use them to be able to see the history of points obtained by each user?
Or is there a way to do it from hikashop user_points?

Thank you, best regards and happy new year

Last edit: 3 years 3 months ago by dvddvd.

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

Time to create page: 0.089 seconds
Powered by Kunena Forum