Home Forums Basel support forum Child theme issues

Child theme issues

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7473

    webtrendz
    Participant

    Hi Guys,

    i need your help. i would like to edit the content-single-product.php, i have added this into the child theme but i am a bit lost.

    if you go to: http://www.theuniformstudio.com/shop/waistcoat/single-breasted-fitted-waistcoat-female, please select a size and colour, as this product is a variation product so once you select size and colour, you will see the price for the selected combination. after that i have something call “Add Embroidery?” after this block i have the add to cart button.

    I want to move the “£55.00 Ex. VAT 5 IN STOCK” block so that its next to the add to cart button.

    i can see the following:
    <?php
    /**
    * woocommerce_single_product_summary hook
    *
    * @hooked woocommerce_template_single_title – 5
    * @hooked woocommerce_template_single_rating – 10
    * @hooked woocommerce_template_single_price – 30
    * @hooked woocommerce_template_single_excerpt – 20
    * @hooked woocommerce_template_single_add_to_cart – 30
    * @hooked woocommerce_template_single_meta – 40
    * @hooked woocommerce_template_single_sharing – 50
    */
    do_action( ‘woocommerce_single_product_summary’ );
    ?>

    but chanigng the number above i.e. * @hooked woocommerce_template_single_price – 30 to * @hooked woocommerce_template_single_price – 40 does not have any effect.

    Am i doing something wrong?

    Please help asap

    #7489

    Artem Temos
    Keymaster

    Hello,

    Are you trying to edit hooks priority in PHP comment? It will not have any effect since it only to inform you what functions are hooked to this action. You need to use remove_action and add_action functions to change this hook order. Here is an article that may help you https://wp-agency.co.uk/changing-order-woocommerce-product-page/

    Regards

    #7492

    webtrendz
    Participant

    Hi,

    Thanks for the help so far, but if i as you have suggested that would move the price down, but i only want to move the selected price once you have chosen the size and colour.

    i have created a image to this message to show you what i mean.

    Please try to help me do this.

    Attachments:
    You must be logged in to view attached files.
    #7497

    Artem Temos
    Keymaster

    Hi,

    This price comes together with variations as a part of one hook function and they can’t be divided into two parts. You can find their source code in basel/woocommerce/single-product/add-to-cart/variable-swatches.php

    Regards

    #7501

    webtrendz
    Participant

    ok, i got you.

    so can i move the “Global Add on” up to be before the size and colour?

    #7504

    Artem Temos
    Keymaster

    Sorry, but it is more plugin related issue. We wrote you the file where size and color are located. So you can place any code there.

Viewing 6 posts - 1 through 6 (of 6 total)