Questions tagged [phtml]

Denotes questions related to template `.phtml` files

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Override shipping fee text Magento 1.9

On One Step Checkout, ive changed table rates for purchases over 1000 to charge 85 fee. Currently its only displaying "85", I want it to show ["Shipping fee" is 85] Copy Base/......
0
votes
1answer
21 views

How to override phtml / add a static image to .phtml file from the extension?

I'm try to add a banner image to the list.phtml, but it's not displaying. This is what i did: step 1: copied /public_html/vendor/mirasvit/module-rewards/src/RewardsCustomerAccount/view/frontend/...
1
vote
1answer
43 views

How to get image in PHTML file?

Image path -> app/design/frontend/Mycustom/Mytheme/web/image/one.png how to get image in PHTML (app/design/frontend/Mycustom/Mytheme/Magento_Search/templates/form.mini.phtml) file, <?php echo ...
0
votes
1answer
16 views

how to add phtml file in magento 1 homepage?

Which is the quickiest way to add/call a phtml file in homepage (only) in magento 1 (custom theme) ? I am not sure about magento 1, so any thoughts would be appreciated.
0
votes
1answer
30 views

How do I get the language code in the product price amount template file?

How can I get the current language code in Magento_Catalog::product/price/amount/default.phtml?
0
votes
1answer
9 views

Add a module in other module

good afternoon I have the MageWorx multifee module and Id like to add the multifee on the quotes of the Cart2Quote module (emails ect). How can I do this Thank you for the attention Malka Hakuk
0
votes
0answers
35 views

How to execute javascript code and pass to it some values after an event is triggered?

I'm trying to execute some javascript code and pass to it some values after an event (e.g. Add to Cart event) is triggered. To be more specific I'd like to pass: All logged customer details (...
0
votes
2answers
24 views

create custom .phtml

HI I want to ask if I create a custom template phtml file. inside the coding do I need to include below 2 tags? <html></html> and <body></body>
0
votes
0answers
17 views

How can i retrieve order info (sku's of products, price of products, total, etc) from success page in a phtml file to put in a script in <head>

I need to retrive data from an order, on success page, this info is dynamic and i need to create a script for Dynamic Re-marketing Implementation. This is the script that has to be put after tag in ...
0
votes
1answer
27 views

How to extend newcustomer.phtml in Magento 2.3?

I want to change the default text -- Creating an account has many benefits: check out faster, keep more than one address, track orders and more. So how would i extend the path vendor/magento/module-...
0
votes
1answer
23 views

Is it officially reccomened to add a totally new phtml template file in a theme, one which doesn't override an existing template?

Magento's documentation (https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/templates/template-walkthrough.html#template-customization-walkthrough) describes how to customise an existing ...
0
votes
2answers
43 views

Get Page Title In PHTML? CE 2.4

I'm struggling with something simple. I'm trying to print the Page Title in the custom block from my custom.phtml and I'm getting nothing. I've removed the Magento original page title block from all ...
0
votes
0answers
21 views

How to call gallery.phtml file in my custom phtml?

I have created a custom widget and now, I am trying to display product images Something like in the Product view page. On catalog_product_view.xml it calls /vagrant/www/vendor/magento/module-catalog/...
0
votes
0answers
25 views

How to call .phtml file in my CMS page? [duplicate]

In my CMS page, I want to call a few phtml files that are similar to product view page. Basically, I want to create something like this: After enabling template hint, I was able to see the .phtml ...
0
votes
2answers
61 views

Make Google reCaptcha field mandatory on a custom form (works fine on contact us and login form but not on a custom form)

I have a custom form and need to make recaptcha a mandatory field. It works just fine on a login and contact us page but not a separate custom form. code for a .phtml file is below- <?php $url = $...
1
vote
1answer
96 views

How to override the Catalog Widget PHTML file into custom module?

I need to override the widget template file /vendor/magento/module-catalog/view/frontend/templates/product/widget/new/content/new_grid.phtmlbut in xml file the phtml file was not mentioned at any ...
0
votes
0answers
13 views

How to show the static block only for logged in customers globally?

I have created static block in admin panel and want to show that block only for logged in customers. I have tried it via creating the module and in template file I have written a condition to show the ...
1
vote
1answer
43 views

How to open new tab on button click and send post data?

I've been trying to make my button open a new tab, the same way my form is doing but I've discovered that window.open() doesn't work on POST requests. SO, is there any other way I can make my button ...
0
votes
0answers
40 views

Receiving checkbox status as Yes or No on a custom form to an email template

I am new to php and html and trying my hands on the below code where I have a custom form as shown in below SS and once customer submits the form I need to get the checkbox status as 'Yes' if the ...
1
vote
1answer
68 views

M2: Using small PHP script in .html file (or) Changing .html file to .phtml

We are running into an issue where we need to run a little php script within a .html file in Magento 2, namely; /app/design/frontend/CleverSoft/core/Magento_Checkout/web/template/minicart/content.html ...
1
vote
2answers
247 views

PHTML Uncaught TypeError: $(…).lazy is not a function

After installing this module I get an error sometimes: Images won't load and the next error will show on console: Uncaught TypeError: $(...).lazy is not a function With a link to this section of code ...
0
votes
0answers
30 views

How to pass data as parameter with block function in <script type=“text/x-magento-template”>?

How to pass data as parameter with block function in below script: <div class="col-sm-7 col-md-8 col-xs-9 col-lg-9 tag-content"> <h4><a target="_blank&...
0
votes
1answer
26 views

Add a custom input from phtml in admin form

I'm using custom phtml to display some data in an admin Ui form tab, and I want to be able to have a custom input that would get sent to the controller when I hit 'save' ui_form.xml <fieldset name=...
0
votes
1answer
13 views

How to get Html post request value in Controller?

I've been trying to send the SKU of the product from the product page to another page so I can integrate it with an API. Here's my code phtml code: Here's my Controller code: For some reason I can't ...
1
vote
0answers
25 views

Magento Checkout updateCart.phtml

Can anyone explain how the product qty in the input field in view/frontend/templates/cart/item/configure/updatecart.phtml is being pulled. This phtml file is used when you're trying to edit a product ...
0
votes
1answer
16 views

Block in reference root not loaded but loaded in reference header

Magento CE 1.9.4.5 I created a module and successfully had it loaded. The xml is below: <?xml version="1.0" encoding="UTF-8"?> <layout> <default> <...
0
votes
1answer
21 views

Override phtml template file

Simple issue : This is one of magento template core file : vendor/magento/module-sales/view/adminhtml/templates/order/totals.phtml How can I overide it ? I tried to create this one but it failed app/...
0
votes
0answers
6 views

pager isLastPage not correct

I have modified Magento_Catalog/templates/product/list.phtml. I added this code: /** @var $pagerBlock Magento\Theme\Block\Html\Pager */ $pagerBlock = $this->getLayout()->createBlock("...
0
votes
1answer
18 views

show all products in one page on magento 2

I want to show all products in one page from a custom cms block. This is the code I tried: {{block class="\Magento\Catalog\Block\Product\ListProduct" template="Magento_Catalog::list....
0
votes
0answers
23 views

Magento 2 - Display Configurable Product Option Value with Quantity on Product View Page

I'm working on a module where I'm attempting to display the configurable product's option values and quantity on the product page in a clean table with two options per table row. However, I'm not sure ...
0
votes
1answer
105 views

Sign In/Sign out issue in Magento 2.4

I have a Sign in Link that successfully changes to sign out when a user is logged in, and successfully logs the user out when I click sign out. However, I ran into a bug. When Signed in, if I go to ...
0
votes
1answer
41 views

Magento 2 - Call to a member function addAttributeToFilter() on null

I am working on a module for a customer that is designed to generate a category link to the main artist page for the product. I've created a module that's designed to get the category IDs of the ...
0
votes
2answers
35 views

How to load PHTML file last after page is fully loaded

I have a script in my phtml file but I want to only load this ones the page is fully loaded. I am doing a check if my custom module is enabled show the < script > Adding script like this : You ...
2
votes
0answers
30 views

Add reply field to Review Form - Magento 2 (current version 2.3.5p1)

I have created the following: registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Vendor_NewField', ...
0
votes
1answer
39 views

I have created a custom module for backed to add menu and submenu but it shows me on phtml file in Magento 2

I have created a custom module for back end Menu and sub menu but it shows me an error for phtml file. 1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template ...
0
votes
1answer
22 views

How to override magento_sale module phtml file?

I am unable to override this file in adminhtml of magento_sale module here is the path vendor\magento\module-sales\view\adminhtml\templates\order\create\totals\shipping.phtml The issue is that file ...
0
votes
1answer
22 views

Use phtml in stead of html for emails in magento 2

Im overwriting the template vendor/theme/Magento_Email/email/header.html I want to add php in this template. Is there a way to include a template in header.phtml? I currently have this which doesn't ...
1
vote
0answers
12 views

Calling minicart in phtml not showing dropdown on click

I'm calling minicart in my phtml like below <?php echo $this->getLayout() ->createBlock('Magento\Checkout\Block\Cart\Sidebar') ->setTemplate('Magento_Checkout::cart/...
0
votes
0answers
23 views

How to separate cents from price?

I was wondering how to split cents from price so I can style them differently . I am new to magento so I cannot really understand where and how to find the file that creates this html -> I want to ...
0
votes
1answer
58 views

magento 2.3 call customer group Name

i am using magnto 2.3.x, how can i call the customer group Name in phtml not a customer group ID. Thanks for help
0
votes
0answers
6 views

Unread jQuery script in custom phtml file included with ajax in Magento 2

I have included in the product page a custom external phtml file from a module which is called with ajax on click. The html and php code is read correctly, only the jQuery code is not read and is not ...
2
votes
1answer
86 views

Special Price Disable in Magento 2

How can i disable special price in everywhere. but without use css, is it possible ? please have a look attached image, thanks in advance
0
votes
1answer
30 views

Change display month on select box

I have a module and a select box for display month. In file download.phtml, I mentionn value month and I want display that are 01, 02, 03, ..., 12. How can I do that?
0
votes
2answers
30 views

How to add Slick Slider

I want to add slick slider on my home page in magento using static block and phtml with rotating images. if anyone have idea about that then please answer my question as soon as possible. Thank you ...
0
votes
0answers
23 views

Show Multiple Select Attribute in a CMS Block

I want to show Multiple Select Attributes in a CMS Block. In the Block I used this code: {{block type="core/template" name="ausgezeichnet" template="Magento_Theme/templates/html/auszeichnungen.phtml"}...
1
vote
1answer
36 views

call a vendor function in custom module

I'm trying to create a custom module which will have GoogleSheet Import functionality. So I want to call varienImport.postToFrame() this function works when we click on Check Data option in existing ...
0
votes
2answers
30 views

How to call Static content block

I want to create static block in Magento 2.3.5 and call that block in footer content. please anyone can have idea then please share with me. Thank you in Advance.
0
votes
3answers
96 views

How to add default head block in default.xml

I want to add default head block in default.xml file. so if anyone have idea about it then please send me the solution.
1
vote
1answer
48 views

Want to Learn magento 2.3.5

I am Working as PHP Developer and want to learn about magento 2.3.5 from scratch so can anyone having material related to magento 2.3.5 then please send me for self learning and any demo of modules as ...
2
votes
1answer
117 views

Magento 2: Shopping Cart quantity doesnt update after custom Add to cart form is submitted

I have a custom Add to Cart button for bundled products. This is on my phtml for the /test-page : <?php /** @var Magento\Checkout\Helper\Cart $_checkoutCartHelper */ $_checkoutCartHelper = $this-&...

1
2 3 4 5
14