Darryl Hardin
  • Member for 4 years, 6 months
  • Last seen more than a month ago
How to link to controller actions in a Craft 3 plugin?
7 votes

Your code should work as you suggested without the additional stuff. Event::on( UrlManager::class, UrlManager::EVENT_REGISTER_CP_URL_RULES, function (RegisterUrlRulesEvent $event) { ...

View answer
Craft 3 Plugin not returning custom field value
Accepted answer
2 votes

Found my answer here // get $_POST['foo']['bar'], if it exists $bar = Craft::$app->request->getBodyParam('foo.bar'); or inserting it into my code Event::on(Elements::class, Elements::...

View answer
URI for nested categories in Craft 3
2 votes

You should be able to set your Category URI Format to {parent.slug}/{slug} If they are on the parent it will only show the parent category. If they are on the child it will show both. So you'd set ...

View answer
404 error page not loading
Accepted answer
2 votes

So my issue was very simple to solve once I paid better attention. The 404 was loading perfectly fine the whole time, my problem was that in my 404 file I had it as {% block content %} and not {% ...

View answer
CSRF Token not verified with actual gateway in Craft Commerce
Accepted answer
2 votes

Welp... I feel like an idiot. It wouldn't let it through because I didn't set the endpoints found at https://craftcommerce.com/docs/payment-gateways

View answer
Address form not redirecting to payment form in Craft Commerce
Accepted answer
2 votes

I extended my code to include the billing address and it worked. So I guess the answer to my question is yes, shipping and billing address need to be submitted together.

View answer
How do I store and retrieve elements for ElementSelectField? Getting error "Call to a member function getUiLabel() on array"
1 votes

Well, I figured it out to an extent, I'm not sure why this works and I have a feeling it will break eventually, but here is my solution. Please let me know if there is a better one out there or ...

View answer
How can I save a tag value in an entry in Craft 3
1 votes

I had an issue with Ransom Roberson code $product->businessTag->id[] = $tag->id; but otherwise everything else worked. The problem is the snippet above will update the tag and then overwrite ...

View answer
Tons of Deleting Stale Template caches
1 votes

Going from Matthew's answer I went to my database and found the queue table. I had tried his way first but I had no task with a 0, all were null, and I wad one with a 1 in it already. As Matthew ...

View answer
Craft 3 devMode doesn't turn off
Accepted answer
1 votes

I missed this in the .env file, I'll leave this here in case anyone else is as bad a space case as myself. :) # The environment Craft is currently running in ('dev', 'staging', 'production', etc.) ...

View answer
Unable to edit my Craft 3 Plugin
1 votes

If anyone needs the help with Xampp here is a link that should help. I had abandoned trying with Homestead as I have a terrible time with the Global and have only been able to get per-project ...

View answer
Filtering dynamic criteria with AND
1 votes

I am still waiting on a better solution, but this is how I've solved this so far. My query will likely never go over 10, but for multiple reasons a dynamic solution would be much better if there is an ...

View answer
How can I access the Gateways services?
Accepted answer
0 votes

Figured it out: use craft\commerce\Plugin as Commerce; $gatewayService = Commerce::getInstance()->getGateways(); $variables = [ 'gateways' => $gatewayService->getAllGateways(), ];

View answer