Questions tagged [phtml]

Denotes questions related to template `.phtml` files

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

Importing Magento\Catalog\Block\Product\View to theme phtml file

so I'm trying to overwrite the title.phtml in my Magento_Theme file, and its working, but now I want to get product data from Magento\Catalog\Block\Product\View, but it says that the variable in ...
0
votes
0answers
11 views

Magento 2 extend errorPlacement in knockout

I need to extend errorPlacement from validation.js in Magento_Checkout/web/.../email.html I want to append error's (in checkout login section) in a custom div created by me in email.html. I tried 2 ...
-1
votes
0answers
18 views

product not showing on click of show package in magento 2.4.2

I want to display product details that is ordered and shipped on click of show package button on successful creation of shipping label in magento 2.4.2 so can anyone have idea then please share with ...
0
votes
3answers
45 views

I want to delete marker from my html, css. Its showing on store view

I have marker showing in my slider on store view how can I remove it, I can't find this code in html. [
0
votes
0answers
14 views

Success screen stuck in luma theme Magento 2.3.5 Community Edition

everything good? I'm trying a problem that I've never caught in these 2 years of magento, I would like to know if you've been through this for tips on how to get out. On the success screen, the layout ...
0
votes
2answers
40 views

I want to call phtml file from Magento_Theme to static block. but it is giving some error

PHTML file is located in Magento_Theme/templates/html/breadcrumbs.phtml. I tried with the code {{block class="Magento\Framework\View\Element\Template" template="Magento_Theme::html\...
0
votes
0answers
15 views

I want to add swatch images from product page to home page product list

I want to add swatch images from product page to home page product list. swatch images from here to to here, replace the text"THIS is a custom" to swatch images How can I do this.
0
votes
1answer
23 views

How to display CMS static blocks based on store in Magento 2

I have created two stores english and german and created static blocks with different contents based on the store in admin.Block Id(test) for both stores are the same but both blocks assigned to ...
0
votes
0answers
21 views

How to call javascript function in magento 2

<div class="block social-login-authentication-channel account-social-login"> <div class="block-content"> <div class="actions-...
0
votes
1answer
12 views

Override product bundle select.phtml file in Magento 2

I'm trying to override the select.phtml used on the bundle product view page I've put it here: app/design/frontend/[vendor]/[theme]/Magento_Bundle/templates/catalog/product/view/type/bundle/option/...
0
votes
1answer
29 views

Get order product item count in order success page - Magento 2

I want get number of product order in order success page. This found solution magento 1.9 visit Get ordered product count in magento <?php $_order = $this->getOrder() ?> <?php echo $_order-...
0
votes
2answers
30 views

Magento 2 Can i call two phtml file into one?

I have two phtml files, I want to use one for just the heading title and content. then the second phtml file I want to use it to call a table with a simple form submission. is this possible, if anyone ...
0
votes
1answer
23 views

How to share one phtml file variable output to another phtml file

In custom modules, I want to share my module A output variable $value = "one" to module B, print like $value How to share this?
0
votes
0answers
68 views

Magento 2: Review Form Star Rating Field Validation Not Working

I'm using Magento 2.4.0, In my product review form, all fields validation works as I expected except the Star Rating field. The client is using a custom theme with no parent theme, Once I change the ...
0
votes
1answer
28 views

Magento 2 Override admin phtml

I've made a new module and I would like to override the vendor/magento/module-config/view/adminhtml/templates/system/config/form/field/array.phtml I've copied the file in app/code/myVendor/myModule/...
0
votes
1answer
36 views

Override Extension (/vendor) in app/frontend

I'm trying to override a layout .phtml file for a 3rd party extension which is located in /var/vendor_name/extension. As I understand, I should not be modifying the /vendor files, but this extension ...
0
votes
0answers
16 views

Need to display subcategories and their products on parent category page?

I want to display subcategories and their products on parent category in bottom of the page using different phtml file with limitation of products like only need to show 4 products. can anyone please ...
0
votes
2answers
33 views

How to used same code in helper data in magento 2?

Here is my object manager code can any one guide me how can i used same code in my helper data $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $customOptions = $objectManager ...
0
votes
3answers
30 views

Magento 2 - Get name of templates block from .phtml file

Is it possible to get the block name of the current template? For example I added a block to catalog_product_view.xml: <block class="Magento\Contact\Block\ContactForm" name="...
0
votes
1answer
26 views

Magento 2: How to insert a custom phtml file in a static block

I need to insert a phtml file in a static block. The Location of the file is app/design/frontend/Pearl/weltpixel_custom/edu/custom.phtml I use "weltpixel_custom" as my child theme This is ...
0
votes
2answers
83 views

How to override items.phtml in module ? (Magento 2)

I am trying to override module-sales/view/frontend/templates/email/creditmemo/items.phtml file but no changes appearing. Is their any way i can override it in my module ? Thankyou
0
votes
2answers
17 views

Add text under AddToCart Button in Product Description Page Frontend - Magento2.3.5-p2

I tried so many ways to add text under addtocart button in PDP page, but nothing works. My block and phtml not getting called. catalog_product_view.xml <?xml version="1.0"?> <page ...
1
vote
1answer
28 views

How to call a phtml file in all pages (frontend & backend) using custom magento module?

I am using magento 2.4.1 I have created a basic module, I am trying to call a phtml file in all pages. I am using default.xml file (Separate for each scope) & calling a phtml file. But there is ...
0
votes
1answer
352 views

Magento 2: Show whole HTML code(phtml file code) into PDF file and Download with the use of DOM PDF?

I have tried to do it with zend pdf but i am not able to show whole html content with the use of zend pdf. If i want to display content of cms block , then i am not able to do it with Zend PDF. I have ...
0
votes
0answers
16 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
28 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
56 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
19 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
32 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
10 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
37 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
28 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
24 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
46 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
24 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
166 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
1answer
34 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
164 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 = $...
2
votes
1answer
201 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.phtml but in xml file the phtml file was not mentioned at any ...
0
votes
0answers
29 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
328 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
48 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
80 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
903 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
56 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
27 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
14 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
32 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
17 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> <...

1
2 3 4 5
14