Forums / Addon Shipping Modules / HELP! Canada Post module doesn’t work in FRENCH

HELP! Canada Post module doesn’t work in FRENCH

Locked

Views: 4,427

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
24 May 2008, 5:20 AM
#1
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

HELP! Canada Post module doesn’t work in FRENCH

I have the Canada Post Module installed. 1.3.8
Zen cart 1.3.8
The module works in English (with some small discrepancies in weight calculation mentioned in another post)

But all shipping options are displayed and can be chosen Priority, Expedited, Ground.

When I switch the cart to French, they are all displayed and Priority and Ground can be chosen and will proceed to Step 2 of the checkout but if you pick Expedited it just keeps bringing you back (refreshing) the Step 1 of the checkout process.

Can someone please help with this.

The site is
www.mllem.com/mademoiselle_m

You can test it on an exact test copy of the site at
www.mllem.com/mademoiselle_mtest
username: zen
pass: 1234

thanks
nev

28 May 2008, 6:47 PM
#2
nev avatar

nev

New Zenner

Join Date:
Nov 2007
Location:
Canada
Posts:
49
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

Update:

Called CP tech support, they pulled the logs, everything is fine with the price request on their side. They see the request, and the rate they sent back.
The problem seems to be with the CP module and how it processes the return information.

Did 2 full new installs of Zen Cart 1.3.8a and added only the French Language module
On one I installed Canada Post 1.3.8
On the other the Canada Post 1.3.8b

The results are the same. All options work in English, in French Messageries prioritaires and Colis standard work, Colis accélérés displays the right price but will not process to Step 2 of checkout if selected.

If a “play” how is this one different than the others then the only thing I see is the coding returned for the French characters from CP.

<fieldset>
<legend>MODULE_SHIPPING_CANADAPOST_TEXT_TITLE (1MODULE_SHIPPING_PACKAGING_RESULTS) <img src="images/shipping_canadapost.gif" alt="MODULE_SHIPPING_CANADAPOST_TEXT_TITLE" title=" MODULE_SHIPPING_CANADAPOST_TEXT_TITLE " width="66" height="15" /></legend>

<div class="important forward">$22.03</div>

<input type="radio" name="shipping" value="canadapost_Messageries prioritaires, 2008-05-29" id="ship-canadapost-Messageries prioritaires, 2008-05-29" /><label for="ship-canadapost-Messageries prioritaires, 2008-05-29" class="checkboxLabel" >Messageries prioritaires, 2008-05-29</label>

<!--</div>-->
<br class="clearBoth" />
<div class="important forward">$12.88</div>

<input type="radio" name="shipping" value="canadapost_Colis accélérés, 2008-05-29" id="ship-canadapost-Colis accélérés, 2008-05-29" /><label for="ship-canadapost-Colis accélérés, 2008-05-29" class="checkboxLabel" >Colis accélérés, 2008-05-29</label>
<!--</div>-->
<br class="clearBoth" />
<div class="important forward">$12.88</div>

<input type="radio" name="shipping" value="canadapost_Colis standard, 2008-05-30" id="ship-canadapost-Colis standard, 2008-05-30" /><label for="ship-canadapost-Colis standard, 2008-05-30" class="checkboxLabel" >Colis standard, 2008-05-30</label>

<!--</div>-->
<br class="clearBoth" />

</fieldset>

Can someone please have a look at this.

thanks

nev

25 Sep 2008, 6:20 PM
#4
yesnomaybe avatar

yesnomaybe

New Zenner

Join Date:
Mar 2008
Posts:
34
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

Me too! A solution anyone?

29 Sep 2008, 6:01 AM
#5
yesnomaybe avatar

yesnomaybe

New Zenner

Join Date:
Mar 2008
Posts:
34
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

The problem is definitively the accent. Now is it a problem with Zen Cart that cannot handle the Data coming from Canada Post, or a problem in the Canada Post coding on their server that is returning bad data when Accent are there??

If someone have a clue, Please help! Thanks!

30 Sep 2008, 8:19 PM
#6
yesnomaybe avatar

yesnomaybe

New Zenner

Join Date:
Mar 2008
Posts:
34
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

nev:

Update:

Called CP tech support, they pulled the logs, everything is fine with the price request on their side. They see the request, and the rate they sent back.
The problem seems to be with the CP module and how it processes the return information.

Did 2 full new installs of Zen Cart 1.3.8a and added only the French Language module
On one I installed Canada Post 1.3.8
On the other the Canada Post 1.3.8b

The results are the same. All options work in English, in French Messageries prioritaires and Colis standard work, Colis accélérés displays the right price but will not process to Step 2 of checkout if selected.

If a “play” how is this one different than the others then the only thing I see is the coding returned for the French characters from CP.

<fieldset> <legend>MODULE_SHIPPING_CANADAPOST_TEXT_TITLE (1MODULE_SHIPPING_PACKAGING_RESULTS) <img src="images/shipping_canadapost.gif" alt="MODULE_SHIPPING_CANADAPOST_TEXT_TITLE" title=" MODULE_SHIPPING_CANADAPOST_TEXT_TITLE " width="66" height="15" /></legend> <div class="important forward">$22.03</div>

<input type="radio" name="shipping" value="canadapost_Messageries prioritaires, 2008-05-29" id="ship-canadapost-Messageries prioritaires, 2008-05-29" /><label for="ship-canadapost-Messageries prioritaires, 2008-05-29" class="checkboxLabel" >Messageries prioritaires, 2008-05-29</label>

<!--</div>--> <br class="clearBoth" /> <div class="important forward">$12.88</div>

<input type="radio" name="shipping" value="canadapost_Colis accélérés, 2008-05-29" id="ship-canadapost-Colis accélérés, 2008-05-29" /><label for="ship-canadapost-Colis accélérés, 2008-05-29" class="checkboxLabel" >Colis accélérés, 2008-05-29</label>

<!--</div>--> <br class="clearBoth" /> <div class="important forward">$12.88</div>

<input type="radio" name="shipping" value="canadapost_Colis standard, 2008-05-30" id="ship-canadapost-Colis standard, 2008-05-30" /><label for="ship-canadapost-Colis standard, 2008-05-30" class="checkboxLabel" >Colis standard, 2008-05-30</label>

<!--</div>--> <br class="clearBoth" /> </fieldset> ``` > > Can someone please have a look at this. > > thanks > > nev

I really like Zen Cart but man, it's so hard to get help here!! Even if a lot of people get a bug, it's like nobody cares! Anyway...

I just called back to Canada Post and I talk with them again about this problem. These guys are really great!! The one I talked with seams to understand the situation pretty well. I send them the code I quoted and he fowarded it with explanation to the programmers. I let him know that a bunch of us here having hard time with this module in french so he put this request as an urgent one. So the programmers over there should take a look at that right away. He said to call back tomorrow with the ticket number. I hope they will find a way to fix that! I'll let you know.

1 Oct 2008, 5:38 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP! Canada Post module doesn’t work in FRENCH

YesNoMaybe:

I really like Zen Cart but man, it's so hard to get help here!! Even if a lot of people get a bug, it's like nobody cares! Anyway...

"a bug" ... you're referring to something not working properly in a 3rd-party addon/contribution? :blink:

It's important to note that everything in the downloads/addons section is use-at-your-own-risk, and if it doesn't suit your needs exactly, it's up to you to adapt it as you require, or hire someone to do it for you if you're not comfortable making the changes yourself.

Nevertheless, rather than turn this into an argument, I spent the last 2 hours setting up a brand new site, installing a french language pack, verifying communications and translations, and running various diagnostics. And I've found the solution for you.

There's a line missing from the module:

/includes/modules/shipping/canadapost.php
around line 146 you'll see this section of code.
Simply insert the line shown in red here:```
$methods = array();
for ($i = 0; $i < sizeof($canadapostQuote); $i ++) {
list ($type, $cost) = each($canadapostQuote[$i]);
[B] $type = html_entity_decode($type);[/B]
if ($this->cp_online_handling == true) {
if ($method == '' || $method == $type) {


I hope you'll toss a few bills in the coffee pot as thanks ...  <http://www.zen-cart.com/donate>

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Oct 2008, 1:00 AM
#8
medic1005 avatar

medic1005

New Zenner

Join Date:
Oct 2008
Posts:
1
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

I try to add the code, but it change the "size" of my page?? any solution, ?
thank's

20 Oct 2008, 11:37 PM
#9
yesnomaybe avatar

yesnomaybe

New Zenner

Join Date:
Mar 2008
Posts:
34
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

It works perfectly for me!! Thanks a lot DrByte!

Maybe I was a little rude in my post... sorry about that. I know that module is from a third party, I know zencart is free and that it's my own problem if I want to modify it, etc. What I wanted to say, and I'm sorry if it wasn't clear (english is not my main language), it that we have a big forum here toask for help, and a lot of people are asking for help in a lot of category of sotuation, but it is very hard to get help. It looks like when people have it working well they do not stay to help others. They just don't care. In many discussion I read I see your name helping the people. You're like one of the few guys and girls who are helping. If you pass 2 hours on this problem, I probably pass more than a week to find many answers here, without any result. That's bad in a forum who is suppose to be there to help.

Anyway, It's working well now and I'm really happy of that! Thanks a lot! I will send you something for that and I hope you will take that for a good 2 hours with your girlfriend in a restaurant to have back these 2 hours in a good way! Thanks again!

6 Oct 2009, 11:47 AM
#10
springboard avatar

springboard

New Zenner

Join Date:
Oct 2009
Posts:
2
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

I'm also having the same message with the Canada Post shipping module at checkout in french: MODULE_SHIPPING_CANADAPOST_TEXT_TITLE (1MODULE_SHIPPING_PACKAGING_RESULTS)

I tried adding $type = html_entity_decode($type); to the appropriate file with no success.

Do I need some extra files for the module to work in french? everything else seems to work at checkout in french, just that one line is a problem.

:blink:

6 Oct 2009, 11:50 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP! Canada Post module doesn’t work in FRENCH

springboard:

I'm also having the same message with the Canada Post shipping module at checkout in french: MODULE_SHIPPING_CANADAPOST_TEXT_TITLE (1MODULE_SHIPPING_PACKAGING_RESULTS)

I tried adding $type = html_entity_decode($type); to the appropriate file with no success.

Do I need some extra files for the module to work in french? everything else seems to work at checkout in french, just that one line is a problem.

:blink:
Yours sounds like you're missing the french edition of the language file for the module, or maybe some parts inside the file are missing, compared to the original english version?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Oct 2009, 12:34 PM
#12
springboard avatar

springboard

New Zenner

Join Date:
Oct 2009
Posts:
2
Plugin Contributions:
0

Re: HELP! Canada Post module doesn’t work in FRENCH

DrByte:

Yours sounds like you're missing the french edition of the language file for the module, or maybe some parts inside the file are missing, compared to the original english version?

If I look in includes » languages » english » modules » shipping
there is canadapost.php file, but not in includes » languages » french.
Do you know where I could find the french files I need?

6 Oct 2009, 5:53 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: HELP! Canada Post module doesn’t work in FRENCH

If I were you I'd copy the english file into the french folder, and then translate the text. That's the fastest route.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.