Support

Account

Home Forums Search Search Results for 'woocommerce'

Search Results for 'woocommerce'

reply

  • I been using ACF and WPML and Woocommerce for a long time with very complex ACF and language setup. I Just installed the ACF PRO and this become Changed:

    The “Duplicate” of a ACF is no longer dublicated, it creates a translated independent copy of the original language field setup. Before you could see the WPML box “Make xxx fieldgroup independent” (WPML will no longer sync…)

    Today, if we add changes in the Field group, we must add the “new” fields in that fieldgroup, values, etc etc manually for EACH translated field group. Not fun when using 10 languages.

    On the other hand, To make headlines, titles translated, the field group MUST released as a “duplicate” and become independent. (As before)

    We always keep the fieldgroups as “dublicated” (But now ACF cant do it) as long as possible, and when all testing and the client is happy, we release all translations and finally, translate the labels and titles.

    ALSO:
    REF Elliots article “Multilingual Custom Fields”

    in WPML “Mulitilingual setup — Custom fields translation”, These properties (Custom fields) has to be checked as “Copy from original to translation”:

    -allorany
    -field_1
    -hide_on_screen
    -layout
    -position
    -rule

    Then, everything works fine for us, as for many installs, last 3 years, update after update WPML + ACF.

  • on a production website, running in older versions (WordPress 3.9.2 // Advanced Custom Fields by Elliot Condon version 4.3.8 // WPML Multilingual CMS by ICanLocalize version 3.1.6 // WPML Translation Management by ICanLocalize version 1.9.5), everything works fine:

    ### Environment ###

    WC Version: 2.1.12
    WC Database Version: 2.1.12
    WP Version: 3.9.2
    WP Multisite Enabled: No
    Web Server Info: nginx/1.1.19
    PHP Version: 5.3.10-1ubuntu3.13
    MySQL Version: 5.5.35
    WP Memory Limit: 256 MB
    WP Debug Mode: No
    WP Language: Default
    WP Max Upload Size: 32 MB
    PHP Post Max Size: 32 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 1000
    SUHOSIN Installed: No
    WC Logging: Log directory is writable.
    Default Timezone: Default timezone is UTC
    fsockopen/cURL: Your server has fsockopen and cURL enabled.
    SOAP Client: Your server has the SOAP Client class enabled.
    WP Remote Post: wp_remote_post() was successful – PayPal IPN is working.

    ### Plugins ###

    Installed Plugins: Advanced Custom Fields: Date and Time Picker by Per Soderlind version 2.0.16
    Advanced Custom Fields: Repeater Field by Elliot Condon version 1.1.1
    Share Buttons by AddToAny by AddToAny version 1.3.5
    Adminimize by Frank Bültge version 1.8.4
    Advanced Custom Fields: Limiter by Atomic Smash – David Darke version 1.1.0
    Advanced Custom Fields by Elliot Condon version 4.3.8
    Akismet by Automattic version 3.0.2
    Contact Form 7 by Takayuki Miyoshi version 3.9.1
    Custom Favicon by Dreams Online Themes version 1.0.2
    Google Analytics for WordPress by Joost de Valk version 4.3.5
    Google XML Sitemaps by Arne Brachhold version 4.0.7
    Latest Custom Post Type Updates by David Wood version 1.3.0
    Simple Image Sizes by Rahe version 3.0
    WPML Multilingual CMS by ICanLocalize version 3.1.6
    Soliloquy Thumbnails Addon by Thomas Griffin version 1.0.4.1
    Soliloquy by Thomas Griffin version 2.3.4
    User Role Editor by Vladimir Garagulya version 4.14.4
    WooCommerce Gateways Country Limiter by OnTheGoSystems version 1.0.3
    Woocommerce Adwords Conversion Tracking by Víctor Falcón version 1.0.1
    WooCommerce MailChimp by Adam Anderly version 1.3.1
    WooCommerce Multilingual by ICanLocalize version 3.3.2
    WooCommerce by WooThemes version 2.1.12
    WooCommerce HeidelpayCw by customweb GmbH version 1.0.120
    wpMandrill by Mandrill version 1.33
    WPML CMS Nav by ICanLocalize version 1.4.4
    WPML Media by ICanLocalize version 2.1.5
    WPML Sticky Links by ICanLocalize version 1.3.4
    WPML String Translation by ICanLocalize version 2.0.6
    WPML Translation Management by ICanLocalize version 1.9.5

  • Same problem too —

    This was solved in WooCommerce update 2.2.6 (released a day later) so it looks like a problem with their plugin rather than ACF.

  • We have the same problem after updating to woocommerce Version 2.2.5, advanced custom fields no longer save when “Update” is clicked, the fields remain blank.

  • The first Woocommerce issue was likely unrelated to ACF Pro.

    The latter two popped up because acf_form_post::save_post() hooks onto ‘save_post’. This hook only fires if something changs on the post’s <i>main</i> fields. What this means, for example, if you change a field within an ACF metabox without changing anything else, this hook doesn’t fire. Instead, hook into ‘pre_update_post’. See this diff to solve this problem:
    http://pastie.org/9617141
    Here is a reference to this same problem in another plugin.

  • Tried using the acf_form() function inside a function hooking to the 'woocommerce_product_options_general_product_data' action.

    While it renders the entire form (including the “update” button), the fields don’t save.

    Tried it both with and without calling the acf_form_head() function beforehand (which I wouldn’t think would be necessary anyway). Tried both submitting the form by clicking the product’s “update” submit button and the “update” button rendered within the form itself.

  • I have been looking for that answer too. Since WooCommerce is such a huge WordPress plugin, I would think there would have to be some kind of integration possible. Anyone?

  • Champion! That fixed the issue! Thanks! Sorry for all the replies – we got there eventually! If there are any further issues I will post entire code blocks next time!

    One quick question, is your advancedcustomfields.com/my-account/ a custom built area? Is it woocommerce with a custom theme?

    Thanks again.

  • Both tests confirmed it was returning the term ID. The first returned 16 and the second returned:

    stdClass Object ( [term_id] => 16 [name] => Clothing [slug] => clothing [term_group] => 0 [term_taxonomy_id] => 16 [taxonomy] => product_cat [description] => [parent] => 0 [count] => 12 [filter] => raw )

    As for woocommerce support on this particular subject, there isn’t much out there at all, and what I’ve found didn’t work. At the start, it seemed like something I could track down because adding a custom WYSIWYG field above the main woocommerce product loop would allow for a simple way to customize the page content for each product category… but nothing. I even posted the same issue on WooCommerce’s support site and still nothing after 3 days. So strange.

  • I’m not sure. Are you sure about the taxonomy name being “product_cat_” I’m assuming it is based on the name of the template file being used.

    and you may need your action and function that you’d normally use for woocommerce. I don’t know a lot about how ACF plays with woocommerce.

    What I do know is that your original code the_field('custom_category_content'); was not working because you were not supplying it with the needed id value to get the value of a custom field that is attached to a term according to the ACF doc (http://www.advancedcustomfields.com/resources/functions/the_field/)

    You can make sure that $term_id = get_queried_object()->term_id; is returning a valid term ID.

    $object = get_queried_object();
    echo $object->term_id;

    you can even check the entire queried object to see what’s in there

    object = get_queried_object();
    print_r($object);
  • It’s still not showing up. I added the code below to my taxonomy template:
    <div>
    <?php
    $term_id = get_queried_object()->term_id;
    $post_id = ‘taxonomy-name_’.$term_id;
    the_field('custom_category_content', $post_id);
    ?>
    </div>

    I also double checked my custom field location. It’s set to: “Taxonmony Term” is equal to “Product Categories”. Also, do I still need the woocommerce “add_action” function (in my functions file)? IF so, is the one I have correct? So sorry for this… thanks again.

  • Hey guys.

    Sorry about the account issues. It looks like the WooCommerce migration did not like the passwords from shopp….

    Please email [email protected] with your user info, and I’ll manually reset you p/w.

    Thanks
    Elliot

  • Thanks, that was the same thing I just figured out.

    There was a plugin installed named “PBP Own post & media for Author” that used $wp_query->set( 'author', $current_user->ID );

    I didn’t resolve it completely, but I think I have a workaround. It is for WooCommerce, and I bought a $79 extension to accomplish what I was trying to do.

    I appreciate your time.

  • Eventually figured this out! FYI, here’s the code in case it helps anyone. The name of my WYSIWYG field is ‘about_this_product_category’, which you would replace with your own field name.

    <?php 
     
    // vars
    $queried_object = get_queried_object(); 
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;  
     
    // load desc for this taxonomy term (term object)
    $thumbnail = get_field('about_this_product_category', $queried_object);
     
    // load desc for this taxonomy term (term string)
    $thumbnail = get_field('about_this_product_category', $taxonomy . '_' . $term_id);
    
    ?>    
    
    <?php the_field( 'about_this_product_category', $queried_object ); ?>  

    I copied the archive-product.php from the WooCommerce plugin directory into a new /woocommerce/ folder inside my theme.

  • Hi,

    I’m not sure how you went with this, but I am trying to add some ACF fields to the Single Products Page in Woocommerce. I was hoping to use the hooks that woocommerce provides to add the custom fields stuff, but I can’t seem to get the fields to output anything.

    in my functions.php I have added an action like so:

    // Add ACF Info to Product display page
    add_action( 'woocommerce_after_single_product_summary', "ACF_product_content", 10 );
    
    function ACF_product_content(){
      
      echo '<h2> ACF Content </h2>';
      
      if (function_exists('the_field')){
        echo '<p>Woohoo, the_field function exists! </p>';
    
        the_field('test_field');
    
      }
      
    }
    

    The h2 and the p are displayed, but the field itself doesn’t get rendered. Any thoughts?

    Cheers.

  • This reply has been marked as private.
  • Hi @softprinciples

    Thanks for the follow up. I just did some testing, and can confirm that there is a bug preventing the Woocommerce products from appearing.

    I have fixed the issue and pushed the fix to github. Please download the latest version, and let me know how you go.

    Thanks
    E

  • Thanks for the response Elliot but unfortunately selecting “post” does not give me access to the actual individual products themselve – these are not appearing.

    Are they suppose to Elliot b/c from what I can see, you are not classifying Woocommerce (individual) products as a post – is this correct?

    Selecting post in the location rules only displays actual posts within the “Post” menu option in WordPress and that’s it.

    At the moment within the Products section of Woocommerce, I have two products, Product A and Product B – it is these I am trying to access, inorder to place specific field groups against them.

    If I look within the wp_posts table, I can see my two products

    where post_type = 'product'

    what I need in addition are access to the columns post_name or post_title, as these will give me access to a specific product but I am not able to get to these via ACF location rules.

    Any further ideas/workarounds Elliot would be much appreciated as I only want specific custom field groups against a specific product, i.e. Product A.

    Thanks again.

  • Hi @QueenEve

    I can’t confirm that the ACF shortcode would work with this 3rd party plugin.

    Just to confirm, this plugin allows you to add 1 extra tab to the woocommerce product page?

    Did you change the ‘${field_name}’ to the actual field name?

    Can you confirm that any shortcode (non ACF) would work in this tab text area?

    My suspicions are that shortcodes do not yet work in this plugin’s content area.

    Thanks
    E

  • Hi @QueenEve

    No worries.

    1. Use ACF to create a field group containing the fields you want and then use location rules to match the post_type to the Woocomerce product
    2. Research on the Woocomerce website to find out how you can customize the single product page
    3. Edit that template and use the ACF functions such as get_field / the_field to display your custom field data

    Hope that helps.

    To better improve the docs, can you please provide some feedback? You say that you don’t know how to use the docs? How come?

    Thanks
    E

  • Thanks elliot for your quick response but I tried to review it many times but still I cannot understand how it works :'( :'(

    can you please give me a guide how to use the documentation at least , I am really confused

  • Hi @QueenEve

    Please review the documentation page to understand how ACF works.

    Thanks
    E

  • We are using default settings for WYSIWYG

    We have not set any custom caps, however we are using Woocommerce – which does, i think.

    If you have problems recreating the issue – this was my case also. Other admin users of the site reported the problem, but my user did not have any issues – so I did not believe them … until I created a new admin user and logged in as that guy – then I saw that they where telling the truth..

    Now after using CCleaner to clear everything – my user is also gets the error.

    1. we have a repeater field that has a post obj field as a sub field.
    2. we have tested it with Woocommerce’s ‘products’ as post object.
    3. we have tested it with a personal created CTP called Deals as post object.
    4. Happened on the woo single product
    5. happened on another single CTP as well (when testing if this was woo related)
    6. Problem does not occur when repeater field is disabled..

    Possible workaround is to use relationship field instead of repeater field.

  • Hi @ayottepl

    Your code is incorrect.
    Please read over the docs and make sure to use the field_name and post_id parameters correctly.

    Thanks
    E

  • Hi @elliot,

    My issue was that I wanted to add a second description field in my category pages on Woocommerce (with a Wysiwyg editor). The field was correctly displayed in the back-office, however in the front-office it didn’t work with the following code : <?php the_field(‘description_categorie_2’); ?>

    And your code in the section “Finding the term related to the current post” (here http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-taxonomy-term/) didn’t work either.
    But ayottepl gave me a clever tip to resolve it

    Have a great day !

Viewing 25 results - 1,276 through 1,300 (of 1,323 total)