Account created on 20 July 2011, about 13 years ago
#

Merge Requests

Recent comments

πŸ‡©πŸ‡ͺGermany ktpm

#10 also fixed it for me, with the same code as #33. I seem to have missed that before!

πŸ‡©πŸ‡ͺGermany ktpm

For anyone stumbling on this:

Until this is fixed someday, you can override the file path(s) of the library in your theme's info.yml:

libraries-override:
    fiu/magnific:
    js:
      /libraries/Magnific-Popup/dist/jquery.magnific-popup.min.js: /libraries/magnific-popup/dist/jquery.magnific-popup.min.js
    css:
      theme:
        /libraries/Magnific-Popup/dist/magnific-popup.css: /libraries/magnific-popup/dist/magnific-popup.css

Reference: https://www.drupal.org/node/2497313 β†’

πŸ‡©πŸ‡ͺGermany ktpm

Change merged in current dev. Thanks!

πŸ‡©πŸ‡ͺGermany ktpm

I'm still getting

commerce_order_report entity type :
The Address field needs to be updated.

with patch #30.

πŸ‡©πŸ‡ͺGermany ktpm

This is precisely what we're doing?

Yes, but only in update hook, where it's shown once. I thought about a message repeatedly shown in the backend, e.g. when editing a pricelist.

πŸ‡©πŸ‡ͺGermany ktpm

Do you need a schema with this constraint at all?

If yes: Since you cannot decide which of the duplicates should be removed, maybe you could provide a form, that can be submitted once, if the conditions for setting the schema are met. But I don't know if there are best practices for adding schemas afterward, like in this case.

But maybe it's sufficient to display a message like "We have duplicates detected, please check" and let the user deal with it? Just a thought.

πŸ‡©πŸ‡ͺGermany ktpm

Using group by in MySQL with only_full_group_by requires all columns to be part of the group or being aggregated in any way, like count(). The column ID was not aggregated like that, thus the resulting error.

The attached patch should do the trick.

I don't understand the purpose of the update hooks, though.

commerce_pricelist_update_8206(): If there are any results, the storage schema will not be set and the message "Update to the commerce_pricelist_item schema was skipped due to duplicate prices." will be returned instead.

commerce_pricelist_update_8207(): Will try to set the storage schema regardless of what commerce_pricelist_update_8206() did. As I see it, assumed the query in update 8206 returned a result before, update 8207 WILL catch an exception "Integrity constraint violation: Duplicate entry" which is returned as a message.

In this case the update does essentially nothing and returns error messages, which gives the impression that something is missing or didn't work out, but the update cannot be repeated without further ado.

I think providing an informal message or view, in case of duplicate products with same quantity and currency, would be a better approach and gives the user the opportunity to act on it.

πŸ‡©πŸ‡ͺGermany ktpm

Hi guy_schneerson,

I think commerce_stock_enforcement_get_context() should be moved to the context creator trait as it (presumably) always returns a store where the current implementation does not.

This can result in an error page if we assume to have stores A, B and C, where A is the default store, a product has selected B and C, and then you try to edit a product variation.

Using the SelectStoreTrait saves a few lines of code but requires a try/catch. Please check my approach in the MR.

πŸ‡©πŸ‡ͺGermany ktpm

ktpm β†’ made their first commit to this issue’s fork.

πŸ‡©πŸ‡ͺGermany ktpm

Hi,

thank you for your suggestion. I understand where this comes from.
The name recruiting comes from the core entity, the recruitment, which everything in the module revolves around. We wanted to apply the same pattern as e.g. commerce_shipping, where the core entity is called "Shipment", but the module is called "shipping". We also thought of the module in terms of "getting a new customer on board of your shop", so "recruitment" seemed pretty accurate to us.
Of course referral could have been fitting as well, but since this module is already up for over 3 years, we will want to leave the name as it is. Thank you for your understanding.

πŸ‡©πŸ‡ͺGermany ktpm

I have merged and released the changes now with v8.2.0.

πŸ‡©πŸ‡ͺGermany ktpm

Updated documentation in readme, released with v8.1.4 & v8.2.0

πŸ‡©πŸ‡ͺGermany ktpm

I have checked the module against Drupal 10.1, and had to make a few adjustments:

- the event dispatcher has switched their argument positions: event name <---> event
- entity queries are now required to set access check
- Symfony\Component\EventDispatcher\Event does not exist anymore, replaced it with Drupal\Component\EventDispatcher\Event

Plus, because of the drupal/dynamic_entity_reference^3 dependency, this version will also require Drupal 10 and will be released as 8.2.0.

Before I merge MR!1 I appreciate it if you can check once more and let me know if these changes work for you.

πŸ‡©πŸ‡ͺGermany ktpm

Hi, we are using simple cron with the watchdog mailer module because we want to be notified if a cron fails for any reason.
The mailer module sends logs from warning level and anything more severe though.
By removing the warning log this change does work for us. Thanks.

πŸ‡©πŸ‡ͺGermany ktpm

Hi,
I added an MR for the 1) easy way.

πŸ‡©πŸ‡ͺGermany ktpm

ktpm β†’ made their first commit to this issue’s fork.

πŸ‡©πŸ‡ͺGermany ktpm

Hi all,

thank you addressing this topic! I will check the MR and make a release soon.

πŸ‡©πŸ‡ͺGermany ktpm

Hi,

the code is built as "[campaign-option-code]--[user]", where user is the UID by default. It is NOT the username. But the user account does have its own code field if you want them to have something more fancy than "xyz--2".

Also, you can add the "Recruiter campaigns sharing link block" somewhere in the page, which will list all campaigns that the user is part of with a "Copy Link" button for each product.

πŸ‡©πŸ‡ͺGermany ktpm

Hi,

thanks for reaching out!

Multi value on the product field is currently not supported as I need to match exactly one code with one specific product to determine where to redirect. But you can allow the recruiter to receive the bonus from multiple items by adding all necessary products as seperate campaign-options to the same campaign and enabling the option "Apply bonus from any matching option". You'll find this option when editing the campaign.

Does this help you?

πŸ‡©πŸ‡ͺGermany ktpm

Hi,

And I am stumped on how to actually enable the module

I noticed a missing dependency to commerce_cart that was added in the last release. Please try the updated version.

drush cr
Drupal\Component\Plugin\Exception\PluginNotFoundException: The
"commerce_plugin_item:commerce_recruiting_bonus_resolver" plugin does not
exist.

The module is not installed yet.

I cannot reproduce this issue as plugins of disabled modules are ignored and should not produce this exception at all, so this issue may be out of scope for this module.

If the issue persists with the updated version, please provide more information about the steps for me to reproduce.

πŸ‡©πŸ‡ͺGermany ktpm

Hi,

thank you for pointing that out! I will remove the patch sometime later when releasing a new version.

Production build 0.71.5 2024