Change the "featured" text
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page pleaseIf you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.
Quote from Bartz on November 6, 2024, 16:53Hello, we need to translate the texts in other language. If someone selects featured products in the filter (roduct_visibility=featured) then the "featured" text appears above the results. When this text is clicked, the featured filter is removed again.
Image Link auf this featured text: https://ibb.co/HFPzksV
How can we translate this “featured” text? We have not found anything in Loco Translate.
Hello, we need to translate the texts in other language. If someone selects featured products in the filter (roduct_visibility=featured) then the"featured" text appears above the results. When this text is clicked, the featured filter is removed again.
Image Link auf this featured text: https://ibb.co/HFPzksV
How can we translate this “featured” text? We have not found anything in Loco Translate.
Quote from Pablo Borysenco on November 7, 2024, 11:00Hello
Please try this - https://products-filter.com/hook/woof_ext_custom_title_xxx
Can you drop me exact link to the issue?
Hello
Please try this - https://products-filter.com/hook/woof_ext_custom_title_xxx
Can you drop me exact link to the issue?
Quote from Bartz on November 7, 2024, 11:19Hello,
Sorry, I don't understand. What should I do?
The site is still under development and not publicly accessible. I have marked in the following picture which “featured” text I want to translate:
https://ibb.co/wpnq4Db
Hello,
Sorry, I don't understand. What should I do?
The site is still under development and not publicly accessible. I have marked in the following picture which “featured” text I want to translate:
Quote from Pablo Borysenco on November 7, 2024, 11:56Ok! try in file - \woocommerce-products-filter\ext\by_featured\index.php - add this code -https://share.pluginus.net/image/i20241107114616.png
add_action('wp_head', array($this, 'wp_head'));
public function wp_head () {
self::$includes['js_lang_custom'][$this->index] = esc_html__('Featured products', 'woocommerce-products-filter');
}
Ok! try in file - \woocommerce-products-filter\ext\by_featured\index.php - add this code -https://share.pluginus.net/image/i20241107114616.png
add_action('wp_head', array($this, 'wp_head'));
public function wp_head () {
self::$includes['js_lang_custom'][$this->index] = esc_html__('Featured products', 'woocommerce-products-filter');
}
Quote from Bartz on November 7, 2024, 13:13Thank you. We work with a child theme and do not work directly on the original php files.
Can I also insert the code in the functions.php of the child theme?
Thank you. We work with a child theme and do not work directly on the original php files.
Can I also insert the code in the functions.php of the child theme?
Quote from Pablo Borysenco on November 8, 2024, 11:14Hello
Fix this in the plugin file. This fix will be included in the next version.
Hello
Fix this in the plugin file. This fix will be included in the next version.
Quote from Bartz on November 8, 2024, 16:17Ok. Code is inserted but the “featured” text is still not translated. What else needs to be done?
Ok. Code is inserted but the “featured” text is still not translated. What else needs to be done?
Quote from Bartz on November 8, 2024, 16:18Here my index.php code:
<?phpif (!defined('ABSPATH'))die('No direct access allowed');final class WOOF_EXT_BY_FEATURED extends WOOF_EXT {public $type = 'by_html_type';public $html_type = 'by_featured'; //your custom key herepublic $index = 'featured';public $html_type_dynamic_recount_behavior = 'none';public function __construct() {parent::__construct();$this->init();}public function get_ext_path() {return plugin_dir_path(__FILE__);}public function get_ext_override_path() {return get_stylesheet_directory() . DIRECTORY_SEPARATOR . "woof" . DIRECTORY_SEPARATOR . "ext" . DIRECTORY_SEPARATOR . $this->html_type . DIRECTORY_SEPARATOR;}public function get_ext_link() {return plugin_dir_url(__FILE__);}public function woof_add_items_keys($keys) {$keys[] = $this->html_type;return $keys;}public function init() {add_filter('woof_add_items_keys', array($this, 'woof_add_items_keys'));add_action('woof_print_html_type_options_' . $this->html_type, array($this, 'woof_print_html_type_options'), 10, 1);add_action('woof_print_html_type_' . $this->html_type, array($this, 'print_html_type'), 10, 1);add_action('woocommerce_product_query', array($this, 'parse_query'));add_action('woof_get_tax_query', array($this, "woof_get_tax_query"), 9999);add_action('wp_head', array($this, 'wp_head'));self::$includes['js']['woof_' . $this->html_type . '_html_items'] = $this->get_ext_link() . 'js/' . $this->html_type . '.js';self::$includes['css']['woof_' . $this->html_type . '_html_items'] = $this->get_ext_link() . 'css/' . $this->html_type . '.css';self::$includes['js_init_functions'][$this->html_type] = 'woof_init_featured';self::$includes['js_lang_custom'][$this->index] = esc_html__('Featured products', 'woocommerce-products-filter');}public function wp_head () {self::$includes['js_lang_custom'][$this->index] = esc_html__('Featured products', 'woocommerce-products-filter');}//settings page hookpublic function woof_print_html_type_options() {woof()->render_html_e($this->get_ext_path() . 'views' . DIRECTORY_SEPARATOR . 'options.php', array('key' => $this->html_type,"woof_settings" => get_option('woof_settings', array())));}public function parse_query($wp_query) {if (!isset($wp_query->query['post_type']) OR $wp_query->query['post_type'] != 'product') {//return $wp_query;}if (!empty($wp_query->tax_query) AND isset($wp_query->tax_query->queries)) {$request = woof()->get_request_data();if (isset($request["product_visibility"]) AND $request["product_visibility"] == 'featured') {$tax_query = $wp_query->tax_query->queries;$tax_query = $this->add_to_tax_query($tax_query);$wp_query->set('tax_query', $tax_query);}}}public function add_to_tax_query($tax_query) {$tax_query[] = array('taxonomy' => 'product_visibility','field' => 'name','terms' => 'featured',);return $tax_query;}public function woof_get_tax_query($tax_query) {$request = woof()->get_request_data();if (isset($request["product_visibility"]) AND $request["product_visibility"] == 'featured') {$tax_query = $this->add_to_tax_query($tax_query);}return $tax_query;}}WOOF_EXT::$includes['html_type_objects']['by_featured'] = new WOOF_EXT_BY_FEATURED();
Here my index.php code:
Quote from Pablo Borysenco on November 11, 2024, 12:02Hello
Please delete this code - https://share.pluginus.net/image/i20241111120041.png
Clear all cache and Ctrl+F5 and do a test
Hello
Please delete this code - https://share.pluginus.net/image/i20241111120041.png
Clear all cache and Ctrl+F5 and do a test
Quote from Bartz on November 11, 2024, 12:57Hello, unfortunately, this does not work. In your code it says “Featured products” but on my website “featured” is displayed. It is not clear to me how your code should change this text.
It seems to me that the “featured” text is fetched via the url variable “product_visibility=featured” and therefore cannot be translated. If I write “product_visibility=ABCD” in the URL, then “ABCD” is displayed on the website where “featured” was.
Hello, unfortunately, this does not work. In your code it says “Featured products” but on my website “featured” is displayed. It is not clear to me how your code should change this text.
It seems to me that the “featured” text is fetched via the url variable “product_visibility=featured” and therefore cannot be translated. If I write “product_visibility=ABCD” in the URL, then “ABCD” is displayed on the website where “featured” was.
Quote from Pablo Borysenco on November 11, 2024, 13:19Please drop me exact link to the issue
Please drop me exact link to the issue
Quote from Bartz on November 11, 2024, 15:35Unfortunately I can't show the site at the moment because it is under development.
But I have found another site that does the same thing:
https://at4.com/de/categorie-produit/chambres/?product_visibility=featured
Here, the same: “featured” is not translated and you can replace it with other text in the url that is then displayed. E.G:
https://at4.com/de/categorie-produit/chambres/?product_visibility=1234
Any idea how to change/translate the “featured” text in such a case?
Unfortunately I can't show the site at the moment because it is under development.
But I have found another site that does the same thing:
https://at4.com/de/categorie-produit/chambres/?product_visibility=featured
Here, the same: “featured” is not translated and you can replace it with other text in the url that is then displayed. E.G:
https://at4.com/de/categorie-produit/chambres/?product_visibility=1234
Any idea how to change/translate the “featured” text in such a case?
Quote from Pablo Borysenco on November 12, 2024, 11:20Hello
This element must be in the filter for correct display. I mean the featured checkbox should be displayed in the filter
Hello
This element must be in the filter for correct display. I mean the featured checkbox should be displayed in the filter
Quote from Bartz on November 12, 2024, 13:32Hello, thank you for your answer.
the featured checkbox (in German “Top Artikel”) is also displayed in the filter.
However, when selecting it, “featured” is displayed on the right and not “Top Artikel”.
Image: Screenshot-2024-11-12-122549 hosted at ImgBB — ImgBB
What do I have to change so that “Top Artikel” is also displayed on the right side?
Hello, thank you for your answer.
the featured checkbox (in German “Top Artikel”) is also displayed in the filter.
However, when selecting it, “featured” is displayed on the right and not “Top Artikel”.
Image: Screenshot-2024-11-12-122549 hosted at ImgBB — ImgBB
What do I have to change so that “Top Artikel” is also displayed on the right side?
Quote from Pablo Borysenco on November 13, 2024, 12:04Hello
What plugin version number are you using?
Hello
What plugin version number are you using?
Quote from Bartz on November 13, 2024, 12:09Hello,
Husky Plugin Version: Version 3.3.6.4
Woocommerce Version 9.4.1
Wordpress Version 6.7
Theme: Shoptimizer (newest Version)
Hello,
Husky Plugin Version: Version 3.3.6.4
Woocommerce Version 9.4.1
Wordpress Version 6.7
Theme: Shoptimizer (newest Version)
Quote from Pablo Borysenco on November 13, 2024, 14:11Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png and wp-admin+ftp access - https://share.pluginus.net/image/i20230222134615.png - I will check it
Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png and wp-admin+ftp access - https://share.pluginus.net/image/i20230222134615.png - I will check it
Quote from Bartz on November 26, 2024, 11:53Hello, unfortunately we are currently unable to set up access.
Unfortunately, the problem persists. The “featured” text is not translated. What other solutions are there?
Thank you.
Hello, unfortunately we are currently unable to set up access.
Unfortunately, the problem persists. The “featured” text is not translated. What other solutions are there?
Thank you.
Quote from Pablo Borysenco on November 26, 2024, 12:52Hello
Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png
Hello
Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png
Quote from Bartz on November 26, 2024, 13:04Thank you for your answer. I have added the key.
Thank you for your answer. I have added the key.