Questions tagged [html]
Denotes questions related to HTML code in Magento.
31
questions
32
votes
4
answers
29k
views
How to override a HTML file using a custom module?
I'm developing a custom module for payment method in Magento 2. Currently, I'm using cc-form.html from vendor directory and module working fine. See below path:
vendor/magento/module-payment/view/...
0
votes
1
answer
1k
views
Magento 2.4.2: Unable to process binding "ifnot: function(){return customer().fullname }" Message: Unable to parse bindings
The following error is found during the process of upgrading Magento from 2.4.2 to 2.4.4 in console.
Uncaught SyntaxError: Unable to process binding "ifnot: function(){return customer().fullname }...
4
votes
4
answers
18k
views
Defer parsing of JavaScript in Magento
i analyzed my website on Gmetrix.com for for optimization and the result was this:
361.0KiB of JavaScript is parsed during initial page load. Defer parsing JavaScript to reduce blocking of page ...
4
votes
3
answers
5k
views
How to copy a product's attributes value to another attribute?
i want to copy a product's attribute (weight) to another atribute (general_weight).
i found this codes, but i don't know what to do with this codes? or where to copy them?
$prod=Mage::getModel('...
6
votes
4
answers
11k
views
Best Way Of Getting Base URL Inside KnockoutJS .html File
How can I get the base URL inside a KnockoutJS HTML file? See file below:
app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/web/template/<Filename>.html
5
votes
2
answers
3k
views
Magento 2: How to change Contact Us Email Type?
magento\vendor\magento\module-contact\etc\email_templates.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
--&...
3
votes
1
answer
10k
views
how to use cookie-free domains in magento? [closed]
I analyzed my website on Gtmetrix.com for optimization and the result was this:
There are 245 components that are not cookie-free:
http://mysite.com/media/css/dabf35e7cd79eb387a68eed1d5f3f925.css
...
11
votes
2
answers
22k
views
Knockout If-else condition inside html file in Magento 2
I am customizing the shopping cart page, Here I worked knockout js and html code file. I successfully wrote If statement by below code.
<!-- ko if: isFreeShipping() -->
//My Code goes here
&...
10
votes
2
answers
3k
views
How to hide Magento from CMS detectors?
I have a Magento store and I want to hide it from cms detectors.
I mean I don't want anyone to know my website CMS and that my website is built on Magento.
There are some websites like http://guess....
6
votes
1
answer
6k
views
Magento 2: Overriding Block class – not generating output
I'm trying to override the module-catalog/Block/Product/View/Options/Type/Select.php class with a new version which includes a few other bits of custom php (adding HTML classes and IDs to the ...
4
votes
1
answer
2k
views
Set minimum order price for a shipping method
I want to set a minimum order amount for a specific shipping method.
I want a specific shipping method to get enable when subtotal price of order reaches to the specific price which I had set before ...
3
votes
1
answer
5k
views
How to overwrite lib template file - Magento 2
How can the HTML files from the library be overwritten?
I need to overwrite this template:
lib/web/mage/gallery/gallery.html
I have tried placing the file in my own theme in the below locations, I'...
2
votes
2
answers
2k
views
Override HTML Template from custom module not working
I am trying to override HTML template in my custom module. I am working on Magento ver 2.2.2
Vendor/Moule/view/frontend, I have created a requirejs-config.js file:
var config = {
map: {
...
0
votes
1
answer
375
views
Magento 1.9 - How to add if-else condition on Sales order email template HTML file?
Following is my sales order email template sample,
Docroot = app\locale\en_US\template\email\sales\order_new.html
<table cellpadding="0" cellspacing="0" border="0">
<tr>...
7
votes
2
answers
2k
views
How to add new link on checkout page in Magento 2.2.4?
I have created 1 custom tab on the checkout page and it's working fine I follow below link to add the tab on cart page.
Magento 2 - Add step on checkout
I want to add a link name as "Create an ...
7
votes
2
answers
9k
views
Magento 2: Email Templates Template Style is not Working
In Template Content i have put
<p class="test">Hi</p>
Template Styles i have put
.test { font-size: 40px;}
Then i have clicked on Preview Template, but it's not applying.
I like to ...
5
votes
4
answers
1k
views
How to use $htmlAttributes?
In vendor/magento/module-theme/view/base/templates/root.phtml:11 there is this code:
<html <?= /* @escapeNotVerified */ $htmlAttributes ?>>
...
</html>
It looks like we can use ...
5
votes
1
answer
8k
views
Magento Blocks HTML Output cache problem
I have a problem with my Magento website.
Because my website was extensively redesigned, notably the home page - I have had the cache disabled on the page for about a month or two.
Now I was able to ...
4
votes
3
answers
3k
views
ad thumbnail to aw blog posts
im trying to add a thumbnail image to aw blog posts header and into the aw blog sidebar widget next to the each headline
i did these:
In app/code/community/AW/Blog/Block/Manage/Blog/Edit/Form.php
...
2
votes
4
answers
3k
views
Magento2.3: How to upload profile picture and show it on My Account dashboard?
We have customized the My Account dashboard with our own design. Now we wanted to implement the profile picture option while the customer do the registration.
After the registration, in My Account ...
2
votes
1
answer
568
views
Magento 2 does not read my requirejs-config.js
I'm customizing customer address tab in Admin Panel. Here is my code. It's reading my files but 'Add New Addresses' button is not responding.
my code is:
app/code/Learning/Helloworld/view/adminhtml/...
2
votes
3
answers
20k
views
How do you change the number of product columns?
I want to change the number of products that are shown. But I don't want to hard code this into the theme.
This:
<ul class="products-grid products-grid--max-4-col first last odd">…</ul&...
2
votes
2
answers
858
views
Updating Basket quantity (using ENTER) clears the basket entirely
I have been developing my own site for the last couple of years i am still using Magento 1.8. with a 3rd party theme. I noticed whenever i try to update the quantity of a product in my basket, for ...
1
vote
1
answer
540
views
Help with adding script codes between <head></head> in success.phtml
Hope someone can help me with this. It's very easy to do I bet, I'm just not used to magento yet.
I'm adding Google Ads to my magento (1.9).. I need to add this script code:
<!-- Event snippet ...
1
vote
2
answers
3k
views
How can you get the config value in html
I want to know if you can get the config value to html
I have a class which provides the value for config
Not sure how to get this checked in HTML
I have been looking at configproviderinterface
1
vote
1
answer
3k
views
Magento 2 - How to print array values in custom html email template by looping?
I want to print multiple coupon/gift codes in the custom email template. I am getting a single code as:
$templateVars = array(
'store' => $this->storeManager->getStore(),
'...
1
vote
1
answer
794
views
hide empty attribute group from products attribute tab
i did some coding to group the product attributes on frontend and show their groups names above theme like this:
attgroup 1
attribute 1
attribute 2
...
attgroup 2
attribute 3
attribute 4
...
...
1
vote
1
answer
1k
views
Change header on another page
I would like to change my header when I went to another page, but I am not able to put my html file. I searched before coming here to ask, I tried this way, but just remove the header, I can not add ...
1
vote
1
answer
954
views
Magento 1.9 CE - Enable HTML links in error/custom messages
I would like to know if this is possible to enable HTML links in custom messages (ie: error messages).
Here is my example: I've made an override for my needs of Mage_CatalogInventory_Model_Stock_Item/...
0
votes
1
answer
4k
views
How to pass text input value to js in magento 2 knockout js?
In my template.html file, I am having only the input field. After I complete entering the text in the input field, I need to pass the value to the js file without any button click. How to achieve this ...
0
votes
2
answers
2k
views
Hide price for out of stock products
How to hide price for out of stock products in all Magento pages.(product pages and category pages)