• Resolved atomonelone

    (@atomonelone)


    Hi!

    Since the 4.0 update I have not been able to get my product fields to show in the product archive. In Field Factory -> Settings “Display on Archive” is checked on yes and I’ve tried every single option including writing the hooks and giving them different priority.
    In Edit Product Fields I’ve made sure that the “Fields Location” is not set to “None” and I’ve tried every single option there aswell. I even tried making new fields and it still doesn’t work. Do you think you could help me solve this? Is there maybe a php funtcion I can use to render my fields after the product title?

    There are no errors in the debug log and I’ve tried disabeling all plugins and removing all functions in functions.php still no field showing on archive page.

    • This topic was modified 2 years, 8 months ago by atomonelone.
    • This topic was modified 2 years, 8 months ago by atomonelone.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter atomonelone

    (@atomonelone)

    In console I can see two hidden inputs that I have not created. Maybe this has something to do with it?
    <input type=”hidden” class=”wccpf_archive_price_tag” value=”0″>
    <input type=”hidden” class=”wccpf_archive_is_variable_tag” value=”no”>

    This is the Website

    Plugin Contributor Sark

    (@sarkware)

    Hi,

    The page you shared is product category page right.? thats why it’s not showing, since I put a condition (I think it is unnecessary now) before injecting the fields on archive.

    So pls edit the following file

    /wp-content/plugins/wc-fields-factory/includes/wcff_product_fields.php
    Line Number: 237

    replace the method archive_template_fields_injector with the following snippet

    public function archive_template_fields_injector() {
    	if (is_shop() || is_product_taxonomy()) {
    		/* Initiate Fields Injection */ 
    		wcff()->injector->inject_product_fields(current_action(), "archive-product");
    	}
    }

    I just added the is_product_taxonomy() condition, let me know if it solved the issue.
    If not solved pls remove that if condition then check.

    Thread Starter atomonelone

    (@atomonelone)

    That fixed the issue, the fields are now being displayed!
    Thanks for the help!

    Quick question, did version 4.0 come with ajax add to cart possibility?
    I have ajax add to cart on both product page and category page. On product page the fields gets added with ajax but they don’t on category.

    Thanks again for the help.

    Plugin Contributor Sark

    (@sarkware)

    Ajax add to cart supported (file fields not supported) on archive page, but not on single product page.

    But thats on my pipeline, will release that support soon.

    Plugin Contributor Sark

    (@sarkware)

    OK, just checked and you need one more update, since you are using product cat page, I will give you one more pls wait for some time, I will release it tonight.

    Thread Starter atomonelone

    (@atomonelone)

    Great, thank you so much for the quick response and awesome support. I’ve made sure to leave a 5 star review! ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fields not showing on product archive page.’ is closed to new replies.