This topic has 4 replies, 3 voices, and was last updated 7 years, 6 months ago ago by Max Mullins
Hello,
We would like to know what files we have to review to modify order what product description and purchasing button are shown.
Currently: Product description + Add to cart button
Desired: Add to cart button + prodduct description
Thanks in adcance
Hello,
You need edit the file wp-content/themes/woopress/woocommerce/content-single-product.php.
Make your changes in the child theme to prevent losing them after theme update.
Regards,
Rose Tyler.
Hi,
I’ve already tryed your solution, but nothing happened.
I just found other solution, editing the functions.php file adding the following code:
remove_action( ‘woocommerce_single_product_summary’,
‘woocommerce_template_single_add_to_cart’, 30 );
add_action( ‘woocommerce_single_product_summary’,
‘woocommerce_template_single_add_to_cart’, 15 );
is that right?
Hello @hidrofugo.
The solution is right. Just would like to add, that vodifications can be done in content-single-product.php from line 117 to 130
<?php
/**
* woocommerce_single_product_summary hook
*
* @hooked woocommerce_template_single_title - 5
* @hooked woocommerce_template_single_rating - 10
* @hooked woocommerce_template_single_price - 10
* @hooked woocommerce_template_single_excerpt - 20
* @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', 'woocommerce_template_single_add_to_cart - 5');
?>
Then you may copy woocommerce/content-single-product.php to wp-content/child-theme woocommerce/content-single-product.php. This is the best way to edit template files. However according to woocommerce documentation you may edit tempate files wit snippets and hooks in functions.php too.
Wish you success in further development.
Regards,
Max Mullins
You must be logged in to reply to this topic.Log in/Sign up