Questions tagged [list.phtml]

The tag has no usage guidance.

7
votes
4answers
111 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
28 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 ...
0
votes
2answers
741 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 /* @...
1
vote
1answer
23 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(...
2
votes
1answer
1k 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
0answers
90 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"> { "*": { "...
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(); $...
0
votes
2answers
41 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
247 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 ...
0
votes
2answers
688 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 ...
1
vote
0answers
17 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
181 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
32 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
136 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
52 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
50 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
69 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
88 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
59 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
24 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
1k 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
405 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
39 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
267 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
399 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
277 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
1k 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
343 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
437 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
211 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
429 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
367 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
556 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
140 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
191 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
308 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
661 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 ...
1
vote
4answers
2k views

How to get review form page url in view.phtml in magento

How to get review form page url in view.phtml in magento I want to get the Be first to review this product url in view.phtml file
1
vote
1answer
671 views

Show default additional product attributes in Category list.phtml

On the Product view page you have a default tab 'More information'. In this tab you see attributes from the default Attribute Set. I want to show those attributes on the Category list page, under the ...
2
votes
2answers
111 views

Is it possible to stop rendering filters for some categories in Magento 2?

How can I prevent/stop rendering layered navigation (filters) for some categories in product list page in Magento 2 ?
0
votes
1answer
2k views

How to Call filters in custom phtml/Product List Page Top in Magento 2

How Can I call Magento 2 default product layered navigation filters (left side filters) in top of the product list page.Can you Help me on this ?
1
vote
3answers
338 views

Override .phtml files in Magento 2.1.2

I have started working on Magento 2.1.2 and require to update few modules and files but I am not able to update .phtml files. I have create theme with the name of theme and doing all by in theme ...
0
votes
2answers
1k views

Load pagination on list.phtml

i'm trying to create my first magento template and i'm facing problems to load the pagination toolbar. My last try was using $object = new Mage_Catalog_Block_Product_List_Toolbar(); echo $object->...
3
votes
1answer
251 views

Magento 2 Log Bundle Product Data in List Page?

How to Log Bundle Product Data (Print Product complete information)In Default Product list.phtml file in magento 2.I am Getting foreach ($_productCollection as $_product): When I write echo $...