Page 6 of 6 FirstFirst ... 456
Results 51 to 60 of 60
  1. #51
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    311
    Plugin Contributions
    0

    Default Re: V158 Japanese language pack

    Final update:
    All solved - I am officially a dummy.
    First, I installed the Sagawa module in unencapsulated form (slight mods to _Sagawa.php class and sagawa.php shipping module files), and this installed perfectly. After which I discovered I was missing a couple of custom functions needed only in the shipping modules.
    After adding these in functions_addresses.php, I uninstalled the unencapsulated version and retried the now proven encapsulated version. Running uninstall correctly removed all configuration keys.
    This is when I finally realized that installing the plugin does not create configuration keys - only the tarif table (which part I had already solved previously).
    Installing the actual payment and shipping modules provided by the plugin then correctly inserted the configuration keys.

    I hope this helps someone else when trouble-shooting in future.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

  2. #52
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    311
    Plugin Contributions
    0

    Default Re: V158 Japanese language pack

    Hello @pilou2
    All issues with the modules resolved.
    I did find that the _Yubin.php class had
    PHP Code:
       function GetSizeClass() {
            
    $a_classes = [
                [
    0,  60,  30],  // 区分,3辺計,重量
                
    [1,  80,  30],
                [
    210030],
                [
    312030],
                [
    414030],
                [
    516030],
                [
    517030],
            ]; 
    where the last line should change 5 -> 6.
    I've written my own boxing logic for my specific store requirements (boxing of wines), and noticed that in the original modules the $bgirth variable might benfit from being modulated to display as the available box size for the corresponding module. So instead of displaying "90 cm", it could possibly be more beneficial to state "100 size" as that would be the corresponding box size.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

  3. #53
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    218
    Plugin Contributions
    7

    Default Re: V158 Japanese language pack

    @gernot
    Thank you very much for this correction. It has been updated on GitHub.
    For the box girth, effectively, if you send products of regular size and use standard boxes, it might be a good idea to display the box category size. In my shop I had to send very variable size products, especially some long and thin ones which need custom cut boxes. In this case seing the real box girth estimation helps to avoid making boxes larger than charged on invoice. For example if estimated girth is 98, I really take care to make a box that is not over 100. In the contrary, if girth is 85 then I know I can use a box that fit approximatively without risk of oversize.

  4. #54
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    311
    Plugin Contributions
    0

    Default Re: V158 Japanese language pack

    Hello @pilou2
    Thank you for the explanation, that makes sense. I had been using Yupack Chilled (cloned from the Yupack module) and added it to the encapsulated plugin you provided. I attach the created and modified files here. The module uses the same tarif table as Yupack, but adds a surcharge. There are differences in the permitted sizes and delivery times. The icon is roughly created. In case you wish to add it to your plugin (maybe some cleanup to adjust to the plugin standards).
    Yubin.zip
    Note: Oops, I forgot to revert to using the original prefecture codes, but original code is in both the class and module file, merely commented out.
    Last edited by gernot; 7 Jun 2025 at 04:27 PM.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

  5. #55
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    311
    Plugin Contributions
    0

    Default Re: V158 Japanese language pack

    Hello @pilou2
    A further minor issue with the shipping modules is that in the GetQuote() function in the _Yamato.php, _Sagawa.php and _Yupack.php classes, $this->quote['cost'] is undefined in the case of an error, such as when the parcel is oversize. This causes warnings in the logs.
    I tested a simple workaround, by defining this->quote['cost'] = 'Error' (i.e., not a number, which might be accidentally used), and this appears to avoid warnings being generated.
    Example for the _Yamato.php class:
    PHP Code:
    if ($n_sizeclass 0) {
        
    $this->quote['error'] = ($n_sizeclass == -1) ? MODULE_SHIPPING_YAMATO_TEXT_OVERSIZE MODULE_SHIPPING_YAMATO_TEXT_DIMENSION_MISSING;
        
    // debugging - cost not available if error
        
    $this->quote['cost'] = 'Error';
    } else {
        
    $this->quote['cost'] = $a_pricerank[$s_rank][$n_sizeclass];

    Probably it will be better to simply initialize cost and let it be overwritten with correct value later, since there may be several conditions being tested in different places for error.
    Last edited by gernot; 8 Jun 2025 at 02:35 PM.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

  6. #56
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    218
    Plugin Contributions
    7

    Default Re: V158 Japanese language pack

    Quote Originally Posted by gernot View Post
    Hello @pilou2
    Thank you for the explanation, that makes sense. I had been using Yupack Chilled (cloned from the Yupack module) and added it to the encapsulated plugin you provided. I attach the created and modified files here. The module uses the same tarif table as Yupack, but adds a surcharge. There are differences in the permitted sizes and delivery times. The icon is roughly created. In case you wish to add it to your plugin (maybe some cleanup to adjust to the plugin standards).
    Yubin.zip
    Note: Oops, I forgot to revert to using the original prefecture codes, but original code is in both the class and module file, merely commented out.
    Thanks for the file. I had a look at it and I will add it as a new shipping module when I have time.
    By the way, for the standard Yupack shipping module, I saw that the charge for 'weighted Yupack' is now 560 JPY for all destination instead of 510 and 520 before...

  7. #57
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    218
    Plugin Contributions
    7

    Default Re: V158 Japanese language pack

    Quote Originally Posted by gernot View Post
    Hello @pilou2
    A further minor issue with the shipping modules is that in the GetQuote() function in the _Yamato.php, _Sagawa.php and _Yupack.php classes, $this->quote['cost'] is undefined in the case of an error, such as when the parcel is oversize. This causes warnings in the logs.
    I tested a simple workaround, by defining this->quote['cost'] = 'Error' (i.e., not a number, which might be accidentally used), and this appears to avoid warnings being generated.
    Example for the _Yamato.php class:
    PHP Code:
    if ($n_sizeclass 0) {
        
    $this->quote['error'] = ($n_sizeclass == -1) ? MODULE_SHIPPING_YAMATO_TEXT_OVERSIZE MODULE_SHIPPING_YAMATO_TEXT_DIMENSION_MISSING;
        
    // debugging - cost not available if error
        
    $this->quote['cost'] = 'Error';
    } else {
        
    $this->quote['cost'] = $a_pricerank[$s_rank][$n_sizeclass];

    Probably it will be better to simply initialize cost and let it be overwritten with correct value later, since there may be several conditions being tested in different places for error.
    I actually corrected this last week (on GitHub) by intializing $this->quote['cost'] to Null, The oversized was already taken care of elswhere.
    Thanks for your detailed screening and reports! It will hepl improve code.

  8. #58
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    311
    Plugin Contributions
    0

    Default Re: V158 Japanese language pack

    Many thanks @pilou2,
    I wil update the modules accordingly.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

  9. #59
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    218
    Plugin Contributions
    7

    Default Re: V158 Japanese language pack

    New Shipping module 'Refrigerated Yu-Pack' added to GitHub in development version 1.02.

    @Gernot, I removed your specificities, the option over 25 Kg that does not exists for Chilled Yu-Pack and did some cleaning. The name 'Refrigerated Yu-Pack' was used rather than 'Yupack Chilled' because this is the name on Japan Post site. I resized the icon too.
    There was a file missing in what you sent, catalog/includes/classes/observers/auto.yupackchilled.php. It is an observer used to activate/de-activate the module for some categories or products. Please check you have it in your custom version or these functions will not work.

  10. #60
    Join Date
    Feb 2017
    Location
    Tokyo, Japan
    Posts
    311
    Plugin Contributions
    0

    Default Re: V158 Japanese language pack

    Thank you @pilou2 for the corrections. I do have the catalog/includes/classes/observers/auto.yupackchilled.php file, but it seems I forgot to include it in the bundle I attached.
    Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

 

 
Page 6 of 6 FirstFirst ... 456

Similar Threads

  1. Japanese Language Pack problem
    By i.chan in forum Addon Language Packs
    Replies: 1
    Last Post: 14 Jun 2009, 11:21 PM
  2. Japanese Language Pack
    By namasa in forum Addon Language Packs
    Replies: 74
    Last Post: 22 Dec 2008, 03:29 PM
  3. japanese language pack...
    By fish_who in forum Addon Language Packs
    Replies: 1
    Last Post: 10 Aug 2006, 04:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR