This topic has 2 replies, 2 voices, and was last updated 5 hours, 5 minutes ago ago by Luca Rossi
I have the following question:
We sell an article (HEAT.me Pad) in 10 pieces. So 10 pieces cost 9,95€.
The quantity discount shows the following:
Buy 3 items get 5% OFF
on each product
I would like to change this to
Buy 3 x 10 HEAT.me pads get 5% OFF
on each Pad.
I would like to change this for this specific product page. Is there a work around for this?
Hi @Juergen,
Please try adding this custom code under functions.php file locates in your child theme:
function n2t_text_strings( $translated_text, $text, $domain ) {
global $product;
switch ( $translated_text ) {
case '%1s Buy %2s items and get %3s OFF %4s %5s on each product %6s' :
$translated_text = '%1s Buy %2s x '.$product->get_title().' and get %3s OFF %4s %5s on each Pad %6s';
break;
case '%1s Buy from %2s to %3s items and get %4s OFF %5s %6s on each product %7s' :
$translated_text = '%1s Buy from %2s to %3s '.$product->get_title().' and get %4s OFF %5s %6s on each Pad %7s';
break;
case '%1s Buy %2s items get %3s OFF %4s %5s on each product %6s' :
$translated_text = '%1s Buy %2s '.$product->get_title().' get %3s OFF %4s %5s on each Pad %6s';
break;
}
return $translated_text;
}
add_filter( 'gettext', 'n2t_text_strings', 20, 3 );
Hope it helps!
You must be logged in to reply to this topic.Log in/Sign up