Questions tagged [list.phtml]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
12
votes
3answers
1k views

Performance: Add Inventory Stock Levels on product listings list.phtml of all product types

TL;DR, The requirement is having a stock level of inventory be displayed on the category product listing page with as little additional queries/memory with performance in mind that adheres to Magento'...
7
votes
4answers
275 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\...
6
votes
2answers
13k views

show products of a category on home page in magento 1.9.2.2

i'm getting crazy right now. I'm setting up a template and this easy thing which was done in 5 minutes took my last 3 hours. I can't figure out why this simple block thing for showing a category on ...
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 ...
3
votes
1answer
317 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 $...
3
votes
0answers
41 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 ...
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
3answers
206 views

Trim product name based on manufacturer attribute

I have a shop with many SKU's. I've recently added the manufacturer name attribute (e.g. Nike) to the catalog/product/list.phtml. As a result I now have duplication as the manufacturer shows before ...
2
votes
2answers
128 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 ?
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
2answers
325 views

Access custom_design in product list

I need to alter the display of products in catalog/product/list.phtml based on whether they have a Custom Design assigned, in Magento 1.8. I've edited custom_design in Catalog > Attributes > ...
2
votes
1answer
598 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 ...
2
votes
2answers
671 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 ...
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.
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"?...
2
votes
1answer
306 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->...
2
votes
1answer
467 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.
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
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" ...
1
vote
1answer
513 views

List.phtml load external file with php does not work (missing helpers)

Inside our list view I want to load an external php file. The file is displayed, but when loading the php code, the page break down. When I place the php code inside the catalog/product/list.php it ...
1
vote
1answer
611 views

Remove decimals list & product view

I want to remove the decimals and replace this with a symbol on the list and product view. I only want to edit those two files. I want to edit the price.phtml and I need to modify this line ...
1
vote
1answer
458 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 ...
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 ...
1
vote
1answer
728 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 ...
1
vote
3answers
397 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 ...
1
vote
1answer
2k views

Magento 2: get Nextpage, Lastpage Url in list.phtml file

How to get Next page, Last Page url in magento 2? I have try in template file with below codes, <?php $_productCollection = $block->getLoadedProductCollection(); $_helper = $this->helper(...
1
vote
1answer
1k views

How to Change the position of breadcrumbs in list page?

I want to display the breadcrumbs in list page alone to display inside the grid exactly just above the toolbar. So I entered this line of code: <?php echo $this->getChildHtml('breadcrumbs') ?&...
1
vote
1answer
1k views

How to get total number of pages in list.phtml

In magento 1.9.2.3 at the category of products I have two toolbars. At top toolbar I need only "Previous" and "Next" link. At the bottom toolbar I need "Total of Pages", "1, 2, 3 ... n-th nubmer of ...
1
vote
2answers
572 views

Custom Attribute on Product Listing Magento

Greeting, Though there are several answers to this question, just need to add AttributeCode to list.phtml page. But here lies my problem i am unable to edit my list.phtml. Is there any why through ...
1
vote
1answer
1k views

shuffle() full collection?

On the catalog product list view I can use shuffle() on the product collection however it only shuffles a small proportion (e.g. 10) of the full collection (hundreds). There is also infinite ajax ...
1
vote
1answer
57 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
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\...
1
vote
0answers
190 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
1answer
76 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 ...
1
vote
1answer
359 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
3answers
892 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
0answers
216 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
0answers
328 views

Issue with implementing Ajax Buy Now button to Magento List.phtml

I am trying to add a "Buy now" button to the category page of my store. I have followed the following guide; http://www.ifuelinteractive.com/jquery-magento-and-ajax-add-to-cart-redux/ Making a few ...
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
3answers
61 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
103 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
3answers
488 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/...
0
votes
2answers
160 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
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 ?
0
votes
1answer
144 views

How to rearrage breadcrumbs in list page `2-column-left.phtml` alone?

I want to display the breadcrumbs under col-main div instead of main in list page alone. Not in all pages that uses the two-column-left layout. Is that possible?
0
votes
2answers
192 views

Home Page Product Layout

Okay so I want to be able to put multiple different types of products on my main page. I found this code {{block type="catalog/product_list" category_id="259"template="catalog/product/list.phtml"}}...
0
votes
2answers
5k views

If product has custom options, then echo out div on list.phtml

I'm fairly new to Magento and looking at PHP code is just daunting to me so I'm trying to learn by doing. I've been looking into making my own "Free Gift" label for items on my store but no extension ...
0
votes
1answer
517 views

Magento 1.8.0.0 Shows all Product in Category regardless of limit.

I'm trying to fix some nasty thing that happened to our store. We currently using Grid only display mode. Category has 192 products and settings are these: - List Mode: Grid Only; - Products per ...
0
votes
2answers
349 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
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 ...