5

For that, you just need to create one static block and call you .phtml file like the below example. {{block class="\Magento\Framework\View\Element\Template" template="Vendor_Module::product/category_customdata.phtml"}} Then you just need to call these blocks in a specific category. Check below image for your reference. That's it. I hope it helps you.


3

Apparently in 2.4 simply calling $escaper->escaperHtml() works. $escaper is an instance of Magento\Framework\Escaper sent directly to the template in the same way as $block is an instance of the current block class. It's all done in Magento\Framework\View\TemplateEngine\Php::render() public function render(BlockInterface $block, $fileName, array $...


3

Need to check c2c_height_1 attribute settings correct set or not another method to get attribute value. template code <?php $_helper = $this->helper('Magento\Catalog\Helper\Output'); $_product = $block->getProduct(); $heightattribute = $_product->getResource()->getAttribute('c2c_height_1'); if ($...


3

Your template is getting value from the Block class as you've mentioned in the xml. Magento\Framework\View\Element\Template does not have any product instance. In your xml you can simply modify your xml by the below File: /app/design/frontend/Mgs/claue/Magento_Catalog/layout/catalog_product_view.xml <referenceContainer name="product.info.main"&...


2

Using the Kishan code gives me a screen that says "Email Preview" at the Top, with the Magento copyright info underneath but no template content in 2.3.4. I stumbled across this code on git healthywebsites clintonwere that gave me the result I expected. Hopefully it can help somebody else. <?xml version="1.0"?> <!-- /** * Copyright © Magento, Inc....


2

First you have to craete admin Route file app/code/VendorName/ModuleName/etc/adminhtml routes.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> <router id="admin"> <route id="[route_name]" frontName="[route_name]...


2

Please check this module available for free. https://github.com/interjar/configurable-child-visibility


2

Based on your comment, You need to set custom.block.name as referenceBlock. Try to use this below code : app/code/Vendor/Module/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">...


2

You can archive this by overridden the below file, vendor/magento/module-catalog/view/frontend/templates/product/image_with_borders.phtml To your theme app/design/frontend/Magento_Catalog/templates/product/image_with_borders.phtml In this file, you can add the custom class inside the <span class="product-image-container" style="width:<?= /* @...


2

try with $this->helper(\Company\Base\Helper\Product::class); inside the template and why it didn't work for you when you overridden the AbstractProduct class... You extended the class, but your new class is never instantiated. The blocks used in by the template still use the original AbstractProduct class. overriding works only for classes that get ...


2

delete the content manually from pub/static/frontend and then run the static-deploy -f command


2

<?php namespace Vendor\Module\Helper; class Data extends \Magento\Framework\App\Helper\AbstractHelper { public function getConfig($config_path) { return $this->scopeConfig->getValue( $config_path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); } } $this->helper('Vendor\Module\Helper\Data')...


2

Create attribute1.phtml file and call all your attributes inside that file. app/design/frontend/VENDOR/THEME/Magento_Catalog/templates/product/view/attribute1.phtml Add your attribute code. <?php echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($block->getProduct(), $block->getProduct()->getAttributeCode(), '...


2

Now I understand. The script vendor/magento/module-tax/view/frontend/web/js/view/checkout/cart/totals/shipping.js (Script A) is not the script where the method is defined. The template is using the script under the similar path as the template. The template path is: view/frontend/web/template/checkout/summary/shipping.html so the script path is at view/...


2

It’s a good question. You can use the debugger in chrome to go step by step in cases like this: The file it goes to when super is called is: Magento_Checkout/js/view/summary/shipping.js How to do: Edit the file and add the line debugger: Open chrome and inspect and go to the page which will trigger the debugger, it will then open like this: You can then ...


1

You can override this by adding this folder to your theme: Magento_Checkout/web/template/minicart In this folder you can create the default.html file. After a change made in this file make sure you flush your browser cache to see the changes. OR After changes in default.html file, we have to deploy static file using command php bin/magento setup:static-...


1

You can set template directly on <referenceBlock> in layout xml like this: app\code\Company\Configurator\view\frontend\layout\checkout_cart_item_renderers.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/...


1

You Cannot Override Admin Files Directly In Your Theme. You Need Custom Module For Overriding Admin Files OR Use Existing Custom Module. <?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"> <...


1

Get Order Information From Order ID <?php $orderid = your_id; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid); //fetch whole order information print_r($order->getData()); //Or fetch specific information echo $order->getIncrementId(...


1

Hi you can try it like this <?php $orderid = 2; //enter your order id here $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid); //fetch whole order information print_r($order->getData()); //Or fetch specific information echo $order->...


1

All templates you want to override are in \vendor\magento\module-checkout\view\frontend\web\template. EDIT: To find .html template and .js component: first you need to find the .html template, which is pretty easy. You inspect element, and you search in above folder for this elements. When you have the name of the template you go to checkout_index_index.xml ...


1

Are you just looking for the file which holds the HTML for each item rendered in that foreach list? You can find that here: vendor/magento/module-checkout/view/frontend/templates/cart/item/default.phtml You can create a version of this in your theme for your custom HTML here: Magento_Checkout/templates/cart/item/default.phtml


1

try this <?= $block->getLayout()->createBlock('Magento\Framework\View\Element\Template')->setTemplate('Magento_Search::form.mini.phtml')->toHtml(); ?> I hope this will help you..!


1

Follow this links and replace this links code your file. After installing magento 2.3 admin login page cant open properly And after run php bin/magento c:f and check output. Hope this help you Thanks...


1

I think you need to call your faq.phtml file in the FAQ page frontend. You should add the below code in your CMS page configuration and save. {{block class="Magento\Framework\View\Element\Template" template="VendorName_ModuleName::YourTemplateFileLocation.phtml"}} You can change the VendorName_ModuleName as Magento_Theme and add your phtml file in that ...


1

For that you will have to override customer_account_create.xml in your own module. So create "customer_account_create.xml" file in app\code\Your_module_vendor\Your_module_name\view\frontend\layout\customer_account_create.xml And add below code into it. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="...


1

Update Check your store mode deploy:mode:show First enable Developer mode bin/magento deploy:mode:set developer Enable Template Path Hints in Admin Configuration Step 1: Go to admin panel Step 2: Choose Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront Step 3: Click Yes to Enabled Template ...


1

You can try to load block with template with catalog_category_view_id_[Cat Id].xml Reference with similar question: https://stackoverflow.com/questions/36451706/magento2-multiple-category-layouts?rq=1


1

Create CMS block {{block class="Magento\Framework\View\Element\Template" name="formblock" template="Vendor_Module::myfiles/myfile.phtml"}} In your category, set that CMS block.


1

The browser downloads all CSS resources, regardless of the media attribute. Check your network tab on your site and you'll notice even on mobile devices it downloads styles-l.css. The media attribute allows the user agent to pick the best adapted one for the device it runs on, in other words it will de-prioritise styles-l.css which helps prevent it from ...


Only top voted, non community-wiki answers of a minimum length are eligible