• On the Store and Product Category page, for a single “simple product” I want to display “Choose Options rather than “Add to Basket”, as they need to select a Quantity.

    Is there a hook or other method I can use for this. I tried searching the hook names for store without success. I don’t want to use a variant product as the only variable is that there are discounts for quantities.

Viewing 1 replies (of 1 total)
  • Thread Starter jane-taubman

    (@jane-taubman)

    Just to say I worked out a way, by changing the “add_to_cart.php template in my theme to look for the stock unit and change the button to be a the correct class and use $product->get_permalink()

    `if (substr($sku,0,4) == ‘fhgc’) {
    echo apply_filters( ‘woocommerce_loop_add_to_cart_link’,
    sprintf( ‘%s‘,
    esc_url( $product->get_permalink() ),
    esc_attr( isset( $quantity ) ? $quantity : 1 ),
    esc_attr( $product->id ),
    esc_attr( $product->get_sku() ),
    esc_attr( ‘button product_type_variable add_to_cart_button’ ),
    esc_html( ‘Select Options’ )
    ),
    $product );
    }
    else
    … as before

Viewing 1 replies (of 1 total)
  • The topic ‘Force Store Page to show “Choose Options” for a “Simple Product”’ is closed to new replies.