Skip to main content

Product with variants do not gain userpoints

More
10 years 1 month ago #248424 by haur0214
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.2
-- Browser(s) name and version -- : Google Chrome

Hi support,

We set up a User point plugin in Hikashop and the setting is 1MYR to 1 point.
We tried to checkout two products -
product A with no variant and product B with variant.

When the order has confirmed,
we took a look at AUP activities and we found that user can only receive product A's point but no point from product B.
Both products are set into two categories - Dress and Skirts.

We hope to hear from you soon.
Thank you.

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

More
10 years 1 month ago - 10 years 1 month ago #248429 by nicolas
Hi,

Try changing the line:
if((int)$category->product_id != (int)$product->product_id)
to:
if(!in_array((int)$category->product_id , array((int)$product->product_id, (int)@$pids[$product->product_id]->product_parent_id)))
and the line:
$pids = $db->loadObjectList();
to:
$pids = $db->loadObjectList('product_id');
in the file plugins/hikashop/userpoints/userpoints.php
Last edit: 10 years 1 month ago by nicolas.

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

More
10 years 1 month ago #248468 by haur0214
Hi Nicolas,

Thank you for your reply.
I edited the code as you said, but it is still not working as expected.
:( :(

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

More
10 years 1 month ago #248474 by nicolas
Hi,

Then try changing instead the line:
if((int)$category->product_id != (int)$product->product_id)
to:

if((int)$category->product_id != (int)$product->product_id && (int)$category->product_id != (int)$product->product_parent_id)
The following user(s) said Thank You: haur0214

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

More
10 years 1 month ago #248615 by haur0214
Hi Nicolas,

Thank you!
This one works fine!
Will this plugin get fix after next hikashop update?

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

More
10 years 1 month ago #248627 by nicolas
Yes. We'll add the patch for that in the next release.

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

More
10 years 1 month ago - 10 years 1 month ago #249315 by haur0214
Hi,

It seems the problem still exists.
We have already upgrade our hikashop to 2.6.4 but products with variants still unable to gain user point.
Attachments are the settings of products and userpoint plugin.
Please guide us. :) :)

Thank you.
Last edit: 10 years 1 month ago by haur0214.

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

More
10 years 1 month ago #249334 by nicolas
Hi,

How is that possible ? We've added the patch exactly like I gave it to you, and you said it worked. So I don't see why it would be any different with the 2.6.4.
You can check the file, you should find the line:
if((int)$category->product_id != (int)$product->product_id && (int)$category->product_id != (int)$product->product_parent_id)

I actually don't see why it wouldn't work with that patch. Did you modify other things previously in that file with the 2.6.3 ?

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

More
10 years 1 month ago #249371 by haur0214
Hi Nicolas,

No I did not modify the file on live site. I test the code on my localhost.
I upgrade my live site once 2.6.4 release.
It works fine when we did not set product categories on user point plugin.
But when we set few categories into it, products with variants not working again.

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

More
10 years 1 month ago #249420 by Jerome
Hi,

I am not able to reproduce your issue using the "HikaShop user point" plugin on my local website.
The plugin have filter on product categories and I have a variant in my cart ; I can see the number of point change depending the variant product quantity in my cart.

Do you have the block "user points" in your checkout workflow ?
Are you able to reproduce the issue in our demo website ?

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 1 month ago #249682 by haur0214
Hi Jerome,

We selected Alphauserpoint as the point mode so we are not able to try out on hikashop demo website.
The userpoint payment method and userpoint plugin are both published.
As you can see the images attached shows that SF00298 only assign 18 points for the user but the order contains two products with different prices - 18 and 30.

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

More
10 years 1 month ago #249688 by Jerome
Hi,

And regarding your previous screenshots, I have to deduce that TP00126 is a variant ; right ?

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 1 month ago #249764 by haur0214
Hi Jerome,

Soory for the lack of information in last reply.
DS00104_粉红色 is a variant which does not give point in this order.
TP00126 is not a variant.

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

More
10 years 1 month ago #249831 by Jerome
Hi,

And what are the categories of the main product of the "DS00104_粉红色".
Why do you not have a default variant for that product ?
How your categories are configured ?

Did you try to just use one category in the "user point" plugin so, instead of selecting a lot of categories you can choose if the product will give points or not by placing the product in a specific (and hidden) category.

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 3 weeks ago #250134 by haur0214
Hi,

The product categories of "DS00104_粉红色" is Top and New Arrivals.
These 2 categories are under another category which call "Type".
So the category flow is like Root -> Product Category -> Type -> Top.

We also set a default variant to test and it still not working.

We select a lot of categories because we do not want some of the categories under "Type" to give point.
We also tried to select only "Type" this category but the result is still the same.

Regards,
Haur

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

More
10 years 1 week ago #251573 by nicolas
Hi,

Sorry for the delay. We found the issue and added a patch on our end. Download the install package on our website and install it on yours and it will fix the problem.
The following user(s) said Thank You: haur0214

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

Time to create page: 0.281 seconds
Powered by Kunena Forum