No user points added after confirmed order

  • Posts: 7
  • Thank you received: 0
9 years 7 months ago #196009

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- Browser(s) name and version -- : Chrome

I have created:
- the custom field user_points
- a product inside category "credits"
- a new plugin userpoint, published with the following parameters:



When i try to buy a product inside category "credits" no points are added to the user.

Thanks

Attachments:
Last edit: 9 years 7 months ago by bpm.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #196034

Hi,

It might be a bug of the 2.4.0. Could you try the fix of this thread:
www.hikashop.com/forum/payment-methods/8...n-in-2-4.html#194548
It might help solve the problem.

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

  • Posts: 7
  • Thank you received: 0
9 years 7 months ago #196117

My plugins/hikashoppayment/userpoints/userpoints.php has not the line commented on your link.
I have installed hikashop 2.4.0 downloaded on 2015-03-24 that fix a problem on tags, probably you have just fix also the problem on userpoint payment plugin.

But my problem is not on payment but on user points generation. After purchase no points are added to user.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #196159

Hi,

Please provide more details about your configuration.
It could be a lot of things, like :
* The plugin "hikashoppayment / userpoints" not published
* A custom field with the wrong name (even if you write it right here ; a lot of people just forgot the "_" in the custom field namekey)
* An order status which does not give the points to the user (and the user will have his points later with a correct order status according to your hikashop/plugin configuration)
* A problem in the algorithm which just have to process the points per category and not a conversion rate (it should work but it's still possible that there is a problem ; there is still an old algorithm that I want to exterminate)

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: 7
  • Thank you received: 0
9 years 7 months ago #196267

Hi Jerome, thank's for your help.
The user point custom field is correct (if I manually set user points for users from admin page I see correct user points on checkout page and users can use them to pay products). So the payment part is ok.
When I select a credit product on checkout I see a message as "You can earn 100 points with this order" so I belive that a credit product is set correctly to generate user points. But after transition (status confirmed, but i try also to set shipped status) no points are credit to users.

What details do you need about my config?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #196282

Hi,

in order to know if the plugin right process the points, the easier is to check in your database; the table "hikashop_order" have a column "order_payment_params" where you should see the points data, like:

O:8:"stdClass":1:{s:10:"userpoints";O:8:"stdClass":2:{s:10:"use_points";i:0;s:11:"earn_points";a:1:{s:2:"hk";d:12;}}}

You also have to check that you right have the latest package/fixes for the plugin "hikashop / userpoints" ; specially for the line
if(!isset($oldUser->user_points) && !in_array('user_points', array_keys(get_object_vars($oldUser))))
Which was in the previous version
if(!isset($oldUser->user_points) && !in_array('user_points', get_object_vars($oldUser)))

You also have to check your HikaShop configuration for the setting "Invoice order statuses" and the setting of the plugin "hikashop / userpoints" in the Joomla part for the setting "Valid order statuses" (which should be empty if "invoice order statuses is right configured" for points compatible statuses).

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: 7
  • Thank you received: 0
9 years 7 months ago #196395

Hi Jerome, problem solved. I checked "Invoice order statuses" as you suggest and it was blank. Now user points are credit but with an other problem.

When I set "Points earning on categories" no points are credit. I found a probably bug on hikashop/userpoints/userpoints.php at line 383:

$this->_makeLevel($all_category_ids[$id->product_id], 0, $sub_categories);
the _makeLevel function return always an empty array.

I commented the _makeLevel foreach and the
break 2;
in the following foreach and now it is ok (also summing points between multiple categories). I have not test with subcategories.

Last edit: 9 years 7 months ago by bpm.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 7 months ago #196417

Hi,

Thanks for the report.
It is not the first time that I want to rewrite this algorithm for the "points per categories" and I know that Xavier worked on a little re-factoring. I will see with him how his modifications progressed and we will update the plugin.
I rewrote a big part of the plugin but some code/features are still coming from the old "alphauserpoints" plugin.

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

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

Time to create page: 0.092 seconds
Powered by Kunena Forum