• Resolved jappie18

    (@jappie18)


    Hi people i am back whit a problem:(

    i will change/reoder the single product page’s

    i can change the priority of the woocommerce_single_product_summary witch works fine.

    but i want bring the share and upsell to the woocommerce_before_single_product_summary

    when i do that its going wrong, it will propely something whit the css. because the upsell ul got a big white space, but even when i remove the whit space its not display correct.

    Here the code i use

    ////// hooks verwijderen ///////
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
    remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
    
    /////hooks toevoegen in de goede orde ////////
    
    add_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_sharing', 25 );
    add_action( 'woocommerce_before_single_product_summary', 'woocommerce_upsell_display', 25 );
    add_action('woocommerce_single_product_summary','woocommerce_product_description_tab', 20)
    ?>

    Here i its going wrong: https://www.medischwijzer.nl/product/ninja-silhouette/

    and this is what i want: https://www.medischwijzer.nl/zo%20wil%20ik.JPG

    i hope somebody can help me or tell me where i need to look for because i want to learn some:D

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jappie18

    (@jappie18)

    really cant figure it outs whats wrong.

    i have add a new div to before_single_product and then float: left. but its not working.

    i think i need to use clear anywhere but can’t figure it out

    I’m not sure why you’ve removed a lot of elements there, but I guess you were just doing some tests. Anyways, I recommend that you forget about the hooks you posted above and try doing just this code below.

    remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );
    add_action( 'woocommerce_product_thumbnails', 'woocommerce_template_single_sharing', 25 );

    This will add the sharing buttons inside the <div class="images"> so you don’t need to re-adjust the floats of the divs. You will have to adjust your own styles for this to really match what you want. Hope this helps!

    Thread Starter jappie18

    (@jappie18)

    Hi wooassist,

    i already figure it out, i just add the code of the share and upsells in the product-image.php. but this works better.

    thx:D

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Storefront single product’ is closed to new replies.