Custom purchase rules (or Access level exclusions)

  • Posts: 195
  • Thank you received: 5
11 years 4 months ago #151940

-- HikaShop version -- : 2.3.0 Business
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.3.28

Is there any way to set-up 'purchase rules' so that:

Product B
- only displayed to users who have purchased Product A

Product C
- displayed but only available for purchase if user has already purchased Product B OR has it in the cart


If that sort of rule configuration isn't possible, then is there a way to display items to all Access Level groups EXCEPT a certain one?
i.e.
Access Levels:
Public
- Guest
Registered
- Member A
. Member B

How to display a product to a 'Guest' OR 'Registered', but NOT to 'Member A' or 'Member B'
(If I select 'Guest' and 'Registered' those that are in the 'Member A' and 'Member B' groups also see it. And it is not possible, due to other configurations of the site, to move 'Member A' and 'Member B' out of the 'Registered' group)

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

  • Posts: 26270
  • Thank you received: 4044
  • MODERATOR
11 years 4 months ago #151948

Hi,

HikaShop have a plugin called "group after purchase".
So you can set a specific group to a customer after the purchase of your product A.
So the group will allow him to buy the product B.

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: 195
  • Thank you received: 5
11 years 4 months ago #152179

Yes, I'm aware of that plugin and use it for other needs.
However, that doesn't solve the problem raised here.

I need to display a product to users who have NOT purchase a certain product (i.e. new 'guest' user) but do NOT display it for those who have.

There's no way to do this within the present ACL restriction system.

See the 2nd part of my original question.

If we had some more 'robust' ACL checking (i.e. NOT, OR, etc.) then this would work.

I'm guessing that this just isn't possible right now ?



BTW ... here's the present use-case:

3 Products:
- New Subscription
- Renew Subscription
- New Lifetime Subscription
- Upgrade to Lifetime Subscription

How to make it possible that:
- the 'New Subscription' is only displayed to users who have never purchased a subscription before (or who aren't logged in)
- the 'Renew Subscription' is only displayed to users who have purchased the 'New Subscription' OR 'Renew Subscription' (but not 'Lifetime Subscription")
- the New Lifetime Subscription is visible only to users who have never purchased a subscription before (or who aren't logged in)
- the Upgrade to Lifetime Subscription is visible only to those who have purchased a New Subscription or a Renew Subscription

As this is probably a common configuration (esp. for those who sell subscription-based items) it would be great to have a good solution that works and displays the correct items to the correct people.

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

  • Posts: 84290
  • Thank you received: 13692
  • MODERATOR
11 years 4 months ago #152199

In that case, you could change the line:
$userGroups[] = $oneProduct->product_group_after_purchase;

to:
$userGroups = array($oneProduct->product_group_after_purchase);

in the file plugins/hikashop/group/group.php
and instead of adding the user to a group, it will add the user and remove it from his previous group.
That way, the user is always in one group. either:
guest (not logged in)
registered (logged in without any purchase)
subscriber (logged in and purchased a subscription)
lifetime subscriber (logged in and purchased a lifetime subscription)

Then simply assign the products to the groups where you want the user to see the products and it should work like you want.

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

Time to create page: 0.051 seconds
Powered by Kunena Forum