Questions tagged [list.phtml]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
2k views

How to override price html on product list page

I am writing a custom module for magento 2 i.e "call for price" and I want to override price html on product list page. I have follow the following scenario: 1.etc/di.xml <?xml version="1.0"?...
1
vote
3answers
2k views

Remove Add To Cart Button in product List page magento2 without using template file

I want to remove Add To Cart button at category page. but I don't want to use template file. I did it for product view page using event. $layout = $observer->getEvent()->getLayout(); $...
1
vote
3answers
956 views

magento 2 custom attributes value frontend return No value of select

I have a problem in retrieving the value of custom attribute of type select, it returns a value No I try this code in list.phtml: <span class="product_badge_value"> <?php /* @...
0
votes
2answers
880 views

Magento 2 Invalid Block Type in Custom Module?

How can I Rectify Invalid Block Type Error in my custom module. I created a custom module in magento 2 for overriding default product list page with separate phtml file I am calling them in category ...
0
votes
0answers
21 views

Get visibility of product in product list

Within a product list, I would like to access $product->getVisibility() for each product of the collection. However, this is always null instead of either of the 4 states. I have already added &...
0
votes
0answers
33 views

Filtering category products showing wrong count in layer navigation in Magento 2

I have used below code in, app/design/frontend/Custom/Theme/Magento_Catalog/templates/product/list.phtml <?php $_productCollection = $block->getLoadedProductCollection(); $_helper = $...
0
votes
3answers
71 views

list.phtml not overriding/ not reflecting the changes : Magento 2

all I am trying to override list.phtml to customize product listing on every product listing pages. I tried this way. I have app/code/<Vendor>_<Module>/view/frontend/layout/...
0
votes
1answer
163 views

Magento 2 Custom Product Collection Size Problem after Removing Products from Collection

In Category list view I want to create a custom collection where some products are not shown OR the entire collection is re-sorted. To test this I created an observer for the event ...
0
votes
1answer
32 views

Get Custom Category Attribute Value On List Page : Magento 2

i have created custom category attribute now i want to get the attribute value on list.phtml page i can i achieve this in magento2. <?php if($category->getColThreeCategory()): ?> <...
0
votes
1answer
232 views

Magento 2.3 add custom block under each product in category page

I need to overwrite the product listing (category) page, a custom form needs to show after that product information. So I have found that already an extension is overwriting that page as below <...
0
votes
1answer
31 views

How to add remove from cart button onto category page

I am currently developing Magento 1.9 (yes I know it's outdated) and they have requested remove from cart buttons on the category page (list.phtml), however, I cannot seem to find a way to add the ...
10
votes
4answers
363 views

Magento 2 - Call list phtml by passing collection variable

I have collection loaded in variable $collection and I want to pass collection variable in my list.phtml $block = $viewBlock->getLayout() ->createBlock('Vendor\Module\Block\...
3
votes
0answers
45 views

How to display products on a homepage in a list mode in Magento 2?

I tried to use Catalog Products list to display products on my homepage (not category page). By default, all products are shown in grid mode. And I see that there is only one option of grid mode in ...
1
vote
1answer
64 views

Magento 2 call list.phtml with custom collection

I have custom collection in $collection I want to pass it to list.phtml so that I don't have to create listing UI again. I am trying to do this but it is not working <?php echo $this->getLayout(...
1
vote
0answers
212 views

Magento2: custom javascript not called when using with text/x-magento-init

In list.phtml (product listing) I am showing requistition lsit for every product using type="text/x-magento-init" in loop as: <script type="text/x-magento-init"> { "*": { "...
0
votes
2answers
44 views

Magento 2 How to get the configurable products related all child products in list page using object manager?

Magento 2 in how to get the configurable products related all child (simple products QTY) in list page using object manager? Please give me a solution this questions?
0
votes
1answer
260 views

want to replace select button with add to cart button in product list

Currently when I click onto a category and see a list of products, it puts a select button next to each product in list mode. Select brings you to the product page. I would like to replace that ...
1
vote
0answers
21 views

Webkul Layerednavigation

I just installed Magento 2 webkul advanced layered navigation. but wen I use it as composer, I get below error: [RuntimeException] Source class "\Webkul\AdvancedLayeredNavigation" for "\Webkul\...
0
votes
3answers
601 views

Magento 2. How to override List.phtml

I want to Override List.phtml and for that I'm using this Layout Vender/Module/view/frontend/layout/catalog_category_view.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/...
-1
votes
1answer
55 views

How to show the count of reviews

How to show the count of product review on the category page? Now i just can get the stars, but no counts
0
votes
2answers
410 views

Magento2.1 different mobile view

I want to see search results in list mode by default in desktop, and see it on grid mode on mobile. What should I do? Right now I edited catalog search list.phtml to show list mode by default on ...
0
votes
1answer
108 views

magento2.1 dropdown attribute list.phtml

How to get a dropdown attribute value on the category page, i set the show in listing to yes and added this attribute to product. any suggestion?
0
votes
0answers
92 views

magento2.1 bottom pagination when there is no page

When i set pagination to 60 and i have 55 items, so shows 55 items and it is nice, but still shows a bar of pagination on the bottom of the page. how can i remove it when there is no pagination page ...
0
votes
2answers
179 views

How to get dropdown value Magento2.1

I want to get a dropdown attribute value on the category page, i set the show in listing to yes and added this attribute to product. then set below code to my list.phtml: ...
0
votes
2answers
207 views

Magento 2 make new method available in list.phtml

If I need to create a method under Magento\Catalog\Test\Block\Product\ListProduct Class This class has methods such as: getProductItem,getProductNames,getProductsCount,getSortByValues I Would like ...
1
vote
1answer
82 views

Change text and Relink the “Add To Cart” button in the product list page (list.phtml)

Do you know how to Change text and Relink the "Add To Cart" button in the product list page (need to change code in the file list.phtml). In my magento server, the list.phtml file is located in the ...
0
votes
1answer
32 views

Magento 2 - language override phtml

Is there a way to override a .phtml file on language level? I have 4 stores (language dependency) and i want to make some changes in the code for these different countries. I this possible through, ...
2
votes
3answers
2k views

Show all products in a list not grid?

I want to show all products, stacked in a nice list, one on top of each other. I am using {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="...
2
votes
2answers
1k views

How can I make product list page show 5 products per row instead of 3?

<?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ use Magento\Framework\App\Action\Action; // @codingStandardsIgnoreFile ?><?php /** * ...
2
votes
1answer
21 views

Want to display the special price directly with out any pop dailog box? [closed]

hi I dont want this dailog box and i want to show the price in the place of Click for price.
0
votes
0answers
551 views

Magento 2 : How to show add to cart button in out of stock?

I want to show add to cart button block in my list.phtml even a product is out of stock. I do not want to enable back orders too. How can i do this? OR May i know from which file checking the stock ...
1
vote
3answers
1k views

Can't override list.phtml in Magento 2.1.6

I'm trying to override Magento_Catalog list.phtml in magento 2.1.6 and it's not working. I have a theme working and others templates and layouts overrides are working correctly. My custom list.phtml ...
0
votes
2answers
42 views

Magento 1 add div inside list foreach

I want to add a specific div after every 3 items inside the category list. So I want to extend the code of /app/design/frontend/theme/theme/template/catalog/product/list.phtml There is the following ...
1
vote
1answer
377 views

Helper function calling issue in magento1

When I call my custom module's helper function in catalog/product/list.phtml file my list page is gonna black. In phtml : $helperToday = Mage::helper('today_special/data'); $arr = $helperToday->...
1
vote
1answer
466 views

How to show products from subcategories in a category page

I need to list products in a category page sorted by subcategory with respective subcategory name before the products. With static blocks I can display the name of the subcategory on the category page ...
2
votes
1answer
313 views

Magento 2: Custom block in list.phtml

I have created a custom block in my module to show the quantity of each product in list.phtml file. I modify in my custom template list.phtml with the code below <?php $myBlock= $block->...
0
votes
3answers
2k views

Configurable Swatches Not Showing on Category Page

I have configurable swatches working on my product page, but I can't get them to show on the category page. I am working with the grid and a custom theme. Being that RWD is the default theme that ...
0
votes
1answer
416 views

Different list.phtml for categorys in the backend of Magento 2.1.7

I try to switch the list.phtml for 4 categorys. Each category should have his own list.phtml. The problem: I don't want to call it by the category id directly. I know I can easy do this directly in ...
0
votes
1answer
452 views

magento multi store shows only place holder of product images on list view

I have setup multi-store for magento and everything works fine except the list view page, Here I get the place holder of thumbnail images and not the actual images. In between I have chosen the ...
0
votes
1answer
263 views

PHTML to PHP for PDF print out purpose

I have some difficulties to convert some phtml codes into php (note: simple conversion with online tools html to php does not work therefore please do not answer if it is to refer online tool). Below ...
2
votes
1answer
470 views

Magento 2 Create Product Details pdf?

How can I create a pdf file with Product details and download it by clicking on download image in product list page in magento 2.Can anybody Help me on this.
0
votes
2answers
433 views

Price Difference In List.phtml and View.Phtml in Magento 1.9

I have a magento store running on magento 1.9 version which has 30000+ products. When i update a product and apply a rule it has to be reindexed to apply the rule. And whenever i do that ,there will ...
2
votes
1answer
611 views

Magento2: Call different list.phtml file in some category?

I want to customize catalog list page for some categories. I got the below link how to use different template file for category magento 2 But it needs separate xml for each category and the name ...
0
votes
1answer
161 views

Check if attribute equals specific value

I want to check that a product attribute equals a specified value in the product/view/list.phtml template and if so, display some html. The current code gives no result. Can an edit be suggested to ...
1
vote
0answers
217 views

swatches with infinite scroll for category pages

I am creating an infinite scroll for category pages in magento 1.9.2. the crux of it is jQuery.ajax({ url: pageurl+'p='+next, success: function(result){ jQuery('#...
1
vote
4answers
3k views

Adding Custom PHTML file in List.phtml (Category View)

I have a custom PHTML file custom_theme/default/template/catalog/product/colors.phtml I have edited custom_theme/default/layout/catalog.xml I have added <block type="catalog/product_colors" ...
4
votes
2answers
2k views

modify list.phtml to show only a limited number of products on home page

On the home page, I am trying to display70 only 6 random products on one row, from a category (id 24) that has 70 products. And randomly changed each time the page gets re-loaded. The only method ...
0
votes
1answer
339 views

How to remove Mega-Menu dropdown [closed]

I want to (Magento ver. 1.9.2.3) default menu in my other phtml file. how to call it? I want to display menu onclick
2
votes
2answers
674 views

new category list.phtml calling whole catalog

I am trying to create a new list.phtml for a category that has a bunch of smaller products for our store. I got everything working right, except for the fact that the list.phtml is calling my whole ...