Support » Plugin: WC Fields Factory » Showing custom field twice

  • Hello,

    The plug in was working well on the site but recently it has resulted in the custom field being show twice on every page it is intended for. In the settings there is only one field and not set to the same page twice.

    Can someone please advise.

    Thanks

    Jack

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 36 total)
  • I am experiencing the same issue: https://bhwp.org/item/become-a-partner

    I’m having the exactly same issue in some websites…

    Any help?

    There are ‘issues’ with v2.0.8 (jQuery issue in the wcff-injector.php on line 141) and the latest version of Woo Commerce in which the display order filters have been changed

    This needs changing:

    $field_rules_script = '<script> var $ = jQuery;
    	$(document).ready(function(){
    	   $(document).on("change", "[data-has_field_rules=yes]", function(){
    	';

    To this:

    $field_rules_script = '<script> 
    	jQuery(document).ready(function(){
    	   jQuery(document).on("change", "[data-has_field_rules=yes]", function(){
    	';

    Then an edited variable.php and variation-add-to-cart-button.php added to the child theme in woocommerce/single-product/add-to-cart folder

    I have the same issue. Fields are displaying twice since update :/

    • This reply was modified 2 years, 10 months ago by crystalcelebi.

    Another +1 on this.

    To add some detail, in my case the duplicates show when “Fields Location” is set to “Before Add To Cart Button” and ALL duplicate fields must be filled out before validation occurs.

    Guys, I solved the problem on my site. You’ve got to update the Woocommerce template files in your theme (if your theme developer hasn’t done it yet). Go to Woocommerce – Status and go to the bottom where you will see templates and some red warnings next to your outdated files. There are instructions to update them manually in your theme.

    http://es.tinypic.com/m/k3afia/1

    http://es.tinypic.com/m/k3afib/1

    • This reply was modified 2 years, 10 months ago by crystalcelebi.
    • This reply was modified 2 years, 10 months ago by crystalcelebi.
    • This reply was modified 2 years, 10 months ago by crystalcelebi.
    • This reply was modified 2 years, 10 months ago by crystalcelebi.

    I got the same problem too don’t know what to do

    The text field is showing twice but only the second field is fully working
    at the status page of woocommerce there isn’t anything showing outdated files from the child theme

    Can anyone help?

    Mark Ward

    (@markwarddesign)

    Any update here?

    @pixvault
    Unfortunately it didn’t fix the issue,

    In case the “Fields Location” is set to “Before Add To Cart Button”, the fields arn’t duplicated, however there is a validation error that fields must be filled, it looks like setting fields “Before Add To Cart Button” only makes the duplicated field invisible in the product page

    Anyone found a solution please ?? My website use this plugin on many products and now it’s not functional 🙁

    Mark Ward

    (@markwarddesign)

    Here is a hacky solution:

    Add this script to the bottom of your product pages.

    <script>
    jQuery(".wccpf-fields-group-1:not(:first)").remove();
    jQuery(".wccpf-fields-group-2:not(:first)").remove();
    </script>

    Be sure and replace ‘.wccpf-fields-group-x’ with the id of your field groups.

    I also had an issue with the datepicker script not being included so I added this to my functions.php file:

    function add_my_scripts( $scripts) {
        if(is_product()){
           wp_enqueue_script( 'jquery-ui-datepicker' );
        }
    }
    add_action('wp_enqueue_scripts', 'add_my_scripts');

    Hope this helps!

    @mark Ward
    Thank you, I was about to post a simple CSS trick to hide the 1st duplicated field using:

    .variations_form.cart > .wccpf-fields-group-1 {display: none}

    However your code works better because the 2nd duplicated fields appears after the “In Stock” on product page.

    In addition to your code using this css will prevent the duplicated field to appear and then disappear when page is fully rendered:

    .woocommerce-variation-add-to-cart > .wccpf-fields-group-1 {display: none}

    • This reply was modified 2 years, 10 months ago by Amine CH.

    Hi there, newby here 😉

    I have read everything, but I do not understand it at all.
    I do not dare to make any changes in the php settings. I am not specialized in that.
    Help me

    Looks like things are fixed in the latest update.

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘Showing custom field twice’ is closed to new replies.