Magento

Magento eコマースプラットフォームのユーザー向けのQ&A

6
Google reCaptchaを検証する方法
お問い合わせフォームにgoogle recaptchaを追加しましたが、値もキャプチャなしで送信しています。私の連絡先ページでキャプチャのコードを使用しました: <div class="g-recaptcha" data-sitekey="XXXXXXXXXX"></div> <script src='https://www.google.com/recaptcha/api.js'></script> 私が使用したこれらの2つのコード。キャプチャを検証する方法を教えてください。

1
UIコンポーネントフォームフィールドにデフォルトの構成値を設定する
フォームとグリッドのui-components形式は、バージョン2.2(dev)で変更されています。(多分それはすでにしました)。フィールドのデフォルト値を設定するにはどうすればよいですか。 2.2-devより前は、このようなフィールドをフォームに追加できました。 <field name="title"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="dataType" xsi:type="string">text</item> <item name="default" xsi:type="string">Some default value.</item> <item name="label" xsi:type="string" translate="true">Page Title</item> <item name="formElement" xsi:type="string">input</item> <item name="source" xsi:type="string">source_here</item> <item name="sortOrder" xsi:type="number">20</item> <item name="dataScope" xsi:type="string">title</item> <item name="validation" xsi:type="array"> <item name="required-entry" xsi:type="boolean">true</item> </item> </item> </argument> </field> 2.2-devでは、列は次のようになります。 <field name="title" sortOrder="20" formElement="input"> …



2
Magento 2-翻訳:js-translation.jsonはどのように入力されますか?鉱山は空です!
コミュニティバージョン2.1.3。 ロケールはen_GB(英国英語)に設定されています。Lumaテーマを使用します。 en_GB.csv翻訳ファイルをセットアップしてあり、私の翻訳はそこにあります。 "ショッピングカートに商品がありません。"、 "買い物かごに商品がありません。" バスケットページ(空のページ)に移動すると、翻訳が正常に表示されます。しかし、ミニカートにカーソルを合わせると、オーバーレイが変換されません。「ショッピングカートには商品がありません。」と引き続き表示されます。 私もpub / static / frontend / [Theme] /default/en_GB/js-translation.jsonファイルが必要で、そこにも翻訳が必要であることを理解しています。しかし、静的デプロイ「bin / magento setup:static-content:deploy en_GB」を試行すると、ファイルが作成されますが、空です。 また、var / view_preprocessed / source / frontend / [Theme] /default/en_GB/js-translation.jsonもあると思います。 それで、このファイルを作成するために何をクリアまたはフラッシュする必要がありますか? 言語パックで何かする必要があるのでしょうか? ありがとうTadhg
9 magento2 



1
Magento認定デベロッパープラス:EEの質問は解消されますか?
今年はDeveloper Plus認定を予約する予定です。 しかし、私はEEであまり働いていません。 私はすでに開発者の資格を取得しており、Developer Plus試験のEEの質問が解消されるかどうか疑問に思っていましたか? たとえば、開発者試験の問題を正解し、EEのすべての問題を間違った場合でも、合格しますか?

1
UIコンポーネントのreverseMetadataMergeとは何ですか?
UIコンポーネントのドキュメントを見ると、次のことがわかります。 <item name="reverseMetadataMerge" xsi:type="boolean">true</item> 今、ほとんどの議論は彼らが何をするかについてかなり自明であるか、私はすでにそれを知っていreverseMetadataMergeますが、何をしますか?

2
Magento 2:-カテゴリに選択属性を追加
select / dropdown属性をカテゴリに追加し、それをバックエンドに表示して、ストアの所有者が選択できるようにします。いくつかの調査の後、私は次のことを行うことがわかりました: Setupscriptを介して属性を作成する UIコンポーネント宣言を介してそれを含める だからこれは私がやったことです: public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { /** @var $eavSetup \Magento\Eav\Setup\EavSetup */ $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); $eavSetup->addAttribute( \Magento\Catalog\Model\Category::ENTITY, 'attribute_code', [ 'type' => 'int', 'label' => 'Top Navigation CMS Block', 'input' => 'select', 'source' => 'Magento\Catalog\Model\Category\Attribute\Source\Page', 'required' => false, 'sort_order' => 10, 'global' => …

4
Magento 2 update.logは1分ごとにかなりのサイズを増やします
更新: 増え続けるログファイルを処理するために、logrotateユーティリティを使用することになりました。また、不要な一時ファイルを時々チェックするcronジョブをいくつか設定しました。 標準のMagento 2 cronを構成して実行しています。2日後、管理パネルでいくつかのアクションを実行しているときに問題が発生しました。サーバーログを確認したところ、ディスク領域の問題であることがわかりました。さらに調査したところ、これupdate.log.txtが原因であることがわかりました。ファイルサイズは1分ごとに> 1MBずつ増加していました。20GB以上に達する時期がありました。 標準のMagento 2セットアップは正常ですか?または、それを無効にしたり、少なくとも最小化したりできますか? 開発者モードとプロダクションモードの両方で発生します。 Cronのセットアップはこのガイドに基づいています。 cronタブ: * * * * * <path to php binary> <magento install dir>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento install dir>/var/log/magento.cron.log * * * * * <path to php binary> <magento install dir>/update/cron.php >> <magento install …
9 magento2  cron  log 

2
Magento 2の管理フォームにカスタムフィールドを追加するにはどうすればよいですか?
UIコンポーネントを使用して管理者でフォームを作成したのでview/adminhtml/ui_component/[module]_[entity]_form.xml、次のようにしています: <field name="configuration"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="dataType" xsi:type="string">text</item> <item name="label" xsi:type="string" translate="true">Configuration</item> <item name="formElement" xsi:type="string">textarea</item> <item name="source" xsi:type="string">form</item> <item name="sortOrder" xsi:type="number">30</item> <item name="dataScope" xsi:type="string">configuration</item> <item name="validation" xsi:type="array"> <item name="required-entry" xsi:type="boolean">true</item> </item> </item> </argument> </field> この値をにしたくないのですが、この値textareaのバックエンドで独自のHTMLマジックを作成します。この「HTML Magic」は、フォームを投稿するときに水中で非表示のデータを送信する多くのJS / KnockOutになるため、フォームの一部である必要があります。追加してレンダリングを追加してみました: <item name="renderer" xsi:type="object">Vendor\Module\Block\Adminhtml\Renderer\Configurator</item> しかし、これはまだテキストエリアをレンダリングします。それから私はのformElementようなカスタムクラスで置き換えてみました: <item name="formElement" xsi:type="object">Vendor\Module\Component\Form\Element\Configurator</item> しかし、それから私はエラーを受け取ります: …


2
子商品属性で商品コレクションをフィルター
子商品に割り当てられている2つの属性のような状況があります 1)person_height_from及び2)person_height_to有するドロップダウン・タイプ属性を 子商品にのみ割り当てられ、親商品には割り当てられません。 この属性でカテゴリページの製品コレクションをフィルタリングしたい お気に入り length = 175 $collection->addAttributeToFilter('person_height_from', array('lteq' => $length)); $collection->addAttributeToFilter('person_height_to', array('gteq' => $length)); これは、子商品が上記の値を割り当てるカテゴリページの親商品のみを取得することは可能ですか? あなたの助けが高く評価されます

1
Magento2 REST APIの%resourcesへのアクセスはコンシューマーに許可されていません
新しい顧客を作成してトークンを完全に取得しましたが、次のようなAPIにアクセスしようとすると http://myhost.com/index.php/rest/V1/customers/me?Authorization=Bearerhy23vc01x9s1jd2t8gho47g58trllc0b エラーが発生しました <?xml version="1.0"?> <response> <message>Consumer is not authorized to access %resources</message> <parameters> <resources>self</resources> </parameters> <trace>#0 /var/www/myhost.com/public_html/vendor/magento/module-webapi/Controller/Rest/RequestValidator.php(70): Magento\Webapi\Controller\Rest\RequestValidator->checkPermissions() #1 /var/www/myhost.com/public_html/vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php(80): Magento\Webapi\Controller\Rest\RequestValidator->validate() #2 /var/www/myhost.com/public_html/vendor/magento/module-webapi/Controller/Rest.php(299): Magento\Webapi\Controller\Rest\InputParamsResolver->resolve() #3 /var/www/myhost.com/public_html/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest() #4 /var/www/myhost.com/public_html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http)) #5 /var/www/myhost.com/public_html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #6 /var/www/myhost.com/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #7 /var/www/myhost.com/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #8 {main}</trace> </response> 助けてください
9 magento2 

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.