Questions tagged [product-list]

Questions about the product list blocks, used in categories, search results, upsell and so on

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

How to show custom attribute value as label in magento 2 product listing page

How to show custom attribute value as label in Magento 2 product listing page. I am using helper to show custom attribute value in product listing page corner of every image as label. I get the value ...
0
votes
0answers
16 views

Magento2:How to sort by Product Name A -Z in listing page?

I have used to Magneto2.3.1 and I have to create custom plugin for sort by option there Product Name A -Z not working on it getting error like below: 2 exception(s): Exception #0 (...
1
vote
0answers
20 views

Magento 2: How to check product has video or not

In the product list.phtml I want to check if(product has video) { show button video }else { not show button video } Any way to solve it? Thank in advance.
1
vote
0answers
16 views

Magento 2: Modal video in product list

In the product list, I want to check if product video exists show button video like this: and when I click on the button video will be played like modal. Any way to solve it? Thank in ...
0
votes
1answer
35 views

Magento 2 function to get a list of products (simple and configurable) with special price on a given date

I have the following function which gives me a list of simple products which are on special at the moment: public function getSpecialProducts($config = []) { /** @var $collection \...
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
12 views

Magento 2.2 Custom Product collection for layered navigation

I changed the product collection for product list page but can not able to change product collection for layered navigation. Where to change custom product collection for Layered Navigation??
2
votes
1answer
49 views

How to execute custom controller action for product in magento2?

I would like to write some custom code product actions in a controller is executed. When I have click on the product than showing multiple brands and after that click on brand then show product ...
1
vote
1answer
96 views

How to change products sort order in magento 2?

In product list page I need to change the sorting order. I have a current order like: Description A-Z Price High To Low Price Low to High Description Z-A I need to change it to. Description A-Z ...
0
votes
1answer
41 views

Magento2 How to get current compare product collection on product list and product detail page?

I am using Magento2.3.1 and I need to list and detail page current product if add compare product than getting list and count on list and detail page. So I try to detail and list page checkbox with ...
1
vote
0answers
37 views

Profiler Analysis for product list page in magento 1.9

My product list page is very slow as I have customized things and use custom phtml for that, I have enabled the profiler and found this: Memory usage: real: 78643200, emalloc: 49273704 Code Profiler ...
0
votes
1answer
20 views

Magento 2.3 don't show products if price is 0

Is there a way to hide products that have the price at 0? I tried with this Plugin but it shows the same all the products even those at price 0. <?php namespace Vendor\Namespace\Plugin; use ...
0
votes
0answers
9 views

Show filters with price zero at bottom of the list page, Magento 2

We have products whose prices are zero.In list page when i use an filter by price from low to high , the product with zero price will come first.Is there any way to make them bottom of page by using ...
1
vote
0answers
19 views

Magento 1.9.x Custom attribute list in catalog/product list page

I'm definitely not a programmer, I struggle to program a television recording. However I have to see a list of attributes in the short description of the magento 1.9 product list. I created a custom ...
2
votes
5answers
248 views

Display Product collection issue in Magento 2

I have a product collection and i have used below code to display in my template file as follows. <ol class="products list items product-items"> <?php $productCollectionSku = array('111',...
3
votes
0answers
56 views

List Product Collection into template file in Magento 2

I am loading the Product Collection by calling the ajax request. Here is my code of template file. $('#modifyRecentAddSkus1').on('click',function(){ var skus = $('#skus1').val(); ...
2
votes
3answers
68 views

Magento 2 Create A custom grid for product using Ui component

I want to create a gird using the UI component in Magento. The grid must have product id and product SKU. I tried using the below code but it's not working. Here is the below code to create the grid. ...
0
votes
1answer
99 views

Magento2 : Product Updates Not Showing on Front End - store scope issue

Problem: Certain product attribute updates are not being seen on the front end. Irrespective of re-indexing, cleaning and flushing the cache, etc. If I change them via Update Mass Attributes, then ...
1
vote
0answers
69 views

Magento 2 sorting configurable products by special_price is not working

I have simple and configurable products on listing page. I am using special_price attribute for sorting. It is working for simple products but not working for configurable products. I have assigned ...
0
votes
1answer
36 views

Magento2 : Products showing “Out-of-Stock” in Frond-End and “In-Stock” in Backend

I am using Magento version 2.3.x and when I add a downloadable product, it is showing out-of-stock in the front end. but it is showing in-stock in the back end. how to fix this, I have tried my ...
0
votes
1answer
30 views

Change the Product grid view to a specific number of columns

The default number of columns is 3. How do I change it to 2? I prefer a solution that uses the admin, but I will settle for any solution. I have looked through the Magento user guide www.magento....
0
votes
1answer
30 views

How can i extend magento 2 ListProduct Block class in any Php class and how can i used that?

class My_Catalog_Block_Product_List extends \Magento\Catalog\Block\Product\ListProduct { } productTemplate = 'product.phtml'; $productList = new My_Catalog_Block_Product_List(); $productList->...
1
vote
0answers
26 views

Attribute value shows 'no' when it is 'yes' on category listing frontend Magento 2

I have a very strange issue with my store. I have an attribute (yes/no value) and when I echo the value on the listings page on the frontend of my Magento 2 store all products show the value as 'no'. ...
1
vote
0answers
33 views

stock filter is not adding to layered navigation in magento 2.2.7

Do all the setting but not get the filter in front end for stock
0
votes
0answers
24 views

How can I create category page for product listing?

Can anyone help me for create page for showing products in one or some category in magento 2.3.1 .
1
vote
0answers
29 views

Use ProductList widget

I try to display list of products with the widget ProductsList, without success. I have the following code : $block = $this->_view->getLayout()->createBlock('\Magento\CatalogWidget\Block\...
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 ...
1
vote
0answers
16 views

How to configure Category product listings in Mobile?

We knew the steps to configure the product listings in Magento 2 on Desktop view and done successfully as per our need. Now, we wanted to show 2 products per row in portrait mode and 3 products per ...
0
votes
4answers
19 views

How to set qty number to add to cart on product page

How to set certain number when the product page loads up. Default level when you click on a product the add to basket quarry is always one how to change that to different value for each store. I know ...
0
votes
1answer
52 views

Magento 2.2.4 ,how to show 3 products per row insteadd of 4 on category list page?

Magento 2 , how to show 3 products per row instead of 4 on category list page?
1
vote
0answers
17 views

Magento 1.9.2. - Filter products on the list page starting from the last tier price

I would like to be able to filter the products on the list page not for the final price but for the last tier price. How could I do? Thanks
0
votes
0answers
18 views

For heavier category(having 2000 products) ,category page takes 4-5 min to load, while for a small category( few products) it's working properly

I've used following two joins on product listing page due to which heavier category page taking 4-5 minutes to load:- Class:- vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php ...
0
votes
1answer
31 views

How can get custom table columns on product listing page using product_id of the custom table

On product listing page, I need to show visitor nearest product first. I've a marketplace site and each product have different seller and there is a custom table having seller_id and product_id ...
3
votes
1answer
109 views

Notify me when this product is in stock on product listing page in magnento 2.2.5

I want to add "Notify me when this product is in stock" on product listing page in magento 2 . by default if product is out of stock this comes in the product detail page. but i want in the product ...
3
votes
1answer
536 views

Attribute filter with checkboxes , Magento2

Has an product attribute filter with checkboxes by default for category view ? For example
1
vote
2answers
38 views

How to add Listmodes in Magento 2?

How to add the list modes in magento 2 custom module. I need list modes like below image. http://prntscr.com/mwrq23 and my productlist.phtml file is <div class="container-list container"> ...
2
votes
1answer
498 views

Magento2 : Pagination - jump to top of page [closed]

I have problem with next/prev Buttons in Pagination. If user clicks button, it reloads the page (i think) in Ajax at the current page scroll position. Is there any method to force the reload jump to ...
3
votes
1answer
45 views

Magento 2: Product List Not Showing in Catalog and Search

I am having a problem with the product list when adding new products. It was working properly until I added a new product. Then, the product list stopped being visible in the catalog pages and search ...
1
vote
2answers
107 views

Magento 2 : How to change the currency symbol wise price in list.phtml page?

I will trying but its not working ? <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of Object Manager $currencyModel = $objectManager->create('...
1
vote
0answers
209 views

Conflict in layer navigation and infinite scroll extension magento2

I have Installed above BSS_layeredNavigation & Lof_Ajaxscroll extensions. Both of them are working fine if used individually. If both extensions are enabled there is a conflict. To avoid ...
0
votes
1answer
147 views

How can I edit files like frontend/…/category/view.phtml?

I have been trying to edit some files from the frontend folder. On this folder I have the following folders: base, default, rwd and typologancee. I have to create a specific filter which is going ...
0
votes
1answer
15 views

Magento 2.2.7. Best way -according to the Magento guidelines- to apply some custom javascript to specific products

At app/design/frontend/Custom/Theme/Magento_Catalog/templates/product/list.phtml I'm trying to apply a javascript for certain products (not all of them) as follows: <?php foreach ($...
1
vote
1answer
285 views

How to re init ajax add to cart inside the response in magento2

I have installed third-party module Infinite scroll for the lazy load(Lof_Ajaxscroll). The problem I am facing is Once the page loads new HTML content is generated from ajax. So add to cart is not ...
0
votes
1answer
372 views

Add Product Description on Simple Product Page Magento 2

I'm having difficulty figuring out how to add a description to a Simple Product that will subsequently be displayed on the Simple Product Details Page. Everywhere I have looked discusses using code to ...
0
votes
0answers
83 views

How do I better improve the performance of my search function in my Magento 2 website

How do I better improve the performance of my search function in my Magento 2 website. Every time i try searching a key word, such as Mi 8, it doesn't show results with the searched keyword in the ...
0
votes
0answers
34 views

add configurable swatches and add to cart button to product list

Im on magento 1.9.2.4 and I need to display the product swatches and the add to cart button to the configurable products in the product list (catalog_category_layered). After doing some research I ...
0
votes
0answers
187 views

Magento2.1 wishlist on category page

How to set an active class to magento2.1 wish-list button on list page? I mean that, when i go to product page, if marked that product to my wish-list before, just shows already added to wish-list or ...
1
vote
1answer
24 views

How can i create a custom page for product listing in magento 2

i have created a module and i got the respone in phtml but dont know how to design it same as listing help me to create a custom page for product listing in magento 2
0
votes
0answers
23 views

Magento 2: Get category in product list

In my product list template I need the current category. I was searching around and the recommended way is to inject the registry into the current block's constructor. Example: https://magento....
0
votes
0answers
163 views

Magento 2.2 Display Product Custom Attribute in products in Home Page

I have custom attribute called "hasgift" and its Boolean (yes, No), and trying to display it's value in products tab Module in homepage. But Its Only Give Me (No) Vaue. I have Used Same Code in ...