Git Product home page Git Product logo

m2-jplocalize's People

Contributors

hirokazunishi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

m2-jplocalize's Issues

Can't install/ インストールできない。

I followed the installation manual but there was error:

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Veriteworks_Kana schema: current version - none, required version - 1.0.4
Veriteworks_Kana data: current version - none, required version - 1.0.4

And the module is not showing in the setup_module table in the database. Please help.

Magento 2 を composer でインストールしている必要がある

以下のドキュメントを見ると、Magento 2 が正しくインストールされていればこのエクステンションがインストール出来るように読めます。
http://docs.principle-works.jp/m2-jplocale.pdf

しかし、以下の require により、実際には Magento 2 を composer 経由でインストールしている必要があります(アーカイブを解凍する方式では駄目)。
https://github.com/Magento-Japan/m2-jplocalize/blob/master/composer.json#L20-L23

ドキュメントの修正(もしくは comoser.json の修正)をご検討頂ければと思います。

Cannot update region id.

Register and update address cannot set region id from frontend.

customer_address_entity region_id = 0 but region = '大阪府'.

Element 'referenceBlock', attribute 'cacheable': The attribute 'cacheable' is not allowed.

Veriteworks_Kanaを導入した状態でフロントの顧客情報編集画面(*/customer/account/edit/)にアクセスすると以下の例外となります。

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'cacheable': The attribute 'cacheable' is not allowed.
Line: 954


Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceBlock', attribute 'cacheable': The attribute 'cacheable' is not allowed.
Line: 954

#0 /var/www/magento2/lib/internal/Magento/Framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<layout xmlns:x...')
#1 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Framework\Config\Dom->__construct('<layout xmlns:x...', Object(Magento\Framework\App\Arguments\ValidationState), Array, NULL, '/var/www/magent...', '%message%\nLine:...')
#2 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#3 /var/www/magento2/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...', Array)
#4 /var/www/magento2/lib/internal/Magento/Framework/Config/DomFactory.php(42): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array)
#5 /var/www/magento2/lib/internal/Magento/Framework/View/Model/Layout/Update/Validator.php(125): Magento\Framework\Config\DomFactory->createDom(Array)
#6 /var/www/magento2/lib/internal/Magento/Framework/View/Model/Layout/Merge.php(461): Magento\Framework\View\Model\Layout\Update\Validator->isValid('<layout xmlns:x...', 'layout_merged', false)
#7 /var/www/magento2/lib/internal/Magento/Framework/View/Model/Layout/Merge.php(442): Magento\Framework\View\Model\Layout\Merge->_validateMergedLayout('LAYOUT_frontend...', '<body>\n   <refe...')
#8 /var/www/magento2/lib/internal/Magento/Framework/View/Layout/Builder.php(86): Magento\Framework\View\Model\Layout\Merge->load()
#9 /var/www/magento2/lib/internal/Magento/Framework/View/Layout/Builder.php(63): Magento\Framework\View\Layout\Builder->loadLayoutUpdates()
#10 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(254): Magento\Framework\View\Layout\Builder->build()
#11 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(875): Magento\Framework\View\Layout->build()
#12 /var/www/magento2/generated/code/Magento/Framework/View/Layout/Interceptor.php(414): Magento\Framework\View\Layout->getBlock('customer_edit')
#13 /var/www/magento2/app/code/Magento/Customer/Controller/Account/Edit.php(68): Magento\Framework\View\Layout\Interceptor->getBlock('customer_edit')
#14 /var/www/magento2/lib/internal/Magento/Framework/App/Action/Action.php(107): Magento\Customer\Controller\Account\Edit->execute()
#15 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Customer\Controller\Account\Edit\Interceptor->___callParent('dispatch', Array)
#17 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Customer\Controller\Account\Edit\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /var/www/magento2/generated/code/Magento/Customer/Controller/Account/Edit/Interceptor.php(26): Magento\Customer\Controller\Account\Edit\Interceptor->___callPlugins('dispatch', Array, Array)
#19 /var/www/magento2/lib/internal/Magento/Framework/App/FrontController.php(55): Magento\Customer\Controller\Account\Edit\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#22 /var/www/magento2/app/code/Magento/Store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#23 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#24 /var/www/magento2/app/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#25 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#26 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#27 /var/www/magento2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#28 /var/www/magento2/lib/internal/Magento/Framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#30 /var/www/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#31 {main}

Preconditions

Magento 2.2.0

Steps to reproduce

フロントの顧客情報編集画面(*/customer/account/edit/)にアクセスする

Expected result

正しく画面が表示される

Actual result

例外となる

Suggestion

対象ファイル:
view\frontend\layout\customer_account_edit.xml
対象箇所:
<referenceBlock name="customer_edit" template="form/edit.phtml" cacheable="false">
上記を以下のように書き換えることで解消致しました。修正のご検討をお願い致します。
<referenceBlock name="customer_edit" template="form/edit.phtml">

PHP 7: Error on product page with attributes

Magento 2.0.7 on Apache

If I have a product with attributes and I select the Japanese Product Page, then I get the error

Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given in /home/user/public_html/vendor/magento/framework/View/Element/Html/Calendar.php:86 Stack trace: #0 /home/user/public_html/vendor/magento/framework/View/Element/Html/Calendar.php(86): iterator_to_array(NULL) #1 /home/user/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(657): Magento\Framework\View\Element\Html\Calendar->_toHtml() #2 /home/user/public_html/vendor/magento/framework/View/Layout.php(542): Magento\Framework\View\Element\AbstractBlock->toHtml() #3 /home/user/public_html/vendor/magento/framework/View/Layout.php(518): Magento\Framework\View\Layout->_renderBlock('html_calendar') #4 /home/user/public_html/vendor/magento/framework/View/Layout.php(472): Magento\Framework\View\Layout->renderNonCachedElement('html_calendar') #5 /home/user/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(501): Magento\Framework\View\Layout->renderEl in /home/user/public_html/vendor/magento/framework/View/Element/Html/Calendar.php on line 86

This error only occurs when I use PHP7. With PHP 5.6, everything works fine.

Furigana not required and Address is not in order

image
image

Enabled the moduled, but not reflecting on frontend checkout form.
Furigana is not required even if I set it to "YES" in admin panel.
The address order is not in order.
image
I am using Magento 2.1.6

2.2 changes validation_rules format

until 2.1.x, we could define validation_rules below format:

'validate_rules' => 'a:2:{s:15:"max_text_length";i:255;s:15:"min_text_length";i:1;}',

since 2.2.x, it should be defined as new format:

{"max_text_length":255,"min_text_length":1}

Current InstallData.php cannot use for 2.2.x. It needs small adjustments. Also should implement migration codes for 2.1.x and 2.0.x.

Excessive Cache Use

https://github.com/Magento-Japan/m2-jplocalize/blob/master/price/Model/Locale/Plugin/ModifyPriceFormat.php#L122

With this module enabled, adding to cart hits the Magento Core Cache::load function around 600 times over what it normally would. Solution is simple, move this line inside the 'if' statement a few lines down.

Better solution is to create a static class cache based on locale so even if this gets hit many times it doesn't hit the cache. Of note, with the modified code this still results in 35 extra cache hits from the line $subject->getPriceFormat, but now it only hits on JPN stores and not on every store.

    static $_cache;
    /**
     * Remove comma from price on JPY
     *
     * @param \Magento\Framework\Locale\Format $subject
     * @param $value
     * @return array
     */
    public function beforeGetNumber(
        Format $subject,
        $value
    ) {
        $currency = $this->_scopeResolver->getScope()->getCurrentCurrency();
        $locale   = $this->_localeResolver->getLocale();

        if (in_array($currency->getCode() ,$this->helper->getIntegerCurrencies())) {
            if(!isset(self::$_cache[$currency->getCode()]))
            {
                self::$_cache[$currency->getCode()] = $subject->getPriceFormat($locale, $currency->getCode());
            }
            $format = self::$_cache[$currency->getCode()];

            if($format['groupSymbol'] == '.')
            {
                $value = preg_replace('/\./', '', $value);
                $value = preg_replace('/,/', '.', $value);
            } else {
                $value = preg_replace('/,/', '', $value);
            }

        }
        return [$value];
    }

Stripe paymentを利用時に決済額が100倍になります。

はじめまして、西 様
先日からこちらのmoduleを使用させて頂いております。

moduleの競合についてなんですが、公式Stripe-paymentを使用しております。
こちらのInstant payment-Google payを利用時に金額が100倍で表示されてしまいます。

もともとStripe-paymentを利用しており、google payの決済金額について特に問題がなかったのですがこちらのjplocalizeをインスール後、決済金額が100倍になってしまうようになりました。
ブラウザのコンソールログや、magentoのsystemログを見ても、これらに該当しそうなエラーは表示されておりません。

instant payのアップルペイは使用していない為わかりません。
また、Stiripeのクレジットカード決済は不具合がございません。

私は本職のエンジニアではないので詳しくデバッグしていないので、誤りがあるかもしれません。
お時間があるときでけっこうですので、何かアドバイスを頂ければ幸いです。

よろしくお願い致します。

Help Installation

I'm a bit confused in the installation.

This error shows up when I do the following:

  1. DL and paste the zip file of this under DIR>vendor>magento-japan folder

  2. Run the following command:
    composer config repositories.veriteworksartifacts artifact \vendor\magento-japan
    composer require magento-japan/m2-jplocalize
    php bin/magento setup:upgrade

  3. Then this error shows up:
    Module 'Veriteworks_Region' from '

    \vendor\magento-japan\m2-jplocalize/region' has been already defined in '/vendor/veriteworks/m2-region'.

Where did I go wrong? Can you please help me. I'm a newbie in magento and still don't know the way around.

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.