Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
1answer
49 views

Layout XML Error - Magento 2

I change the deploy mode to developer on Magento 2 and now I see the following error: 1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block': This element is ...
0
votes
1answer
30 views

How to remove side bar of best seller in my account page of Magento 2

I want to remove sidebar of best seller in My account page of magento 2
0
votes
1answer
29 views

Magento 2 | is it possible to set block class by referencing a block?

I'm currently rewriting a layout file: <referenceBlock name="checkout.cart.totals> <!-- some stuff --> </referenceBlock> Is it possible to set the block class here? Thanks in ...
2
votes
1answer
158 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
2answers
37 views

Adding Magento_Catalog to Custom Module

I wanted to override the content of addtocart.phtml which is located in vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml Now I want to modify the content of this ...
0
votes
0answers
10 views

Add custom widget to created block in install magento

I wanted to add my custom widget to a block that I will be creating under install function. But I can't find any tutorial on this. Right now I have copied the code from here so it creates a block. But ...
1
vote
1answer
77 views

magento 2 createBlock from argument item

My custom module xml file contains the block code. I want to call that block code directly using createBlock method and set template to show in specific template. My block code is adding animated ...
3
votes
1answer
229 views

Magento 2 - Page cache with hole punch

Magento page cache cached some of the blocks that has dynamic value, like Wishlist count on header for logged in customers I can make it dynamic using Ajax, but then it came to my knowledge that it ...
5
votes
3answers
188 views

Get category id

How can I get ID from this code which is typed into CMS page content? {{block class="Vendor\Module\Block\CategoryList" category_id="49" template="Vendor_Module::subcategorylist.phtml"}} I need to ...
0
votes
1answer
63 views

Magento 2: How to add block inside block html content through XML file

I have created my custom arithmetic captcha. I want add that captcha to my custom form through xml file without defining in phtml file on custom layout. For example: Testimonail submit form: ...
4
votes
2answers
1k views

When it is good to use viewModel ? What is difference between viewModel and Block?

I am bit confuse about using viewModel in Magento. I am not getting exact difference between viewModel and Block. In which case using viewModel is best case? Any help will be appreciated.
0
votes
2answers
27 views

Multiple use of `getConnection()` in a single block and impact performance issues

I found a module someone created and looked into the code. I found that this person was making a lot connection as such in a single block: public function checkStoreExists($storeID){ $connection =...
0
votes
0answers
74 views

magento 2 in update password to hash in save to database not working?

I will try to change password but its not working! <form method="POST"> <label>Old Password : <input name="old_password" id="old_password" type="password" /> </label> <...
0
votes
0answers
18 views

Magento 2 in how to change the password in direct in database link to connect using Seller without hash method?

i have try to change direct connect in database but its not working? <input type="password" placeholder="New Password" id="password" required> <input type="password"...
0
votes
1answer
70 views

Magento 2.2: How to remove add_to_wishlist button from, and add SKU view in, recently viewed products widget in module

I want a extra tab on product page with 4 previously viewed products. Besides that I want to remove "add_to_cart,add_to_compare,add_to_wishlist" buttons and add SKU attribute to recently viewed ...
0
votes
2answers
976 views

adding a video to home page banner

I am trying to add a video on banner of my home page but the video doesn't appear, it shows a message no video with supported format. I uploaded a mp4 format and mov format but it shows the same ...
0
votes
1answer
309 views

How can modify method initializeProductCollection() without changing in core file

In the class Magento\Catalog\Block\Product\ListProduct, how can we modify private method "initializeProductCollection()" without changing anything in this core file? Please help!!!
0
votes
1answer
540 views

Magento 2 : Where is block code located

In the luma theme, in the home block, it starts with the code div class="blocks-promo". I would like to learn more these block classes so that I know how to use them going forward. i.e. I need some ...
1
vote
1answer
34 views

I can't override the adminhtml block and controller please suggest me missing parameter

I can't override the adminhtml block please suggest me missing parameter <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/...
1
vote
1answer
172 views

Magento 2.2 : Static block call to every CMS Page

How to call a static block call every cms page in Magento 2.2
0
votes
0answers
31 views

Is it possible to remove blocks on local environement?

As I have seen in other topics that some things were not working on local environment I was asking myself if it shoukd be the same problem with removing blocks. I have folowed Magento instructions and ...
1
vote
2answers
3k views

Magento 2 Static Blocks dont show up on category pages

I'm trying to add static blocks on Category Pages and all category pages have different content. So, I add Blocks to the Backend Category Page > Content > Add CMS Block then, Display Settings ...
2
votes
3answers
526 views

Magento2 - missing adminhtml custom block after upgrade to 2.2

We had a custom block injected in the adminhtml section. This block is managed in a module (let's call it Vendor/Module) & it was working fine in Magento 2.1.*, following this methodology magento ...
0
votes
2answers
41 views

How to include the Login.php in my custom template? — Magento 2.2

I am new to Magento, I am not yet familiar with how the paths are working. I am trying to override file Login.php the in the following path: vendor/magento/module-customer/Block/Form/Login.php I am ...
3
votes
1answer
202 views

Controller in magento2?

I have created a custom module. and I want on Save <form action="<?php echo $block->getBaseUrl() . 'sales/order/view'; ?> " method="post" enctype="multipart/form-data"> On button ...
1
vote
1answer
682 views

How to get Product rating code and its value in magento 2

I have modified review form as popup modal.And I have also created an empty stars rating for the product which does not contain rating yet.But I have created those stars statically. But Now I need to ...
0
votes
2answers
710 views

Magento 2.2.0 - Block not called in Custom Module

I am working on a simple module and trying to display a block. All that is showing up is a blank page. If I put an echo "blah"; exit() in my controller, it shows the output. No errors in my log files. ...
1
vote
2answers
518 views

Use plugin after getImage() in Magento 2

I want to add text after image on product list page. For that I created plugin for getImage() function of vendor/magento/module-catalog/Block/Product/AbstractProduct.php Plugin Code: <?php ...