Radical Dreamer
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Experimental Email Template don’t keep center alignThanks!
I have reported it. YOu can look over there if missed something
Forum: Plugins
In reply to: [WooCommerce] Experimental Email Template don’t keep center alignHere:
https://pastebin.com/eUKn4Ayc
Yes, i have enabled the Block Email Editor (Alpha) feature.
I am using theme 2025
Forum: Plugins
In reply to: [WooCommerce] New Email template don’t get order custom fieldI am reworking the plugin that does that.
The custom field is created when the order is created, but maybe there is a better way to do it.
For now, i believe it is a mistake from my side. I’ll come back i figure out is it not.
Forum: Plugins
In reply to: [WooCommerce] Experimental Email Template don’t keep center alignHere is the html when arrives to gmail:
<h2 style="display:block;margin:0 0 18px;text-align:left;margin-bottom:0;margin-top:0;line-height:1.125;letter-spacing:0px;font-size:28px;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-style:normal;font-weight:400;color:#fff;background-color:#008eff" bgcolor="#008eff">Gracias por tu pedido</h2>Forum: Plugins
In reply to: [WooCommerce] New Email template don’t get order custom fieldThe popup you are seeing, is from Woocommerce, but it can be enabled under settings > advance > features > experimental features
Forum: Plugins
In reply to: [WooCommerce] New Email template don’t get order custom fieldi have been doing some testings.
Seems like the tece_delivery_range is set when the order is created but at the same time the email is sent.
So if i send the email after, manually, or i choose bank transfer, and then process the payment, i will get the custom_value correctly displayed.
So. I was wondering if there is a correct way to set this value to be saved at the time the oder is created, so the email can use it.
Forum: Plugins
In reply to: [WooCommerce] New Email template don’t get order custom fieldFirst i have this 2 features enabled:
Enhanced email and email block editor Here is my template for the processed order email:
I used the feature to insert custom fields
Forum: Plugins
In reply to: [WooCommerce] New Email template don’t get order custom fieldThank you. Here it is:
https://pastebin.com/eUKn4AycHope you can guide me through
Thank you for creating the report!
Forum: Plugins
In reply to: [WooCommerce] Percentage of discounti hope someone can vote on this:
https://woocommerce.com/feature-request/discount-percentage-block/Forum: Plugins
In reply to: [WooCommerce] Percentage of discounti managed to create a way to do it, it is not clean , but it works:
add_filter( 'woocommerce_get_price_html', 'agregar_porcentaje_solo_en_upsells', 100, 2 );
function agregar_porcentaje_solo_en_upsells( $price, $product ) {
// 1. Si estamos en el admin, no hacer nada
if ( is_admin() ) {
return $price;
}
// 2. OBTENER EL ID DEL PRODUCTO PRINCIPAL (EL QUE EL USUARIO ESTÁ VISITANDO)
$queried_object = get_queried_object();
$current_page_product_id = ( is_product() && $queried_object ) ? $queried_object->ID : 0;
// 3. VALIDACIÓN CRÍTICA:
// Solo procedemos si el ID del producto actual del loop NO ES el ID de la página que estamos viendo.
// Esto hace que se salte el producto "Padre" y solo actúe en los productos de las listas de abajo (Upsells).
if ( $product->get_id() === $current_page_product_id ) {
return $price;
}
// 4. Si el producto no está en oferta, no hacer nada
if ( ! $product->is_on_sale() ) {
return $price;
}
// Calcular precios (Simples y Variables)
if ( $product->is_type( 'variable' ) ) {
$prices = $product->get_variation_prices();
$regular_price = max( $prices['regular_price'] );
$sale_price = min( $prices['sale_price'] );
} else {
$regular_price = $product->get_regular_price();
$sale_price = $product->get_sale_price();
}
if ( $regular_price > 0 ) {
$percentage = round( ( ( floatval($regular_price) - floatval($sale_price) ) / floatval($regular_price) ) * 100 );
// Estilos Inline
$container_style = 'display: block; margin-top: 8px; line-height: 1;';
$badge_style = 'background-color: #e20000; color: #ffffff; font-weight: bold; padding: 4px 8px; border-radius: 4px; font-size: 13px; display: inline-block; text-transform: uppercase;';
$percentage_html = '<div style="' . $container_style . '">';
$percentage_html .= '<span style="' . $badge_style . '">-' . $percentage . '% OFF</span>';
$percentage_html .= '</div>';
return $price . $percentage_html;
}
return $price;
}Thanks! That works 🙂
Forum: Plugins
In reply to: [WooCommerce] After changing the product name, the template disconnectsForum: Plugins
In reply to: [WooCommerce] After changing the product name, the template disconnectsThank you for the explanation.
The theme i am using is twentwy twenty five
Then, i will suggest that the templates link to the page id rather than the slug.
Can you do that for me and send that suggestion to wordpress?
Forum: Plugins
In reply to: [WooCommerce] Price block don’t align correctlyIt was that. The row block had left aligned, so it forces to have left as well.
If i take it out from the row block it works correctly.
Thanks 🙂