Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Hide "Free!" price in product description
New Landing › How can we help? › Themeforest Theme Support › Neighborhood › Hide "Free!" price in product description
- This topic has 9 replies, 5 voices, and was last updated 9 years by Rui Guerreiro – SUPPORT.
-
Posted in: Neighborhood
-
June 23, 2014 at 8:14 am #84502
On the site i am building I need certain products to not have prices listed, if I leave the price field blank then they are displayed as free. These items will be FOB products, so the price will change depending on the stock ordered. All I need to do is replace the word free whereever it appears on these selected styles.
I have succesfully used the “Solid Code Theme Editor” plugin to change the FREE corner badge in the following two files:
/neighborhood/woocommerce/content-product.php
/neighborhood/woocommerce/single-product/product-image.phpBut I cannot find where I need to edit the price that appears below the image and product details, currently it says “Free!” and I need it to say FOB. which file do I edit?
June 23, 2014 at 8:52 am #84519Update: I have downloaded PoEdit on the mac and downloaded the following file “language/en_US.po” in there I have added a translation of FOB to the source text Free
Is this correct, and if so, how do i re-upload the file back into the site?
June 23, 2014 at 5:48 pm #84817Hi,
Please upload .PO and .MO files at this path /wp-content/themes/neighborhood/languages/ through FTP software.
Thanks 🙂
With Best Regards
Swift IdeasJune 25, 2014 at 9:23 am #85555Hi, I tried this and it didn’t work. this is what i did:
1. downloaded en_US.po
2. opened in poedit and added translation for Free (see screenshot)
3. Saved file, this generated the .mo file
4. Removed and archived current en_US.po + en_US.mo files
5. FTP’d new versions.
6. Refreshed page to see if the language changed.Have i missed something out? Did i need to do anything extra in poedit (am i editing the right phrase – on the site the price reads “Free!” however in poedit I can only find “Free” without the exclamation mark), should i do something after ftp’ing the file into the site to validate it?
please read my questions and advise on what step i should take next. thanks
June 25, 2014 at 10:14 am #85574update, please read comment above first!
As recommended in http://support.swiftideas.net/knowledgebase/how-to-translate-the-theme/ I edited my WordPress wp-config.php file and added this line to it, then saved the file to server:
define (‘WPLANG’, ‘en_US’);
Didn’t work, the Free! is still showing and it does not show the translated word.
June 25, 2014 at 11:29 am #85635tried a million different things, in the end thanks to google search this works…
copy this code into functions.php –/**
* WooCommerce Extra Feature
* ————————–
*
* Replace “Free!” by a custom string
*
*/
function woo_my_custom_free_message() {
return “TYPE YOUR CUSTOM MESSAGE HERE”;
}add_filter(‘woocommerce_free_price_html’, ‘woo_my_custom_free_message’);
June 25, 2014 at 11:32 am #85636Great, glad you managed to solve it!
– Kyle
June 25, 2014 at 11:32 am #85638Hi,
Great! Thanks for sharing solution. I am glad that you managed to resolve the issue. You are genius.
Thanks 🙂
With Best Regards
Swift IdeasMay 9, 2015 at 11:24 pm #173449Hi guys!
I am not as technical unfortunately and wondering if you could help me out with removing the prices off our products!
Thank You! Appreciate any help given
May 10, 2015 at 9:22 am #173463Hi,
What is you goal? You just want a catalog mode to display products?
Without having the ability to create any product order in the shop?You can turn on the catalog mode in Theme Options-> Woocommerce options -> Catalog Mode
-Rui
-
Posted in: Neighborhood
You must be logged in and have valid license to reply to this topic.