Home › Forums › Basel support forum › Child theme issues
Child theme issues
- This topic has 5 replies, 2 voices, and was last updated 8 years, 1 month ago by Artem Temos.
-
AuthorPosts
-
December 2, 2016 at 6:53 am #7473
webtrendzParticipantHi 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
December 2, 2016 at 4:56 pm #7489
Artem TemosKeymasterHello,
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
andadd_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
December 2, 2016 at 5:19 pm #7492
webtrendzParticipantHi,
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.December 2, 2016 at 5:28 pm #7497
Artem TemosKeymasterHi,
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
December 2, 2016 at 6:02 pm #7501
webtrendzParticipantok, i got you.
so can i move the “Global Add on” up to be before the size and colour?
December 2, 2016 at 6:41 pm #7504
Artem TemosKeymasterSorry, 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.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register