Magento

Magento 전자 상거래 플랫폼 사용자를위한 Q & A

2
마 젠토 2 : 자신 만의 커스텀 캐시 유형을 만드는 방법?
Magento 1에서 다음을 선언하여 고유 한 캐시 유형을 만들 수있었습니다 config.xml. <global> <cache> <types> <custom translate="label,description" module="module"> <label>Custom Cache</label> <description>This is my custom cacge</description> <tags>CUSTOM_CACHE_TAG</tags> </custom > </types> </cache> </global> 백엔드에 새 캐시 유형이 추가됩니다. 시스템> 캐시 관리 되므로 CUSTOM_CACHE_TAG캐시 태그 와 관련된 캐시를 플러시하는 기능이 추가됩니다 . M2에서 가능합니까? …

2
제품에서 Youtube 비디오의 속성 가져 오기
"이미지 또는 비디오 갤러리"에서 YouTube 비디오를 사용하여 제품을 가져오고 싶습니다. 당신은 올바른 특성을 알고 있습니까? 나는 모든 사진을 위해 일했지만 잘 작동했지만 비디오를 알지 못합니다.
10 magento2 

3
단위 테스트 소스 모델
내 사용자 지정 확장 프로그램에는 엔터티의 추가 / 편집 형식으로 일부 선택 및 / 또는 다중 선택을 채우는 용도로만 사용되는 여러 모델이 있습니다. 이것이 바로 마 젠토가 "소스 모델"이라고 부르는 것입니다. 관련된 값은 항상 동일하며 메소드는 동일한 것을 반환합니다. 그것들을 어떻게 단위 테스트해야합니까? 아니면 단위 테스트를 작성해야합니까? 다음은 예입니다. 다음 …

2
Magento 2에서 고객 계정 탐색에 사용자 정의 활성 링크 추가
고객 계정 탐색에 사용자 정의 링크를 추가하려고합니다. 내 맞춤 링크가 계정 탐색에 표시되고 작동하지만 클릭시 활성 / 현재로 표시되지 않습니다. 아래는 내가 가진 코드입니다. /app/code/Namespace/Support/view/frontend/layout/customer_account.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="customer_account_navigation"> <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-suppport-ticket-link" after="-"> <arguments> <argument name="path" xsi:type="string">support/customer/index</argument> <argument name="label" xsi:type="string">Support Ticket</argument> </arguments> </block> </referenceBlock> </body> </page> …

2
AbstractBackendController를 사용하여 구성 페이지 테스트 : testAclNoAccess 실패
구성 섹션에 대한 통합 테스트를 작성 중이며 기본 테스트 사례에서 다음과 같은 오류가 발생했습니다. My\Module\ConfigTest::testAclNoAccess Failed asserting that 302 is identical to 403 내가 알기로는 모든 것이 제대로 작동하지만 Magento는 구성 섹션에서 액세스가 거부되면 "Forbidden"대신 리디렉션 응답을 보냅니다. 302 상태 코드를 예상하도록 테스트를 변경하는 것이 합리적입니까? 이미 잘못된 리소스 식별자를 …

3
조건부로 CSS 자산을 추가하려면 "ifconfig"를 사용하십시오.
ifconfigMagento 2에서 Magento 1과 유사한 CSS 자산을 조건부로 추가 하는 데 사용할 수있는 방법이 있습니까? 다음은 마 젠토 1의 예입니다. <action ifconfig="config_path/group/field" method="addItem"> <type>skin_css</type><name>css/styles.css</name> </action> Magento 2에서 이와 같은 것을 시도했지만 작동하지 않습니다. <head> <css src="css/styles.css" ifconfig="config_path/group/field" /> </head> ifconfig프론트 엔드에 속성 만 표시됩니다 . <link rel="stylesheet" type="text/css" ifconfig="config_path/group/field" href="http://example.com/pub/static/frontend/Magento/luma/en_US/css/styles.css" …


3
장바구니에 담은 후 미니 카트 업데이트를 시작하는 방법
사용자 정의 방식으로 장바구니에 추가하는 것을 테스트하는 데 사용하는 다음 클래스가 있습니다. use Magento\Framework\App\Action; use Magento\Checkout\Model\Cart; class Add extends Action\Action { protected $cart; public function __construct( Action\Context $context, Cart $cart ){ $this->cart = $cart; parent::__construct($context); } public function execute() { $this->cart->addProductsByIds([1]) ->save(); } } 이것은 잘 작동합니다. 장바구니를 볼 때 …
10 magento2 

13
마 젠토 2 : 500 내부 서버 오류
아래에서 Magento dev 문서를 따랐습니다. 새 .html 템플리트를 추가 한 후 편집하면 다음을 수행 할 때까지 변경 사항이 적용되지 않습니다. pub / static / frontend 및 var / view_preprocessing 디렉토리의 모든 파일을 삭제 한 후 페이지를 다시로드하십시오. CLI에서 파일을 수동으로 삭제하거나 grunt clean : 명령을 실행할 수 있습니다. Magento에서 Grunt …
10 magento2  php  error 

3
사용자 정의 템플릿 프로세스의 Magento 2 html 파일 및 phtml 파일?
미니 카트 내용 변경에 대한 magento 2 설명서에서 확인했습니다. 두 가지 방법이 있습니다. 이 페이지에서 : http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-inherit.html minicart.phml 을 사용자 정의 하고 다음 위치에 배치하여 변경합니다 . app/design/frontend/OrangeCo/orange/Magento_Checkout/templates/cart/minicart.phtml 그러나 다른 페이지 : http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/templates/template-sample.html content.html 에서 사용자 정의하고 다음에 배치하십시오. app/design/frontend/OrangeCo/orange/Magento_Checkout/web/template/minicart/content.html 따라서 이러한 질문은 다음과 같습니다. magento 2가 html 파일과 phtml …
10 magento2  layout 

2
Magento2 : 아래 제품 세부 사항 페이지에 사용자 정의 템플리트 추가 장바구니 섹션에 추가
소셜 공유 섹션에서 제품 페이지에 사용자 지정 템플릿을 추가하려고합니다. 내 모듈에서 레이아웃 파일 default.xml의 코드를 따르고 있습니다. <body> <referenceContainer name="product.info.social"> <block class="Magento\Framework\View\Element\Template" name="product.info.custom" template="Lapisbard_Product::social.phtml" after="product.info.addtocart"> </block> </referenceContainer> </body> social.phtml 컨텐츠 <p>Hey there !</p> <?php //$_product = $block->getProduct(); 제대로 작동하고 제품 페이지에 템플릿 내용을 표시합니다. 를 사용하여 템플릿에서 제품 객체를 얻을 …


2
마 젠토 2 : 문의 양식에 보안 문자 표시
CMS 블록에 아래 코드를 사용하여 기본 magento 문의 양식을 표시합니다. <p>{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}</p> 양식에서 보안 문자를 활성화하는 핵심 방법이 궁금할까요?



당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.