• Resolved danielgranlund

    (@danielgranlund)


    When using WooCommerce Product Add-ons, Vipps Express seems to skip required addon fields. As intended?

    Bringing it up to figure out if we need to remove it from certain products, or if there is a fix, or if its just not compatible with WooCommerce Product add-ons.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Iver Odin Kvello

    (@iverok)

    It may not be compatible, but see below.

    The normal “add to cart” logic is very programmable and plugins can and do implement this in sometimes very complex manners. The extra information gets added to the cart (which sometimes gets subclassed, adding more non-standard behaviours) and the final order created from the Checkout screen from the information both here and in the cart.

    In contrast, Express Checkout gets basically just a product ID and creates an order directly from that. It’s not in general possible to know for a given plugin how and where it puts its extra neccessary information.

    However; in the Vipps settings you can select a “Compatibility mode” which may help: This will change the behaviour of the Vipps button on the product pages. The new behaviour will, using javascript, just add the product to the cart in the “normal” way and then go to Express Checkout. This should help for plugins that modify this.

    The problem with Compatibility Mode is that normally, you would expect something like Express Checkout to not modify the users cart. For example, if the user has a product in the cart, and purchases another product using express checkout, the expectation would be that the express purchase only contains the product being clicked, and that the previous cart is available when returning to the store. Compatibility Mode will instead create an order for the entire current cart. Therefore it is not on by default.

    It is possible to enable Compatibility Mode for just certain products, but you will then need to use a filter (pseudocode):

       add_filter('woo_vipps_single_product_compat_mode', function ($compatibilitymode, $product) {
           // Check if your product is of the type that needs extra compatibility 
           if ( ....  $product ...) {
               return true;
            }
            return $compatibilitymode;
    });
    Thread Starter danielgranlund

    (@danielgranlund)

    Thanks for the reply, we will play around with this and consider it as an option to manually select which products to display the express for.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Express skips required fields – Woo Product Add-ons’ is closed to new replies.