Hello Marc @mdxfr, thank you for your feedback. Could you provide me with your test page?
Phi.
Thread Starter
Marc
(@mdxfr)
hi Phi,
i’ve added some details in the first post.
I can see the values in the template, but those are not visible on front
@mdxfr, thank you for the update. Could you please provide me with a little bit more details about your custom fields? What types of fields are they? What are their data types? The more details you provide, the better I can assist you.
Thread Starter
Marc
(@mdxfr)
- the ACF fields are already visible in the product pages (in grey aka with Secteur prefix, and in orange prefix Niveau).
- I want to display those attrributes in the respective
category
pages. The product list is generated through the Woo Product Collection
block (a query loop but woo enhanced it, perhaps it’s a custom of their own)
- i send the values from ACF to MFB through an an action with the
meta_field_block_get_acf_field function
- Location rule for the field group is set to Post Type == Product
**About the data type**
To get the woo attribute value :
– Field 1 type (zone / secteur) : taxonomy . Returned value is term object
– Field 2 type (level / niveau) : taxonomy. Returned value is term object
Do i use wrong post type ? if yes, why can i see the values in the Editor ?
thanks for your help, appreciated
-
This reply was modified 1 year, 1 month ago by
Marc.
-
This reply was modified 1 year, 1 month ago by
Marc.
@mdxfr I have found the bug. The current version does not support this custom Woo Product Collection block. However, I have released a beta version that fixes this issue. Could you please provide your email so I can send it to you? Only Pro customers can access this beta version from the site dashboard, so you have install it manually. Or you could wait for a new release next week.
Here is the email if you need it right away: hello@metafieldblock.com
-
This reply was modified 1 year, 1 month ago by
Phi Phan.
Thread Starter
Marc
(@mdxfr)
ah good.
i was there able to fix my code there also > strange, without your fix !!!
i had a mismatch about ACF return type vs my code : needed to be term ID (instead of term object)
you can see the attribute values on the category pages
hope this help you too π
anyway, thanks for your help (and for your nice plugin)
NB : i have unset by css the margin you set by default on prefix/suffix (margin-inline-end/ margin-inline-start), maybe you could add those settings in the block.
-
This reply was modified 1 year, 1 month ago by
Marc.
@mdxfr Yeah, I see with custom code, you can fix it easily. However if you are displaying simple data type, then you don’t need any custom code and you will need the fix in the next version to display custom fields in this Woo Product Collection block.
Anyway, I’m glad to hear that you fixed it.
Thank you once again for reporting it.
Thread Starter
Marc
(@mdxfr)
- yep, i use custom code to retrieve my taxonomies, because i don’t want a link on the value. So i get the
name only
by code within my meta_field_block_get_acf_field function
$term_id = get_field(‘zone’, false, true, true);
$term_name = get_term($term_id)->name;
- About an ACF text field, it is not displayed (empty value on front, despite visible in editor), i guess you fixed this also
-
This reply was modified 1 year, 1 month ago by
Marc.