-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qTranslate - Title problem #30
Comments
Hello, We don't currently support multi-language but we may do so in the future if many people want this.
After re-setting the FB plugin (Reconfigure > Advanced Options > Delete), you could try temporarily disabling the qTranslate plugin, setting up with Facebook, then re-enabling the plugin. To see if the problem resolves.
It looks like this specific plugin is modifying the title field of the product with [:en] and [:lt] Plugins > Editor > (On the right) Facebook For WooCommerce > (Search For) facebook-commerce.php Look for this line : Replace it with: Click Update File to Save. Then Force-Sync the products to FB (or reset and resync again). |
Wow! Great! The second option works perfectly! Thank you a lot. Now I hope to fix it for description. 😄 |
Great! Keep in mind that if you ever need to upgrade the plugin, you will need to reapply this fix after the upgrade. Is there any special character separating the languages inside the description? If so we could try to come up with a similar fix based off of that. Even if there isn't a visible one maybe there's an invisible one (e.g. some html tag). Aside : To any others that may be reading this and using the qTranslate plugin, replacing the ':lt' to the language you want inside the suggested technical fix in the above post will solve the problem for you as well. |
It's possible. We apply some cleaning to the description so maybe we are filtering out the [:] and other tags before sending to fb. You can try applying a similar fix in fbproduct.php so that line would read preg_replace('/.*:lt\]([^\[]*)\[.*/i', '$1', $post->post_content)); If that does not work, there is a different workaround you can do though, by simply editing the 'Facebook Description' on each product's config page (in Woo). This will override what you send to Facebook as the Description, but you may have to manually add this for every product, which could be a pain. |
I don't think that doing the replacement at that spot in your screenshot would work, because the description at that point already has any special characters removed. I am suggesting that you edit a different file, fbproduct.php, and look for the line that says $post->post_content); it should look like this : |
Sorry, I don't understand. So I have to replace this line: I guess not like this, but I dont understand how it should look. Sorry for my lack of knowledge. :) |
You are correct except the line you posted is not exactly right. This is how the line should look exactly:
I tested this on our test servers, in the worst case it will do nothing. But I'd like to advise caution : if you save the incorrect line, it may crash your backend, in which case you will have to manually delete the plugin in order to recover. In any case, I recommend the second workaround, using the Facebook Description, as there is no telling if this current approach will really succeed. (We don't know for sure if the [:lt] is used in the description like in the title). |
Yeah, I guess it won't work because it haven't changed anything. So, I'll stick to the second option. Thank you for you help with the title, it was really needed. Best luck! |
This may be related to issue #10 |
Glad I could help. We'll keep in mind full support for compatibility with qTranslate in the future based on demand. |
Hope support comes. There are many shops out there using qtranslate. It works really nicely in woocommerce, only not for facebook woocommerce. Anyway. Thanks sofar for what works already. |
@frisonl We're always willing to review pull requests for this kind of support. Please consider sending us one! We've done some ground work for it in this issue already, so I think a simple change to detect the existence of the qTranslate plugin and then applying the solution described in this issue could work. |
Hi again, after last update (version 1.7.3) I see that this default line looks different: How should I change it now? Thank you. |
Ah, sorry, I think I managed by myself.
|
Hello again, After 1.7.7 update I see that code looks completely different. Could you help me to fix that problem once again but with the new code? Thank you! |
Hello guys,
I have one problem and don't know how to fix it and if it's possible to do that.
I am happy about the plugin but there is one problem:
I am using qTranslate plugin for multilanguage site and when I sync my products to FB shop, the title is shown like this "[:lt]The Bluebeards Revenge skutimosi kremas 20 ml[:en]The Bluebeards Revenge Shaving Cream 20 ml[:]" because qTranslate creates two pages and shows the one which language is set.
Is there any way to make it show only in Lithuanian?
Btw, description also shows in both languages but without [:] signs and I can change description manually in product's editing page.
Sorry, if something was difficult to understand, I am not native english speaker.
Thanks!
The text was updated successfully, but these errors were encountered: