Limit affiliates to product categories

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
1 month 3 days ago #368185

The ability to limit affiliates to product categories or individual products would be very useful.
So the affiliate would only receive a fee for selling a product from a specific category or individual product.

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
1 month 2 days ago #368199

Hi,

Thanks for your feedback. We'll be looking at adding this.

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

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
1 week 11 hours ago #368431

In new 6.10 there is new feature:
There is now a "Affiliation category restriction" setting which allows you to restrict affiliation to only some categories of products.

This probably isn't that feature?

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
1 week 7 hours ago #368433

Hi,

This indeed is that feature.
Why would you think it isn't ?

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

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
1 week 5 hours ago #368440

"So the affiliate would only receive a fee for selling a product from a specific category or individual product."
This means that each partner should have an individual filter. Now the option is only global for all partners.
Maybe we didn't understand each other very well ;)

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
6 days 14 hours ago #368443

Hi,

I indeed didn't understand it like that. I understood it like you didn't want some products to generate affiliate fees, and thus, that you wanted to restrict the affiliate fees to only some specific categories.

We'll be looking at adding an override for individual partners.

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

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
5 days 13 hours ago #368484

Thank you
I tried the new category restriction and I'm not sure if it works.
I selected xy category in the category restriction field. The partner sold the product (from that category), but no commission was calculated. Is this setting inclusive or exclusive?

Last edit: 5 days 13 hours ago by mojweb.

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
5 days 8 hours ago #368485

Hi,

It is inclusive, as you understood it. So what you describe would indeed indicate a problem.

Did the product had several categories in its "categories" setting ? Did the product had variants ?

I've looked into it for a bit after your feedback, and I think I know what the problem is. There is a typo in the new code.
Change the line:
foreach($order->cart->order_products as $product) {
to:
foreach($order->cart->products as $product) {
in the file plugins/system/hikashopaffiliate/hikashopaffiliate.php and try again. It should hopefully work fine then.
We'll be including the patch on our end.

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

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
4 days 10 hours ago #368514

Yes, product has several categories. No variants.
Will check.
The same row was throwing php warning:
PHP Warning: foreach() argument must be of type array|object, null given in /plugins/system/hikashopaffiliate/hikashopaffiliate.php on line 273

Last edit: 4 days 10 hours ago by mojweb.

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

  • Posts: 389
  • Thank you received: 19
  • Hikashop Business
4 days 6 hours ago #368519

Same result. I changed the file but affiliate do not get commision when category filter is selected. So still not working.

Last edit: 4 days 5 hours ago by mojweb.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum