multiple item by order to add multiple access groups

  • Posts: 3
  • Thank you received: 0
9 months 3 weeks ago #299678

-- url of the page with the problem -- : ecnimagerie.fr
-- HikaShop version -- : 4.0.0
-- HikaSerial version -- : 2.2.0
-- Joomla version -- : 3.8.13
-- PHP version -- : 7.2
-- Browser(s) name and version -- : Chrome 69.0.3497.100
-- Error-message(debug-mod must be tuned on) -- : missing groupe

Hello all,

I have a problem, but I do not know if it is the result of a configuration problem or a constraint on the product "HikaSerial".
I use hikaserial to sell access to my website. Indeed, a user can buy 1 or more access to different levels of the site.
it can for example buy the product in Hikashop named "I-Module Orthopedic", the product is connected to a plan that activates the subscription.
the subscription assigns a group to the user for a defined time.

My problem is:
If a user buys 2 products at the same time having 1 different plan: Example: I buy Orthopedic I-Module (which assigns the Orthopedic group for 12 months) + neurological i-module (which assigns Neurological group for 12 months) all pass well rated Hikashop. but the user has only one of the two assigned groups.

I do not understand why. moreover we see in the "Subscription" that the 2 subscriptions are active.

on my website:
1 article Hikashop = 1 plan = access to a group
the user can buy several items at the same time
I would like it to add all the groups at once.

thank

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

  • Posts: 23611
  • Thank you received: 3666
  • MODERATOR
9 months 3 weeks ago #299709

Hello,

Thanks for that report ; We will have to reproduce the issue in our end to perform a real investigation.
Do you have seen such kind of issue if a customer bought two subscriptions in two different orders ?
Like that, by checking the code I don't see any problem but it might be possible that the Joomla cache is not refreshing so when the second subscription is handle by the "group subscriber" plugin, it do not see the modification made just before.. That the first idea I have in mind... But I would need some details and test to confirm it (and find an appropriate patch)

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: 3
  • Thank you received: 0
9 months 3 weeks ago #299742

do you want access to the website to test?
I have concrete examples on the site where a user has ordered 2 articles (representing 2 distinct subscriptions) without having the two joomla group of attributed.

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

  • Posts: 23611
  • Thank you received: 3666
  • MODERATOR
9 months 3 weeks ago #299744

Hello,

I do not need to see the problem in your website, I trust you.
But in order to investigate, I need to reproduce it ; so I need some details about your settings.
As I wrote, we need to reproduce it in our end ; not in your website but when in one of our own, where we can do some full debug.

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: 3
  • Thank you received: 0
9 months 3 weeks ago #299837

Hi,

please see attachments

do you need other information ?

Attachments:

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

  • Posts: 23611
  • Thank you received: 3666
  • MODERATOR
9 months 3 weeks ago #299857

Hello,

In the plugin "plugins/hikaserial/groupsubscriber/groupsubscriber.php" you will find the line 4 times :

$userGroups = JAccess::getGroupsByUser($user_id, true);
You need to past that line just before each of them
JAccess::clearStatics();
It would force the clean of the cache so the function will get the user groups from the database and not from its session.
Otherwise, when the plugin change the groups for the first subscription, during the second subscription Joomla give him the old group list and the previous modifications are lost.

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.

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