Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Algoritmika

    (@algoritmika)

    Hi @roadlink,

    If you mean, you want to replace EAN with MPN – yes, that’s generally possible. Here is what you need to do:

    1. Set the “Type” option to “Custom”.
    2. Enable the “Product structured data > Enable” checkbox; disable the “Product structured data > Automatic key” checkbox; set the “Product structured data > Custom key” option to mpn.
    3. (Optionally) set the “Title” option to “MPN”.

    * All mentioned options are in “WooCommerce > Settings > EAN > General”.

    Now if you mean that you want to have both EAN and MPN fields simultaneously – unfortunately, it’s not currently possible. However, if you are ok with adding a small PHP code snippet to your site, you can add MPN functionality in a very basic form, by using WordPress Custom Fields. That is, you can manually add a field named mpn to your products via the “Custom Fields” meta box. And then you can add MPN to your products’ structured data with this snippet:

    add_filter( 'woocommerce_structured_data_product', function( $markup, $product ) {
        if ( '' !== ( $mpn = get_post_meta( $product->get_id(), 'mpn', true ) ) ) {
            $markup['mpn'] = $mpn;
        }
        return $markup;
    }, 10, 2 );

    Please give it a try and let me know what you think.

    Thread Starter roadlink

    (@roadlink)

    Hi There,

    Thanks for quick reply.

    As you may know brand, ean and mpn are almost must for a product in terms of google merchant or facebook shop.

    This code will allow me to use MPN for variations too?

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @roadlink,

    No, unfortunately, the “Custom Fields” won’t cover the variations, however, I’ve created a small article for you – How to Add MPN to WooCommerce. It covers adding and displaying MPN, including variations. Please give it a try and let me know what you think.

    Thread Starter roadlink

    (@roadlink)

    Hi there,

    seems perfect but I would prefer to use it in your plugin and have your great support.
    Something like this. https://ps.w.org/wpsso-wc-metadata/assets/screenshot-04.jpg?rev=2296107

    Model name, MPN and EAN are must for us, we would like to solve all in one plugin if possible ??

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @roadlink,

    It seems like an excellent idea, and I’ve added it to our to-do list. However, unfortunately, we didn’t think about multiple fields when designing the plugin, so this will require a lot of changes in the plugin code.

    Thread Starter roadlink

    (@roadlink)

    Please let me know if you do it.
    Also if you can add these in pro version it is still OK.
    Just please add life-time license ??

    Plugin Author Algoritmika

    (@algoritmika)

    @roadlink,

    Sure, I will let you know asap.

    Plugin Author Algoritmika

    (@algoritmika)

    Hi @roadlink,

    It took longer than expected, but we’ve finally added options to simultaneously have multiple fields per product (e.g., EAN and MPN).

    You need to update the plugin to the latest v4.0.0 and start with the “WooCommerce > Settings > EAN > Extra Fields” section.

    Please note that these extra fields have fewer features than the main field. Currently supported extra field features are: Title, Meta key, Single product page display (including variations), and Product structured data. We will add more features there, e.g., Search. However, we are not planning to add all the features from the main field here, i.e., our extra fields will be a limited version of the main field.

    Unfortunately, extra fields options are available in our Pro version only, so if you have any questions, please contact us via our website, as WordPress Forum Guidelines forbid us from providing support for our premium plugins here.

    Please give it a try and let me know what you think.

    P.S. I’m marking this thread as “resolved” for now.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘add MPN too?’ is closed to new replies.