• Hello

    My shop has only category view, so I’m trying to add input field in archive loop.

    By adding

    add_action( 'woocommerce_after_shop_loop_item_title', array( $this, 'add_product_input_fields_to_frontend' ), 100 );

    on line 60 in class-wcj-product-input-fields-global.php
    I have managed to show input field in category view, but it doesn’t save data into product/order meta.

    Can you help me with this?

    Also, when I add it in single product view, it saves it, but its only shown in checkout. In cart it’s still not shown.

    Great plugin, and I would really appreciate your help around this.

    thanks in advance

    https://www.ads-software.com/plugins/woocommerce-jetpack/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    I’m out of the office already, will get to that tomorrow morning.

    Best regards,
    Tom

    Thread Starter wutrigy

    (@wutrigy)

    Hi

    No problem. Thank you very much ??

    Hi,

    I’ve checked and unfortunately I can’t say at once how to do it. There is different adding to cart mechanism used. Moreover – are you using AJAX add to cart buttons on archives? The good news however – I realized that we need to add this functionality to plugin. I let you know as soon as I have any results.

    P.S. For adding field to frontend I would rather use woocommerce_after_shop_loop_item instead of woocommerce_after_shop_loop_item_title, this way the input field won’t get between <a></a> tags (unless that was the purpose, of course).

    Best regards,
    Tom

    Thread Starter wutrigy

    (@wutrigy)

    Hi,

    thanks for the answer.

    Yes, it’s AJAX, we are using WooThemes Canvas theme if that helps.
    Excellent news, but do you maybe have an estimate when could that be? Sorry for even asking this for free plugin. Just asking because my client is waiting, and I need to see if I’m going to need to hire someone to deal with it.

    I seems that it doesn’t save value in the session – ajax related?

    Best regards,
    Adrian

    Thread Starter wutrigy

    (@wutrigy)

    And thanks for the tip about tags

    Hi,

    I will try to include in next release in ~3 weeks. Will let you know here about the results.

    As for AJAX – I did try disabling AJAX add to cart, but unfortunately that didn’t help, so I really need to look up in the code more to find what’s missing.

    Best regards,
    Tom

    Thread Starter wutrigy

    (@wutrigy)

    Hello Tom,

    any news on this?

    Best regards

    Hi,

    Working on it. At the moment found one simple solution, however I’m not sure it will fit you. However please try adding this to functions.php file:

    // remove archives Add to Cart button
    remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
    // replace it with the Add to Cart button from single product page
    add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_single_add_to_cart', 30);

    I’m working on finding better solution…

    Best regards,
    Tom

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show Product Input Fields – All Products in category/archive view’ is closed to new replies.