[Resolved] WooCommerce multilingual PayPal amount is wrong

Home Support English Support [Resolved] WooCommerce multilingual PayPal amount is wrong

This topic contains 28 replies, has 3 voices, and was last updated by  vayu 1 year, 5 months ago.

Author Posts
Author Posts
April 25, 2013 at 8:02 am #122485

vayu

Hi.
I have setup a WooCommerce Multilingual eshop here: http://bikesinabox.com/
I am running:
WooCommerce 1.6.6.
WPML Multilingual CMS 2.7.1
WPML String Translation 1.6.1
WooCommerce Multilingual 1.4

I know these are not the latest versions, but am afraid to upgrade. The client says that they don't have money to upgrade now, but want this fixed. I feel responsible to fix this issue, but having to upgrade all plugins will be a big job.

The issue is that when paying with PayPal in other languages than English, the total amount in the PayPal checkout is that of the English.
Ex:
€ 399
DKK 399
SEK 399
Where it should be much more in DKK and SEK.

Is there any fix to this other than trying to update and hope that this is fixed in the upgrade?

Thanks
Vayu

April 25, 2013 at 9:13 am #122521

sarah.n
Forum moderator

Vayu,

I'm afraid that updating is the only possibility to benefit from a quality tested fix.

I would strongly suggest that you update a clone test installation of your clients site first. This way we would know whether this is something that has been fixed in the newer versions of the plugins or not without running the risk of an upset client who went through an update that he did not want to do in the first place only to find out that the issue is still not fixed.

What do you think?

April 26, 2013 at 9:48 am #122858

vayu

Hi Sarah.
Thanks for the quick reply. I have spent the most of a days work trying to get the shop to work, but luck.

I upgraded everything to latest in a test site.

The first hurdle is adding attributes to a product other than english.
I cannot test anything else before I have that setup correctly.
http://bikesinabox.com/test/product/bike/
http://bikesinabox.com/test/da/product/cykel/

When I add an attribute to a product other than english and I press save. After it saves that attribute disappears.

I have created a user for you guys, so you can log ind and hopefully help me. Is there someone who could help me out with this issue? :-)

Thanks
Vayu

April 26, 2013 at 10:30 am #122892

sarah.n
Forum moderator

Vayu,

I will email you shortly in order to get temporary access details to the test install. Please stand by.

April 26, 2013 at 10:31 am #122894

sarah.n
Forum moderator

Email was just sent.

April 26, 2013 at 10:53 am #122904

sarah.n
Forum moderator

Vayu,

I received the wp-admin access details you've sent. Thank you.
Is it possible please to also have FTP access?

April 26, 2013 at 11:29 am #122914

sarah.n
Forum moderator

Vayu,

As I have no FTP access yet, could you please replace WCML with this development version and get back to me when ready?

https://dl.dropboxusercontent.com/u/65582761/woocommerce-multilingual.zip

Thanks.

April 26, 2013 at 12:55 pm #122940

sarah.n
Forum moderator

Vayu,

This is to let you know that the new FTP details you've sent me work just fine. I see the problem and I just informed our WCML developer concerning it.

I will update you here as soon as I hear back from him. Thank you for your patience!

April 29, 2013 at 2:35 pm #123424

David Garcia Watkins
Forum moderator

Dear Vayu,

It looks like the woocommerce swatches plugin is hiding the language information from the Products -> Attributes screen. I have disabled for now and you will see that the translated terms are not linked to the original terms. This is crucial for variation synchronization to happen. Edit each of your translated terms and select the original term for it and try again.

Once you have everything linked you may be able to activate the swatches plugin again. We have a task to look into this extension in a near future.

Let me know how it goes,
Best,
David

April 29, 2013 at 8:57 pm #123468

vayu

Thanks David, got it!

Now that I have done that and activated the swatches plugin again, this error message now appears on the page:
https://www.evernote.com/shard/s3/sh/c0d60c8d-e6c2-40dd-aaea-d119e206bfff/5c1fa37601fa71764cc086076b65d2d6

I did have a go at it, but cannot see why this error occurs. Maybe this function is called at a point when the get_current_screen() is not available.

Do you have clue?

April 30, 2013 at 4:53 pm #123726

David Garcia Watkins
Forum moderator

Hi Vayu,

Yes, thats a warning that slipped in the development version, its fixed now:
http://downloads.wordpress.org/plugin/woocommerce-multilingual.zip

Best,
David

May 1, 2013 at 9:55 pm #124158

vayu

Hi David. Thanks for the feedback. I can inform you that I get a fatal error in line 423 in the woocommerce_wpml.class.php file. I am guessing it's because you use an anonymous function inside the map_array function. Probably because of the php version on this server.

Could you possibly change this to using a named function instead?

IE, something like this:

function email_notifications_map($val) {return $val.'_notification';}
    
	function translate_email_notifications() {
		$email_actions = array( //the first ones worked for WC 1.6
			'woocommerce_order_status_pending_to_processing', 
			'woocommerce_order_status_pending_to_completed', 
			'woocommerce_order_status_pending_to_on-hold', 
			'woocommerce_order_status_failed_to_processing', 
			'woocommerce_order_status_failed_to_completed', 
			'woocommerce_order_status_pending_to_processing', 
			'woocommerce_order_status_pending_to_on-hold', 
			'woocommerce_order_status_completed',
			//next are new, at least since WC 2.04; they also began to add the postfix '_notification'
			//not clear they are consistent accross versions between 2.0 and 2.0.8, so adding them without postfix as well
			'woocommerce_new_customer_note',
			'woocommerce_reset_password',
			/* the following are not added because messages to admins should not switch language; left here for reference of other _notification actions
			'woocommerce_low_stock', 
			'woocommerce_no_stock', 
			'woocommerce_product_on_backorder'*/
		);
		//added for WC 2.0.x
		
		$email_actions = array_merge( $email_actions, array_map('email_notifications_map', $email_actions ) );

		foreach ( $email_actions as $action ) {
			add_action( $action, array( &$this, 'translate_email_notification'), 9 );
		}
	}
May 2, 2013 at 2:57 pm #124391

vayu

Hi again.
I am sorry for this continuous request for assistance, but I still can't get the translation of attributes to work properly with products.
Attributes on the translated products will not be saved properly. It seems like they are just copied. This in turn, results in it not being displayed correctly on the frontend product page.
Here is the english version: http://bikesinabox.com/test/
Here is the danish version: http://bikesinabox.com/test/da/

Does anyone have a clue what could be wrong?

May 2, 2013 at 9:05 pm #124483

vayu

I have now upgraded the server to use PHP 5.4 and I no longer get an issue with the anonymous function in the woocommerce_wpml.class.php file.

However, it did not solve my issue the attributes and products.
Please, is there anyone who can help. I don't understand why this is not working and I am wondering if I am the only one who has this problem? I have tested this with a clean WP install using Twenty Twelve theme and only using relevant plugins. My client is screaming at me. :-)

May 3, 2013 at 10:30 am #124566

vayu

Hi Sarah, David or anyone. Normally you've been so quick to respond and help. What's the status? Just so I know. :-)

You must be logged in to reply to this topic.