Gracias por toda tu informacion, pero la verdad que soy muy nuevo en esto de los codigos.
he podido crear este codigo pero no realiza ningun cambio para lograr el cometido.
/* orden de los datos de productos*/
/**
* Show product dimensions on archive pages for WC 3+
*/
add_action( 'woocommerce_after_shop_loop_item', 'rs_show_dimensions', 25 );
function rs_show_dimensions() {
global $product;
$dimensions = wc_format_dimensions($product->get_dimensions(false));
if ( $product->has_dimensions() ) {
echo '<div class="product-meta"><span class="product-meta-label">Dimensiones: </span>' . $dimensions . '</div>';
}
}
/**
* Show product weight on archive pages
*/
add_action( 'woocommerce_after_shop_loop_item', 'rs_show_weights', 9 );
function rs_show_weights() {
global $product;
$weight = $product->get_weight();
if ( $product->has_weight() ) {
echo '<div class="product-meta"><span class="product-meta-label">Peso: </span>' . $weight . get_option('woocommerce_weight_unit') . '</div></br>';
}
}
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', 80 );
/*cambio de nombre de añadir al carrtio */
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_archive_custom_cart_button_text' ); // 2.1 +
function woo_archive_custom_cart_button_text() {
return __( 'Añadir', 'woocommerce' );
}
/**Posicion de info en Tienda**/
/** Se eliminan */
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
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_after_shop_loop_item', 'prima_custom_shop_item', 15);
remove_action( 'woocommerce_after_shop_loop_item', 'rs_show_dimensions', 25 );
remove_action( 'woocommerce_after_shop_loop_item', 'rs_show_weights', 9 );
remove_filter('woocommerce_after_shop_loop_item', 'qib_replace_template',);
/** Se añaden */
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_category_title', 10 );
add_action( 'woocommerce_after_shop_loop_item', 'prima_custom_shop_item', 15);
add_action( 'woocommerce_after_shop_loop_item', 'rs_show_dimensions', 15 );
add_action( 'woocommerce_after_shop_loop_item', 'rs_show_weights', 19 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 'woocommerce_template_single_price', 30 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 50 );
add_filter('woocommerce_after_shop_loop_item', 'qib_replace_template', 40);
-
Esta respuesta fue modificada hace 3 años, 9 meses por jose64. Razón: Etiquetar código