Skip to main content

Get User Points Issue

More
10 years 5 months ago #238869 by ralph024
-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5.34

When a customer wants to pay with the user points, it works perfectly!
But a customer without any points, did not recive any points after a successful checkout and payment.
what could be the problem?

Thanks for youre time!

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

More
10 years 5 months ago #238911 by nicolas
Replied by nicolas on topic Get User Points Issue
Hi,

Wouldn't the problem come from the "give points when using some" setting which is configured to "don't give" ?

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

More
10 years 5 months ago - 10 years 5 months ago #238915 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi,

no because when use "Give on full price" it still doesnt work!
and correct me if i am wrong, but the "give points when using some" setting: "don't give" is:
When a customer redeems points, he will not receive new user points ?

But it only works when i give the user points from the backend, then you see that the database is updated.
At this moment I do not know what is going wrong!
Last edit: 10 years 5 months ago by ralph024.

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

More
10 years 5 months ago #238919 by nicolas
Replied by nicolas on topic Get User Points Issue
Hi,

So is the problem that you only get points when you use points ? Or that you only get points for some products and not others ?
If that's the later case, then it's easy. It's just that the products for which you don't get the points must not be linked directly to the categories that you selected in the "Products categories" setting of your plugin.

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

More
10 years 4 months ago - 10 years 4 months ago #238962 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi,

No i tried everything but after checkout i dont recieve any points.
I tried all the settings from "give points when using some" but nothing seems to work..
Last edit: 10 years 4 months ago by ralph024.

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

More
10 years 4 months ago #238971 by ralph024
Replied by ralph024 on topic Get User Points Issue
In step 3 with the payment option, it shows me that i can earn 24 points ( see attachment 1 )
But after a successful checkout and payment, nothing happens and i get no points.

Maybe its something in my Checkout or Order settings? ( see attachement 2 + 3 )

Thanks

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

More
10 years 4 months ago #239339 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi,

is there still no solution to my problem?
This is a standard option that should work right?

I really tried all kinds of settings, but nothing works!
I can give you the backend credentials, maybe you can see what is going wrong with User points

Thanks.

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

More
10 years 4 months ago #240400 by ralph024
Replied by ralph024 on topic Get User Points Issue
After e-mail contact, we will wait for a solution!
hopefully there is a short -term solution to this problem?

Thanks

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

More
10 years 4 months ago #240565 by Jerome
Replied by Jerome on topic Get User Points Issue
Hi,

It looks likes I'm the only one with enough knowledge on the User Points system ; but unfortunately I'm not in the HikaShop support team.
It's a shame because I already gave the answer several time in the forum.

Your setting "invoice order statuses" is empty and that's the source of your issue.
The "invoice order statuses" setting is there to indicate for which order statuses an order is considered as paid ; so when HikaShop have to generate an invoice number.
If that setting is empty, the "user points" fallback on hard coded settings.
It is also possible to set your own order statuses for the plugin, in the Joomla settings you have a field called "valid order statuses". But the best is generally to use the "invoice order statuses" setting.

In order to check what points the user gains for an order ; you can check in the database.
In the table order, for the field "order_payment_params" you can find a serialized object and the "user points" plugin will store some data under "userpoints", like a values for "earn_points" or "use_points".
This data is used by the plugin in order to know what it should give (or take back) to the user when the order status is changing (from a non confirmed status to a confirmed one ; or the inverse).

To do so, the plugin needs to be triggered and it's done when you edit the order in the backend or when the payment plugin is modifying the order (using HikaShop system to right trigger the events).

Now if the order status modification is right catch by the plugin ; the plugin will add points to the user.
The problem is that, if the user do not have any value for the "user_points" ; the plugin needs to detect the non existing value and set a default start value.
But to not generate SQL errors ; the plugin can not set a value if the field does not really exist in the database ; that's why we have a check
Code:
if(!isset($oldUser->user_points) && !in_array('user_points', array_keys(get_object_vars($oldUser)))) return false; if(empty($oldUser->user_points)) $oldUser->user_points = 0;
Few years ago we had an issue on the previous check which was not working right on some PHP versions ; that's why we improve the check to not just check if the field "isset".
But that kind of check should be done when you're sure that the previous steps are working.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: ralph024

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

More
10 years 4 months ago #240637 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi Jerome,

Thanks for youre great explanation!
I followed all the steps, and also add a valid "invoice order statuses". After a purchase the user points are correctly take back from the user.

But when the order statuses changed, the user will get some points again. i dont now why, because i selected the option "Don't give points when using some" in the uerpoints plugin.

So something is still going wrong with the userpoints.

Thanks

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

More
10 years 4 months ago #240672 by Jerome
Replied by Jerome on topic Get User Points Issue
Hi,

Please be sure that the order has been made when the setting was right configured.
In the "order payment params", the plugin "user points" store the state of points ; what the user spent and what the user will gain.
It means that if you change the plugin configuration ; the points are already processed and the same values will be removed or credited to the user.

Regards,

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

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

More
10 years 4 months ago - 10 years 4 months ago #240729 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi Jerome,

I'm sure that the order had been made when the settings are right configured.
I just tried it again, first made all the correct settings and then place an order. But unfortunately the user still get points when the user spent the points.

I also tried to start over with the settings and the user points.
* So first i removed the Custom Field "user_points"
* Configured the right settings in System -> Configuration -> Order -> Invoice order statuses (See invoice order status.jpg)



* Create a new Custom Field "user_points" (See custom field.jpg)



* At this time, all customers have no points
* A user creates an order and recieves his points (For example 11 points for 11€) So far so good!
* When the same user spent his points, he will get a discount for that 11 points but still retains his points after a successfull checkout and payment.
* This is strange because the settings of the user points plugin (System -> Plugins -> Userpoints) are at the Specific configuration: Give points when using some "Don't Give" (See give points when.jpg)




I don't get it, even when I start over, it does not work.
Last edit: 10 years 4 months ago by ralph024.

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

More
10 years 4 months ago #240868 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi,

someone who can help me with this annoying problem?

Thanks

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

More
10 years 4 months ago #241468 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi,

Is there no one who can help me with this problem? Or can give me advice how I can get this done with Alphauserpoints?
I bought the business HikaShop, I expect at least some support! Especially on an existing function of HikaShop, which actually should work.

This takes a long time now!

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

More
10 years 3 months ago #242241 by Jerome
Replied by Jerome on topic Get User Points Issue
Hi,

It looks like there is one of the patches I submitted (May 2016) has not been integrated into the current release.
In the file "plugins/hikashop/userpoints/userpoints.php"
Please replace
Code:
if(!empty($this->plugin_params->notgivewhenuse) && (int)$this->plugin_params->notgivewhenuse == 1 && !empty($order->additional['userpoints']))
By
Code:
if(!empty($this->plugin_params->notgivewhenuse) && (int)$this->plugin_params->notgivewhenuse == 1 && (!empty($order->additional['userpoints']) || !empty($order->cart->additional['userpoints'])))
And I guess that's the main reason why I couldn't reproduce the issue.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
The following user(s) said Thank You: ralph024

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

More
10 years 3 months ago #242489 by ralph024
Replied by ralph024 on topic Get User Points Issue
Hi Jerome,

Thanks for the effort! It works now finally :woohoo:
Thanks again for the service... ;)

Regards

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

Time to create page: 0.305 seconds
Powered by Kunena Forum