Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

If you adding those button and link in phtml file then you can use it as <?= __("Your desired text"); ?> If you are adding this text from js file then use mage/translate.js for translation. require([ 'jquery', 'mage/translate' ], function($){ $(window).load(function() { alert($.mage.__('Your desired text')); }); }); As in above example it ...


0

I know this question is quite old, but since I ran into this just today and quickly found out what my problem was, I decided to post my answer as a reminder for all of those that, like me, use PhpStorm to work with Magento: remember to check out your files when switching branches. In my case, the branch that I was working on didn't had the required theme ...


0

You can try this code <?php / @escapeNotVerified / echo __('your link and button name') ?>


0

Please your link and button name write in this way <?php echo __('your link and button name'); ?>


0

It's built on top of a category which I believe is called 'contact-us'. Probably because whoever built it, didn't know how to add CMS Pages to the nav. You can identify this from the body class since it contains the class catalog-category-view. If it was a CMS Page you would expect to see cms-page-view instead of catalog-category-view


0

You should set the permission so it matches the permissions your webserver is running under. I wouldn't recommend using 777 permissions as this allows global write permissions. In a shared hosting environment i prefer to use : chown -R webserveruser:webservergroup ./ PATH Replace webserveruser etc.. with the actual user/group. you can check this by doing ...


-1

Apply Following Command :- sudo find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; sudo find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; sudo chown -R :www-data . sudo chmod u+x bin/magento sudo chmod -R 777 pub var app/etc setup generated Refernce Link :- How to set Magento 2 permissions and ...


0

If you want to customize Magento\Theme\Block\Html\Footer you need: Create your own module. Create YourVendor/YourModule/etc/frontend/di.xml file like: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <preference for="Magento\Theme\Block\Html\...


1

It' sometimes happen, that after run any command bin/magento your generated folder has changed ovnership to youruser:youruser, but should be youruser:www-data (for apache2 for example). To fix that run in magento directory: sudo chown -R youruser:www-data . and: sudo usermod -a -G www-data youruser after this you will never have this problem after ...


1

For fixed error Something went wrong while saving this configuration: Area is already set while saving theme configuration. You want create plugin for override Magento\Email\Model\AbstractTemplate.php file in custom module. And update setForcedArea() function. File path: magento/app/code/Vendor/AreaConfigFix/registration.php <?php use \Magento\...


1

My suggestion is to use Layout Handle to update the current layout. app/code/Vendor/Module/etc/frontend/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Catalog\Helper\Product\View"> ...


0

Try putting it inside the document.ready() function define([ 'jquery', 'mage/smart-keyboard-handler', 'mage/mage', 'mage/ie-class-fixer', 'domReady!' ], function ($, keyboardHandler) { 'use strict'; $(document).ready(function(){ if ($('body').hasClass('checkout-cart-index')) { if ($('#co-shipping-method-form ....


0

The fallback logic in Magento 2 is completely different from Magento 1, and associated with the theme inheritance feature. According to the document: The fallback order is slightly different for static assets (CSS, JavaScript, fonts and images) and other theme files, layouts and templates. You can check more details in the document via this link: https:...


0

I edited the layout file: <referenceContainer name="header-wrapper"> <block class="Magento\Framework\View\Element\Template" name="icon_account" as="icon_account" template="Magento_Customer::/icon/icon.phtml"/> <block class="Magento\Framework\View\Element\Template" name="links-menu" as="links-menu" template="...


0

Try this <move element=“your-block-name” destination="main.content" after="-"/>


0

You can see recently viewed products widgets in Admin panel->Content->Widgets you can remove completely from here. To display recently viewed products in bottom of the page, create CMS static block(Admin panel->Content->Blocks) and click on Insert widget option and select widget type as recently viewed products widget and save the block. After ...


0

I had the same, or at least very similar issue, with a codazon theme. After some digging, I noticed my store id was incorrect in my URL string. It might have been a cache issue. When you look at your admin url when going to the theme options, check out this part... "general_section/theme_id/x/store/x/". In my case, the "theme_id" was showing "0" when it ...


Top 50 recent answers are included