GithubHelp home page GithubHelp logo

hyyan / woo-poly-integration Goto Github PK

View Code? Open in Web Editor NEW
183.0 14.0 66.0 2.71 MB

Looking for maintainers! - Wordpress WooCommerce Polylang Integration

Home Page: https://wordpress.org/plugins-wp/woo-poly-integration/

License: MIT License

JavaScript 3.17% PHP 95.86% Shell 0.45% Hack 0.52%
php polylang woocommerce wordpress-plugin

woo-poly-integration's Introduction

WordPress WooCommerce Polylang Integration

project status Latest Stable Version Wordpress plugin Wordpress Wordpress rating License

Given that I am not using Wordpress these days and I haven't really been using WooPoly for a while. I am looking for maintainers to take over this project. If you're interested, please reply to this issue or get in touch with me via email: hyyanaf [at] gmail [dot] com


This plugin makes it possible to run multilingual e-commerce sites using WooCommerce and Polylang.It makes products and store pages translatable, lets visitors switch languages and order products in their language. and all that from the same interface you love.

Read the full docs

Features

  • Auto Download Woocommerce Translation Files
  • Page Translation
  • Endpoints Translation
  • Product Translation
    • Categories
    • Tags
    • Attributes
    • Shipping Classes
    • Meta Synchronization
    • Variation Product
    • Product Gallery
  • Order Translation
  • Stock Synchronization
  • Cart Synchronization
  • Coupon Synchronization
  • Emails
  • Reports
    • Filter by language
    • Combine reports for all languages

What you need to know about this plugin

  1. WooCommerce and therefore this plugin needs PHP7 and above
  2. This plugin is developed in sync with Polylang and WooCommerce latest version
  3. The plugin support variable products , but using them will disallow you to change the default language , because of the way the plugin implements this support. So you have to make sure to choose the default language before you start adding new variable products.
  4. Polylang URL modifications method The language is set from content is not supported

How to install

Classical way

  1. Download the plugin as zip archive and then upload it to your wordpress plugins folder and extract it there.
  2. Activate the plugin from your admin panel

Composer way

  1. run composer command : composer require hyyan/woo-poly-integration

In all cases please do ensure you have Polylang and WooCommerce activated and setup before you Activate this plugin from your admin panel

Please note the getting started notes: https://github.com/hyyan/woo-poly-integration/wiki/Getting-Started

Setup your environment

  1. You need to translate woocommerce pages by yourself
  2. The plugin will handle the rest for you

Translations

Contributing

Everyone is welcome to help contribute and improve this plugin. There are several ways you can contribute:

  • Reporting issues (please read issue guidelines)
  • Suggesting new features
  • Writing or refactoring code
  • Fixing issues

woo-poly-integration's People

Contributors

ahmedofali avatar aixkalur avatar annih avatar decarvalhoaa avatar dennisnissle avatar ebelrose avatar gonzomir avatar hyyan avatar jon007 avatar marian-kadanka avatar masato-igarashi avatar mephistopheles4 avatar mrleemon avatar mweimerskirch avatar nicobea avatar nunhes avatar szepeviktor avatar teemusuoranta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

woo-poly-integration's Issues

deactivate meta synchronisation

Hi,
If I deselect all checkbox of a group (general, stock etc) of Meta list (in WooPoly Advanced Options) all the check box are reseted and re-checked.
Is there a way to deactivate meta synchronisation ?

Cart does not show variation image for variation products

When a customer chooses a product variation, woocommerce shows the variation image (if exists) in the cart, to remind the customer what they chose.
This stops working if Hyyan woo-poly-integration 0.27 is activated.

Scenario:

  1. On Woocommerce 2.6.4, Hyyan 0.27, Polylang set up a product with variations and variation image
  2. Visit the site and select a product variation and add to cart
  3. Visit cart page: in the cart you see the product image not the product variation image
  4. Deactivate Hyyan plugin and refresh cart: product variation image is correctly shown
  5. activate decarvalhoaa version from https://github.com/decarvalhoaa/woopoly/releases/tag/1.0.1
  • product variation image is also correctly shown

Similarly, if you do switch languages on the cart page, decarvalhoaa 1.01 shows correct variation image, Hyyan 0.27 does not.

Attribute not translating for woocommerce API

Hello Hyyan,

We trying to get products for both languages using API and working fine with the default(English) language api but if we trying to get products for other(Hindi) language data is coming in of other languge except attributes labels. Attributes label showing in English and its value coming in hindi and all the attributes are translated from backend.

Please help me to resolve these issue.

Problem with premium plugin "Dynamic Pricing"

I purchased the plugin from woocommerce and it works good but i ve noticed an error in the cart:
https://www.dropbox.com/s/lznwh7sq1y9teb1/Screenshot%202016-09-02%2013.59.53.png?dl=0
as you can see the last column shows the old total price. as soon as i disable hyyan plugin, the price is right! any explanation for this?! the problem persists even with twenty sixteen theme and all plugins disabled except woocommerce, dynamic pricing, polylang and hyyan

How to handle Variable Product attributes with terms withtout translation

tl;tr

I have come across the following scenario and need help figuring out what should be the behavior of the plugin in this case.

Scenario:

  1. Product attribute with the name "My Attribute" is created.
    1.1. The translation is automatically added to the Polylang Strings Translations page, with the same name for all active languages.
  2. The term named "terms1" is added to "My Attribute" in the default language.
  3. A variable product titled "My Var Product" is created in the default language with the attribute "My Attribute" used to create variations.
  4. A translation of "My Var Product" is created for a second language, named "My Translated Var Product"
    4.1. The translation is created with 1 variation and all metas copied except the term slug since the term doesn't have translation. When "My Translated Var Product" is saved/published, Polylang will sync back to the product in default language "My Var Product" and remove the attribute and variation.

Althought he behaiviour is consistent with Polylang own logic, for a new user of WooPoly plugin this may be confusing and doesn't understand that the terms were not translated.

So my question: shall WooPoly create the terms translations with the same name (like for the attribute name - see point 1.1) if a translation is not found? And potentially add some inline js to alert that attribute terms need to be translated?

Alternatively, we can simple add a note to the readme file and FAQ mentioning this as a know issue?

Coupon with multiple products error

There's a bug when you create a coupon for multiple products and then try to buy for example one of these products and use this coupon. The error states that coupon can't be used.

I snooped around the source code and commented everything in Coupon.php and it's working for now. For what I undestood the logic there was that you could make one coupon and make it possible to use it for translated products as well. Personally there was no need for this as you can create separate coupons (with translated coupon codes) but I wanted to share my work-around.

My guess is that bug has something to do with the function that gets translated versions or the WooCommerce expects the IDs to be in different format.

Discount code error

First of all, thanks for the plugin, it is very essential and all your work is greatly appreciated, good job!
I am having problems with adding coupon codes and by deactivating and reactivating plugins one by one I found out that this plugin is preventing me from entering coupon codes.

The message is "Value must be less than or equal to 0" whenever I want to apply a coupon in the cart. Any ideas how to reslove? Using latest of everything with SwiftIdeas Dante theme

thanks

Support Message/Flash message often appears in backend

Hi there,

since I activated you plugin (thanks for sharing it!) I often see the message in the backend that will be displayed by
getView('Messages/support')

That sucks as I can't click it away and silence it.
I guess this is not how you planed it and maybe there is a bug at your or my end.

Could you please have a check?

Sebastian

admin-ajax.php process on homepage that delay loading of website

Hello,
First thank you for the plugin very useful to connect Polylang and WooCommerce.
I had performance issue with the loading of my website and after some investigation I discover that one source of issue was with your plugin that run a process admin-ajax.php which takes more than 2 secondes to load. This process is loaded on the homepage of my website even there isn't any woocommerce module on this specific page.
When I inspect the process I found these informations: "div.widget_shopping_cart_content: "

↵↵
    ↵↵ ↵
  • Votre panier est vide.
  • ↵↵ ↵
↵↵↵
""
So I guess it's testing if there is a basket already with products, or something like that. Even that no basket is shown on homepage.
I had try to deactivate the plugin to see if it was from there (or if it was woocommerce himself) and I had the confirmation that it's your plugin.
Is it a normal way of working? Is there a configuration that I've done wrong? Is is a way to correct this?
Thanks a lot for the feedback.
jihes

url subdomain gets translated

Hi,

I have my woocommerce shop installed in a subdomain.
Polylang, Poly Integration and the language switcher work fine.
But when I am in the German shop:
http://www.shop.domain.com/shop
and want to change the language to french the url is translated.
Instead of
http://www.shop.domain.com/magasin
it changes to
http://www.magasin.domain.com/magasin

A wrong url of course leads to a wrong or not existing page.

Why is the url translated? How can I repair that?

Thank you!

Woocommerce API Limitations

Hi,
It seems that using this API, woocommerce api is limited to the default language. So it is not possible to get all the products or the products available on the other languages. Please provide a fix for this. thanks

Variations sku are sync regardless of the Meta List setting

Need help figuring out the right behavior here.

I guess that the SKU meta sync setting was intended for Product, Variable Products and Group Products but not to Variations.

As a side note, I don't sync any SKUs because it helps with the way my shop reporting works. The current implementation syncs variation SKUs regardless of the settings.

I'm wondering if we could check whether the setting is on or off and respectively sync or default to the woocommerce default behavior. Any views?

How can i fix "car_list"

Hello sir,firstly thanks you for the plugin. But I have a little problem,

When I click on a category directory, I get all the goods of the three languages that I use, but if I click on the catalog of the native language, then everything is working correctly and displays the product only in their native language.

Maybe i should add the some filtr?

setDefaultPermalinks Undefined Index

I'm getting undefined index warnings for setDefaultPermalinks in Hyyan\WPI\Permalinks on a fresh install (when no woo permalinks have been setup).

Wrong Return URL after Payment Due to this Plugin

I am using this plugin together with the "PostFinance E-Payment Gateway for WooCommerce" by mame dev. After finalizing a payment I got to see the "Oops, this page cannot be found" every time. I went through lengthy trouble shooting sessions with the developer mame dev until he found out that it is actually this "Hyyan WooCommerce Polylang Integration" plugin causing the return URL to be:
http://www.[domain].com/en/checkout//1769/order-received/1769/?key=wc_order_56212c7e09a10&v=d1a0eba20b32
instead of
http://www.[domain].com/en/checkout/order-received/1769/?key=wc_order_56212c7e09a10&v=d1a0eba20b32
The PostFinance plugin gets its return URL through the WooCommerce function "get_return_url()", which is apparently modified by this plugin in some mysterious way.
Can you please fix this bug so that this WooCommerce Polylang Integration plugin works seamlessly with all payment gateways? Thanks very much!

Catchable fatal error: Order List on Dashboard getProductTranslationByObject() is being given a Boolean instead of an WC_Product Object

First,

Let me say thanks for taking the time to make this plugin; it's greatly appreciated!

I am having a problem after upgrading my WooCommerce and WordPress cores. I am getting the following error when looking on my Orders list in the dashboard:

Catchable fatal error: Argument 1 passed to Hyyan\WPI\Utilities::getProductTranslationByObject() must be an instance of WC_Product, boolean given, called in /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Order.php on line 105 and defined in /wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Utilities.php on line 88

Cheers man!

Nathaniel

support for WC Paid Listings

Currently, the plugin does not work with Paid Listings variable type of products. Any chance support for this could be added?

Translated cart pages do not set DONOTCACHEPAGE

Woocommerce currently sets:

                define( "DONOTCACHEPAGE", true );

for all dynamic pages such as cart, account etc.

This means that woocommerce dynamic pages are automatically excluded from WP Super Cache and any other tools that implement this.

However with woo-poly-integration activated this is not set on the translated versions of these pages, so the out-of-the-box behaviour is that translated cart pages get cached.

see:

    public static function prevent_caching() {
        if ( false === ( $wc_page_uris = get_transient( 'woocommerce_cache_excluded_uris' ) ) ) {
            $wc_page_uris   = array_filter( array_merge( self::get_page_uris( 'cart' ), self::get_page_uris( 'checkout' ), 
...

Testing suggests this may only apply to the Cart page - the Account page in different languages does not appear to get cached.

Apart from code fixes, the alternatives for WP Super Cache are:

  • disable ALL page caching
  • make sure you add ALL the slugs for all the translations to the exclude list (fragile to adding languages / changing slugs)

Also note that response headers are correctly set for translated cart page:

Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache

it is just the DONOTCACHEPAGE which is missing.

Also tested, this is not fixed in fork decarvalhoaa 1.01.

Variation price in cart and checkout

Hi !

Thanks for your work man you saved me a lot of coding :)

I've noticed an issue about the price displayed in the cart and in the review order table in the checkout page.
The price on the cart page is the price of the cheapest variation of the displayed product.
The price on the checkout page is 0.

I have :
Hyyan WooCommerce Polylang Integration 0.25
WooCommerce 2.4.1
Polylang 1.7.12

Without touching anything else, the desactivation of Hyyan WooCommerce Polylang Intergration resolves the problem so I guessed it has something to do with it.

Let me know if you want any other information but I'm pretty sure you are already aware of the problem. If I can help feel free to ask.

Thanks for your otherwise very great job, I think it's a great plugin.

Best regards,

Johann

Auto Translate Woocommerce Page

@decarvalhoaa I think it is time to add the Auto Translate Woocommerce Page feature , it is not really hard to add this feature but I was avoiding this because it requires adding more languages support to handle the page names translations , but we can translate names be adding the language slug as a start

For example : shop -> shop-de and so on ....

Problem with cart translations

Hi,

i have a problem with the translations of the cart when adding, removing or updating items.
While everything else works fine with the translations the popup windows i get aren't translated.
The url of one product is here http://cretanflavors.com/sidal/?product=klidi-germaniko-cr-v-12-13
If you add it to the cart by pushing ΠΡΟΣΘΗΚΗ ΣΤΟ ΚΑΛΑΘΙ you will get an english popup message and not a greek one even though to .po & .mo files are correctly translated.
If i disable the plugin everything works fine with the translations but i have other issues.
Looking forward for your help.

Thank you very much.

Wrong url for orders in "My Account" Page

There is a bug on "my account" page : if I view an order (/my-account/view-order/123/) and I want to go back on "my account", it will redirect to /my-account/view-order/ instead of /my-account/ so when I click again on an order, it will open /my-account/view-order/view-order/123/ instead of /my-account/view-order/123/

( @hyyan I know you dropped support of this plugin but if, one day, you want to work on it again, this can be useful 😄 )

Stock not synced

Hi,

I checked the Stock Sync in settings.
Despite this, when manually changing the stock on a product, its translations are not synced.
I'm talking about this field:
Stock field

Did I missed something ?
Thanks

emails sent in english but web site is french

Hi,
My e-shop is both set up in both french and english, the language is set to French, but still the order confirmation email is sent out in english to the customers. This is not what I want :-)
Can you please help me to get these emails sent out in French ?

Thanks / merci
Carole

variation product and stock sync with language

In the main language product page
I have chosen in the field " product Data" the option " variable product".
I am setting in" attribute" menu two attributes : " size" and " color"
I choose the size between 17" | 19" and the color Matte black| Glossy white.

In the menu " Variation" i am defining 3 possible variations:

  1. 17" and Matte Black
  2. 17" and Glossy White
  3. 19" and Matte Black

Then i click on "expand" and i define the sales price.

it works fine on the main language page of the product, but it does not update automatically the other language version of the product.
And, when I edit the other languages pages manually, either i cannot save the changes ( not active) or it mix up some set up in a way that on the web site the choice of the variation don't work properly.

It seems that there is an issue between "variable product" and multiple language management. Any tips?

Same question goes for the stock management: How to have the stock management of the main language page synchronized with the other language page?

in other word: if i have 10 products, and a customer buys one on the main language site, i want the stock to be 9 products left on all the versions.

Thanks a lot for any help...

Error Message: The plugin can not function correctly

I have both Polylang (Pro) and Woocommerse installed, but I keep getting an error message at the top of the admin screen: "The plugin can not function correctly , the plugin requires WooCommerce and Polylang plugins".
What is the problem? I tried reinstall Hyyan plugin, but it didn't work. I have been using WooCommerse for a few years now, so, reinstalling it is out of question.

At the same time, when creating a duplicate product in the second language, variable product does not work. Variable products become a regular simple product. Is that because the plugin is not working properly?

Thank you for your help!

Metas list checkbox values not saving

Hello!
Every time I try to uncheck 2 check boxes from the Meta List (Product Attributes, Default Attributes) and submit to save, the values are not saved on the refresh.

Thanks

cart, checkout, account not translated

Hi,
I try to make my woocommerce shop bilingual, English and German.
I use woocommerce, hyyan woo poly integration, Polylang theme strings.
A lot of the translations work.
But the cart, my accout and checkout pages are not translated from English to German.
I got poedit and looked at the files. The wp-content/languages/plugins/woocommerce-de_DE.po has all the right translations. But they don't show in the shop.
What am I doing wrong?
Please help me!

Incorrect language for emails

Hello again,

It's seems like order emails are sended only in default language, even if "Use order language whenever woocommerce sends order emails" is checked.
The only translated email is the "cancelled order" email, sended to admin.

Online payment page not in the proper language

Hi,
our site has two languages, English and French. We're using Woocommerce, Polylang and Hyyan Woo Poly integration. Whatever the language that we're using when using the web site - English or French - , we're always redirected to the French version of the bank page (Monetico system). We can see with the debug page that the site does always call the French version of the bank page, so not an issue on the bank side.
Would you know what might be wrong?
Thanks,
Thomas

Variation Attribute not synced

Hello Hyyan,

Thanks for the awesome plugin.
There is a problem with variable product attribute when creating the copy of the product variations for another language. The meta 'attribute_' is not synced. All the other metas are being copied except the main attribute.
I'm a new developer and as far as I've looked into it the problem seems to be in
File: src/Hyyan/WPI/product/variation.php
Function: protected function copyVariationMetas($from, $to){...}

the array $translated is always empty so the value is not getting copied. I'm not sure if that is the problem or I'm doing something wrong. Can you check that please?

Regards,
Akash Kanojia

Page translations

Hi!

First of all, thank you for your work, the plugin is great.
But I have a little problem here. I installed Polylang, WooCommerce, and your plugin. (I'm using two languages on my site.) Then I tried to add a new page translation to the 'Shop' page generated by WooCommerce, and I got the followin error message:
Fatal error: Using $this when not in object context in /<page-root>/wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Product/Meta.php on line 47
Could you please give me a hint what I'm doing wrong, or how am I supposed to configure the shop, cart, product page, etc. translations?

Thank you in advance, I really appreciate your help.

Notice: get_translations was called incorrectly

Hi,

Thanks for the plugin :)

I wanted to report a notice. I'm using WP 4.5, Hyyan WooCommerce Polylang Integration 0.25 and Polylang 1.8.5 :
Notice: get_translations was called incorrectly in .../wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Endpoints.php on line 306: the call to $polylang->model->get_translations() has been deprecated in Polylang 1.8, use PLL()->model->post->get_translations() instead. Error handler in .../wp-content/plugins/polylang/include/model.php on line 546

Hope that will help.

Séb.

How to add another language manually?

Dear all,

I am trying to use this plugin to translate woo-commece to the Russian language. Unfortunalty i get an error that the language is not suported.. Is there anyway i contribute to the plugin with my own translations? or add it manually as a seperate file or something like that?

Thank you.
Regards,
I.O.

Error checkout

When i want to confirm order i get:
Fatal error: Call to undefined function Hyyan\WPI\wc_get_product() in /home/_/domains/_.com/public_html/wp-content/plugins/woo-poly-integration/src/Hyyan/WPI/Utilities.php on line 72

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.