I would suggest checking to see if a value is getting passed through the "custom.product_type" in the first place.
For example:
{% set c_product_type = custom.product_type %}
<p>Custom product type: {{ c_product_type }}</p>
{% set crm_products = crm_objects("product", "limit=3&hs_images__not_null&uc_product_type__contains="~c_product_type, "hs_images,hs_url,name") %}
I don't know the exact mechanism behind this but on a few occassions I noticed that setting the variable separately beforehand and using that in the query param can resolve issues like this.
However, if nothing is showing up after the "Custom product type:" text in the example, then the context in which the "custom.product_type" property itself is being used would likely be the issue.
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.
I would suggest checking to see if a value is getting passed through the "custom.product_type" in the first place.
For example:
{% set c_product_type = custom.product_type %}
<p>Custom product type: {{ c_product_type }}</p>
{% set crm_products = crm_objects("product", "limit=3&hs_images__not_null&uc_product_type__contains="~c_product_type, "hs_images,hs_url,name") %}
I don't know the exact mechanism behind this but on a few occassions I noticed that setting the variable separately beforehand and using that in the query param can resolve issues like this.
However, if nothing is showing up after the "Custom product type:" text in the example, then the context in which the "custom.product_type" property itself is being used would likely be the issue.
Hope this helps!
✔️ Did this post help answer your query? Help the community by marking it as a solution.
custom variable doesn't work in query for the crm_objects
SOLVE
Hey, thanks for the reply. Yes unfortunately I did try that (setting a variable, as well as setting the value to make sure it's being outputted). Both were true and did not work.
I am able to get the right data in the email if the string is completely static. The output string in the email is exactly the same.