Questions tagged [template]

The folder that contains all the `phtml` files used to display at frontend or backend.

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

Magento 2: Get store information in frontend files

I'm completely new (like 3 days in) to Magento Development so I apologise in advance if i'm asking a silly question! I've really struggled to find a good magento course online so now i'm at the stage ...
3
votes
1answer
111 views

Magento 2: Ajax without effect

My problem is as follow, my script except ajax in working (no problem with giving value or console.log) but my ajax doesn't give me the result expected (remove hidden class and fill a drop list with ...
0
votes
1answer
820 views

Magento 2 : Script from Javascript is load but doesn't execute

Sorry I have kind of strange problem with Magento 2 I am not use to Magento I made a script which should be executed in the Ulimo template in the header of my website, on the network console the ...
0
votes
1answer
183 views

Magento 2 limit max length in Qty field

I wan't to know how to set a max length for the Qty field that is when you click a product (I guess it's product View) I tried to override the following template and set maxlength = "4" but did not ...
0
votes
1answer
24 views

Error setting an adminhtml from a frontend path

I'm using a third-party which set an appendPaymentBlock Observer method <adminhtml> <events> <payment_info_block_prepare_specific_information> <observers&...
0
votes
0answers
51 views

Changes made in web template do not show on frontend?

I am using Magento 2.2.3 and I am modifying a template from a custom extension. That path to the template is app/code/Foo/Osc/view/frontend/web/template/container/address/billing/create.html I am ...
0
votes
1answer
45 views

Magento 2 add cart contents to email termplate

Is there a way to add the contents of the users cart to an email template? I would like to do this for the abandoned cart email and would rather not use a 3rd party extension.
1
vote
2answers
231 views

Magento 2 How to remove template in checkout page?

We have a custom template file and want to display it on all the pages except the checkout page. However, it shows even in checkout page. We have used the below code in our theme default.xml. <...
1
vote
1answer
225 views

Show currency switcher in custom template file Magento2

I am trying to show currency switcher in custom template file. I referred some links and found for magento1. Where they used below code in the template files. <?php echo $this->getLayout()-...
1
vote
2answers
2k views

Magento 2: Translation is not working in html template using data-bind

I have inserted the string to translate into the app/i18n/lg_lG.csv file. I run the command to deploy static files, clean cache, but the string is not translated. The string is located in this file: ...
0
votes
2answers
68 views

M1 How to know what contents corresponding to layout / block / template?

Currently, I don't know how to find the layout of the manage customer page (Customers > Manage Customer). Generally, how can I find the block/layout/template/controller of a specific page? Thank ...
1
vote
2answers
1k views

Magento 2 : how to add content on customer dashboard

On customer dashboard you see this https://github.com/magento/magento2/blob/ddf42caaf25311f10b23b95a92746f99943e045e/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml#L23 ...
1
vote
2answers
162 views

Magento 2 setTemplate and add content to phtml template

How to add bare HTML to a block e.g: $block = $result->getLayout()->getBlock('category.description'); $block->setTemplate('Vendor_Module::myTemplate/blank.phtml') ->toHtml('<p>My ...
1
vote
3answers
756 views

Magento 2 - Override phtml files not working

I am working on Magento 2 and I override few PHTML files from vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml to app/design/frontend/vendor/module/Magento_Catalog/...
0
votes
0answers
50 views

Error 503 when preview a template email with header_template or footer_template config_path

When I try to show the preview of my newsletter template I get error 503: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or ...
0
votes
1answer
27 views

One storeview error to many redirect

We have a multistore in multilanguage and as test we set one to connect the media and static url through static.domain.com to a CDN but that is not working. But now the template for that storeview ...
0
votes
1answer
108 views

Magento 2 include template with form in CMS Block

I have been struggling trying to put a template functionally working inside a CMS Block. When I put this code inside my CMS block the template is correctly implemented {{block class="Experius\...
3
votes
3answers
1k views

How to get the pub/media Url in Email Templates Magento2

Can anyone help me how to include Pub/medial url in email templates in magento2. Thanks
3
votes
1answer
300 views

Magento 2.3.0 - Can't set to production mode

I want to put my store on production mode, I use this command on ssh: php bin/magento deploy:mode:set production And I have this output: Enabling maintenance mode Config "dev/debug/debug_logging = ...
0
votes
1answer
137 views

restore the default checkout in magento 2.3 [duplicate]

I have a disaster in the template of a checkout, it is really bad!. I never used Magento but now I need to restore the default checkout layout/html/template of a web. I no have backups of changes and ...
0
votes
1answer
79 views

How to restore the default checkout template?

I never use Magento but, a friend uses it and a dev. broke their checkout page, how I can restore the TEMPLATE of the checkout to default? I don't see a backup of any of the files, and I no have clue ...
3
votes
1answer
139 views

Magento 2.2.5 Newsletter (/newsletter/manage/ ) management generates blank page

Newsletter (/newsletter/manage/ ) management generates blank page
0
votes
1answer
59 views

Magento 2 - Get all team members on a page

I begin in Magento development and I try to do something but I don't know how to start. I want to display on a "about us" company page all team members of a company, for example in WordPress we have ...
1
vote
0answers
67 views

template is not working magento 2 admin customer_index_edit

I am calling a js function form this file current.phtml like this <script type="text/javascript"> require([ 'jquery', 'jquery/ui'], function($){ $(document).ready(function($) { updateAjax()...
2
votes
1answer
318 views

Magento 2 - How to replace a char on item title

I have succesfully used this trick to replace dash char "-" with "br" on CATEGORY VIEW: <?php echo str_replace(' - ', '<br />', $_helper->productAttribute($_product, $_product->getName(...
1
vote
1answer
552 views

Magento2 get ID of product in price template default.phtml

How can I get the ID of product in Magento 2, in tempalte vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml I copied it to my theme: /app/design/frontend/xxx/ddd/...
0
votes
0answers
30 views

Custom product template Magento1.9

I'm using Magento 1.9. If I add a custom option to a product, the thumbnail images for that product no longer appear on the product view page, and you cannot view images 2,3,4, etc Only the main ...
1
vote
4answers
53 views

Help with overwriting .phtml file in Magento 2.2.7

I need some advice on how to overwrite category description 'block?' from file /app/design/frontend/Mgs/mgsblank/Magento_Catalog/templates/category/description.phtml I want to use my own module ...
0
votes
0answers
96 views

Invalid template file in Magento 2.2.7

1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'MGS_Mmegamenu::active_menu.phtml' in module: '' block's name: 'active.megamenu.script' I'...
0
votes
0answers
192 views

Edit Order return Guest form

I like to edit order return guest form. I edited in app/design/frontend/[theme]/Magento_Sales/templates/guest/form.phtml but form settings are in vendor/magento/module-sales/Helper/Guest.php. ...
0
votes
2answers
159 views

Add a class or id when changing the language magento 2.3.1

pls help me! How to Add a class or id to html or body when changing the language magento 2
0
votes
5answers
712 views

New order email template - price decimal place

we have amended our Magento 2.1 to use and store prices with 4 decimal places. But then used some JS to trim/round-up on the frontend to 2 decimal places. However, on the email templates, the price ...
6
votes
1answer
114 views

How to create custom XHTML template system in magento 2?

Hey guys, I want to know how to create a custom XHTML system with the custom module or via core file system in Magento 2 & how it works?
4
votes
2answers
686 views

Magento 2 blocks and templates

Following are the 4 conditions. Single block and multiple templates - I think this is possible and we use it frequently while customizing Magento. Multiple blocks and single template - Never seen ...
1
vote
0answers
36 views

Customizing template in magento2

I need help in 2 questions: 1 - Put a delay for the newsletter popup to open after the uploaded website + 10s 2 - I have 2 javascript (tidio and whatshelp.io) in the footer, the ...
0
votes
1answer
426 views

How to render a block/template after page load

I need to know whether we can render a block or a phtml template file after the page load. I have added the block and template file in the layout file and it works fine. But i dont want that data to ...
0
votes
1answer
56 views

Add content of static block as new tab to product detail page

I created 3 static blocks with just a random headline for now, where I want to add html content later. the ids of the blocks are: warranty instructions certificates I then created 3 .phtml files ...
0
votes
1answer
25 views

Where block template for email is located

I found in an old Magento 1.3 installation following code in an email template: {{block type="symmetrics_impressum/impressum" value="emailfooter"}} It works and this snippet implement my imprint in ...
0
votes
3answers
702 views

Layout - Pass variables from parent to child

How can I access variables defined in the parent template inside a child template? Example -> I added a new block with name product.info.grouped.news_flag as child of the block with name product.info....
2
votes
2answers
861 views

Magento 2 pass data from template html to phtml file

So far I have created file MyModule/ProductAlert/view/frontend/email/stock.html - <!--@subject {{trans "Products back in stock alert"}} @--> <!--@vars { "var alertGrid|raw":"Alert Data Grid"...
0
votes
1answer
159 views

<arguments> approach not overriding the template file

I wanted to override vendor/magento/module-sales/view/adminhtml/templates/items/column/name.phtml template. And created new layout xml update as: File: app/code/MagePsycho/CustomInvoice/view/...
2
votes
1answer
322 views

Review form in custom template not working Magento 2.3.4

I have created a custom template for the product page based on the attribute value. in my template i used below code to display the review section. <?php echo $block->getLayout()->...
0
votes
1answer
128 views

Where body tag styles are defined in Magento 1.9

I have spent several hours trying to figure out this. The fact is that I have a site that has a BODY tag with certain classes for style. I need to change those classes, but I have not find where are ...
2
votes
0answers
2k views

Magento 2 - Override Swatches renderer.phtml

I would like to override file : app/code/Magento/Swatches/view/frontend/templates/product/layered/renderer.phtml In my own theme : app/design/frontend/[VendorName]/[theme]/Magento_Swatches/...
1
vote
1answer
111 views

Magento 1.9 template file calling from base and not from my custom theme

In Magento 1.9 I have created my custom theme. Also, I have created one new module in the 'local' code pool. Everything workes fine but the template files are loading from the base like frontend/...
0
votes
1answer
204 views

How to convert template variables to custom data in magento 2

I have configured a back-end screen where I will enter a string as {{price}} for guest user. click here {{sign_up}}. So after I fetch the field value I want to dynamically replace the {{price}} ...
1
vote
1answer
757 views

KnockoutJS Which Model does the Minicart use?

So, i'm very new when it comes to using KnockoutJS but i've been doing some reading around it and to my knowledge each template file has its own corresponding model. However, as i'm looking through ...
0
votes
1answer
58 views

How array set in email.html file

i make custom mail template. my template variables are $TemplateParameter=[ 'customerName'=>$getOrderParams['customerName'], 'orderItems'=>$getOrderParams['productinfo'] ...
0
votes
1answer
429 views

Magento 2 Error filtering template?

After installed module we are getting one error message called "Error filtering template: You cannot define a correlation name 'stock' more than once" Mentioned with below code. Can anyone ...
0
votes
1answer
454 views

How to use different page layouts depends on base layout specified?

I have to use different page layouts (<page>) depends on base layout (<layout>) specified for a product. For example, if I select a layout in product's 'Design' menu with the name ...

1 2 3
4
5
28