2
If you don't have tons and tons of creators, you could do that by querying creators and re-arranging the results:
{# Get all creators and eager-load the products #}
{% set creators = craft.entries()
.section('creators')
.with('products')
.all()
%}
{# Declare an array to store all related product ID #}
{% set products = [] %}
{# Build an array ...
2
You might be better off sending the values as an array, then you will only need one parameter.
{# Change the macro to check for the value in an array #}
{% macro is_active(segments) %}
{% if craft.app.request.getSegment(2) in segments %}active{% endif %}
{% endmacro %}
{# Send an array to the macro #}
<a href="/the-url" class="{{ ...
1
If the entry is in a subdirectory, the image path will be incorrect. If the images are in a folder called "assets" in your home folder:
image.url for your main page would be "assets/imagename.jpg"
image.url for your entries in "blog" SHOULD be "../assets/imagename.jpg" BUT it will still return just "assets/...
1
Sorry for the trouble. This is a known issue and we will have a fix for this available in Freeform 3.10.8 in a few days (February 15-16, 2021). :)
1
i was having this error
i tried the things you say here like deleting the vendor, the lock and clear cache and didn't work.
I was using composer 2.0.9
But when i changed my composer to 1.8.4 solved my issue
1
For future reference of anybody stumbling onto this post (like me), setting ->typeId works for like 90%, but to cover it all put this in it too:
$entry->fieldLayoutId = null;
If you don't throw the field layout out, it might still hold on to the old fields of the entry. This gives some really weird issues, like a relational field being filled in the ...
1
Try this:
Craft::$app->getUrlManager()->setRouteParams([
'variables' => ['order' => $order]
]);
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
craft3 × 1646plugin-development × 210
templating × 109
plugin-craftcommerce2 × 70
php × 68
plugins × 66
matrix × 62
assets × 60
multi-site × 58
entries × 52
plugin-craftcommerce × 50
categories × 50
modules × 49
localization × 47
users × 45
database × 40
plugin-elementapi × 40
search × 35
composer × 33
control-panel × 31
redactor × 31
config × 27
installation × 26
field × 25
error × 25