Questions tagged [compare]
Questions about the "compare products" feature. Do not use this tag for questions about comparing anything else.
117 questions
1
vote
2
answers
1k
views
Magento 2 check if product already in compare list
I want to check if products is already in compare list on product listing page and show remove compare button there
below is come of my list.phtml
Add to compare
<a id="compareclick-<?php ...
0
votes
1
answer
36
views
Compare products trough URL based on product id - Magento2.4
Is it possible to create a compare list with products using a URL with product ID's?
Something like:
www.domain.com/catalog/product_compare/index/items/1,2,3,4
Or is there another method to easily ...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
60
views
Magento 2 Display compare block only when the number of products to compare > 0
On the catalog page I only want to display the block-compare if the number of products to compare > 0. Now I still see the title of the comparison block, I don't want to see anything.
This is my ...
0
votes
2
answers
251
views
How compare item works in magento 2
In Magento 2.4.4, I saw entries in catalog_compare_item as visitor_id = 0 and customer_id = NULL,
How visitor id is updating in the table?
1
vote
2
answers
407
views
Add Success Message in Custom Popup for Add to Compare in the listing or Category Page in Magento 2
I want to add custom pop-up in category page for showing success or error message for add to compare button.
Any help is appreciated.
Thanks in Advance !!!
50
votes
18
answers
93k
views
Magento 2: Safe and easiest way to disable Compare products & Wishlist Module
I am building Magento 2.0 only to sell 2 of my products online. The compare products and wishlist module is irrelevant for me.
How I safely and easily remove those modules? I dont want to hack the ...
2
votes
1
answer
151
views
Magento 2.3 - Set max compare products to 2
I want to set the limit for the products to compare max 2 product. I tried to create this module: https://magento.stackexchange.com/a/159543/16894
But it seems that this does not work with Magento 2.3....
5
votes
3
answers
2k
views
How to remove products from compare collection in Magento2?
Looking for a better way to add and remove the product on click of same icon.
If a product is already added to the compare collection then on next click of that icon, It should remove the product ...
0
votes
1
answer
54
views
Magento 2.3.6 and removing the compare product capability
I'm trying to remove the compare products from appearing on the product page. We're a small publisher, and I'm not sure what compare would look like between two books in our catalog.
I'm currently ...
0
votes
1
answer
1k
views
How can I remove wishlist and compare block pieces form the 404 not found page?
I need to remove wishlist and compare from the not found page. I use CMS to make the not found page. This is what I tried as a Design XML Update, and it didn't work:
<referenceContainer name="...
0
votes
1
answer
259
views
Show compare sidebar block only on product en category pages
I'm looking for a way to show the compare feature only on category or product pages but not on other pages like CMS pages.
I found several ways to disable the entire compare feature but can't find out ...
1
vote
0
answers
47
views
Magento 2.4.2 :- In list page compare link make as a checkbox
In List page compare link make as a checkbox.To start the checkbox empty, and only fill it in when selected in List page compare link
2
votes
3
answers
1k
views
Magento2 - Compare products shows lots of attributes with “N/A”
When I compare products on my store, there are a lot of I filled attributes and despite there being no value for each product I’m comparing, it still shows the attribute and a line of “N/A” values.
...
1
vote
1
answer
355
views
How to change position of attributes in compare products
Magento 2.1 in the "More Information" of products page position. It's okay but when I compare position it incorrect
such as the product page attribute positions 1 2 3 4 but in compare 2 3 4 1.
1 is ...
0
votes
2
answers
204
views
Magento2 display header compare link after custom block in header
Magento2 move header compare link after custom block in the header
I have added custom block in header as follows
<referenceContainer name="header.topcontent">
<block ...
0
votes
0
answers
22
views
Magento2 messages is not getting added & not getting displayed
Magento2 error message is not getting displayed, it gets displayed only after page refresh. I checked in console, the error msg is not getting added in messages:
public function aroundExecute(
\...
0
votes
0
answers
148
views
magento2.4 how to check on listing page if the product is already in compare list or not, or get list of products in compare list?
I need to get the know on list page whether the product is already in compare list or not, else get the list of products already in compare list.
I tried the code in below link but getting blank array
...
2
votes
1
answer
346
views
Magento 2 API for product add to compare and compare list
There is any way to get API for product add to compare and get compare list for customer.
Thanks
1
vote
1
answer
217
views
Magento2 Rest API for add to compare
Magento2 - PWA. I am developing PWA in Magento2. In products I am not able to see Add to compare link.
How can I create add to compare REST API & use it in PWA?
2
votes
1
answer
6k
views
Slick slider is not working properly in Magento2.3
I would like to use slick slider concept for compare products so I have implemented it on my Magento site. But It's not working as expected though the script has been loaded. I'm not sure where am I ...
4
votes
3
answers
4k
views
Disable compare button on product page
I have followed other tags and I have the following code in my default.xml in my child theme. All the other compare functions are disabled with this code except for on the product page. Why won't this ...
0
votes
0
answers
82
views
Magento2 product added to comparison message in Modal popup
Magento2 product added to the comparison message in Modal popup.
I need to display message in modal popup
0
votes
0
answers
45
views
Magento2 fetch value from catalog_compare_item table
Magento2 How can I get the value of following table 'catalog_compare_item' using a model or any other proper way of Magento?
1
vote
3
answers
4k
views
how to get Compared Product collection in magento 2
How can I get the Products that are already added in the compare list Product Collection. For Visitor and as well as Login Customer. Can anyone guide me to solutions.
1
vote
0
answers
172
views
Get compare product collection on CMS, Catalog Pages
I have used the below code but that is not working on catalog, cms & product page for me. but for compare page, cart page, and checkout page it's working.
$objectManager = \Magento\Framework\...
0
votes
1
answer
491
views
Magento 2.3 - Set max compare products to 3
I want to limit the max products to compare to 3.
I tried to create this module: https://magento.stackexchange.com/a/159543/16894
But it seems that this does not work with Magento 2.3, because I do ...
0
votes
1
answer
219
views
Magento 2.3 - Transform add to compare link in list to checkbox
By default the Magneto 2.3x add to compare is a link, but we want to change this into a checkbox, so it become easier to check multiple products on the catalog product overview (list page).
How can ...
0
votes
1
answer
270
views
Magento 2.3.5 - add image to product compare
I want to load a product image in the product compare sidebar.
Therefore I used the following code (https://gist.github.com/rubenRP/002d06c7b8d6c6eb44d43e102f86ec38)
But that does not seem to work on ...
1
vote
1
answer
422
views
Magento 2.3 - Add attribute group name on compare products page
We want to implement the attribute group name on the compare product page and separate all attributes based on the attribute group.
We use the following code to show the attribute group name on the ...
0
votes
1
answer
862
views
Magento2: Why does the Compare Products sidebar on category pages not show up, but return when I delete a certain layout file? See further explanation
The Compare Products sidebar on category pages does not show up, and I was trying to figure out why. So I temporarily deleted files under the app/design/frontend/customer-name/default folder to see if ...
0
votes
1
answer
202
views
Magento 2: Product page compare product add in new tab
I am using magento 2.3.3 in custom theme and I want to compare products add in new tab
how can achieve this?
Thanks in advance
0
votes
1
answer
292
views
How to compare value inside array in magento 2 join query?
$this->getSelect()->join(
["address" => "sales_order_address"],
'main_table.entity_id = address.parent_id AND address.address_type = "shipping"',
array('region')
)->joinLeft(
["so" => "...
2
votes
1
answer
820
views
How to implement ajax based toast notification for add to cart, wishlist and compare?
Is there any way to show toaster notification using jQuery for add to cart and wishlist and compare from product list page and detail page.
Want to show some of the below toast notification after ...
2
votes
0
answers
76
views
Magento2.3: Compare slider is not working
We have customised the compare products as per our requirement. However, Its not working as expected. I'm not sure, whether the data binding is working or not.
For your information, I'm using slick ...
0
votes
1
answer
169
views
add to compare doesn't work
When I want to add a product to compare list I get the error "page not found".
The wishlist works fine, if I access the link from "mydomain/catalog/product_compare/add" it is redirected to "mydomain/...
1
vote
0
answers
177
views
Magneto2.3.1 How to customize checkbox with compare link display on product detail page
I am using Magneto2.3.1 and i need to customize the default magento compare link on detail page. I want to show checkbox with compare label and if i checked than product compare successfully and if ...
0
votes
0
answers
165
views
Compare products id in magento 1.9
Is there any way to select only product Id for compare items in collection Like:
$compare = Mage::helper('catalog/product_compare')->getItemCollection();
$compare_product = array();
$compareList = ...
0
votes
1
answer
33
views
Retrieved compared products list in homepage
I like to retrieve compared product collections in homepage template. Is there any method to retrieve the data?
0
votes
0
answers
73
views
Compare() link to be placed in dropdown menu in magento 2.3
I want to place the Compare link inside the dropdown below Wishlist in header links as shown here
OR https://prnt.sc/os1u0o.
Can any one tell me how to do that ?
0
votes
1
answer
159
views
compare images from catalog_product_entity_media_gallery with actual presence on server
So, In our catalog_product_entity_media_gallery table in the Magento 2.3.1. database are around 25.000 lines. Like:
18963,90,/_/_/__1_3.jpg,image,0
18965,90,/_/_/__1_4.jpg,image,0
10815,90,/_/_/__1....
3
votes
1
answer
579
views
Magento 1 How to Hide Empty or Null Attribute in Compare Page
I've realised there are many answer which actually are technically incorrect because they only are taking into account one product. They remove any attribute that is empty or null even if the second ...
0
votes
2
answers
269
views
Magento 2 - Compare & Wishlist hide when inactive [duplicate]
Is there a way to hide the Compare and Wishlist blocks on the front-end (in the navigation) when they are not in use?
2
votes
0
answers
23
views
Compare Magento repository and production
I have to compare my production vs repository because there are much difference between both, but I do not know how to compare all files.
Please suggest me how to do?
3
votes
2
answers
2k
views
How to add product to compare products using product id programmatically in Magento 2
How to add product to compare products using product id programmatically.
Please give me suggestions.
1
vote
1
answer
1k
views
Magento 2.3.0 How to override wishlist & compare product list page using plugin
I want to override wishlist & compare product grid using plugin. after that i would like to append custom div under class="product-image-container".
I try & search a lot but no luck. is there ...
2
votes
2
answers
4k
views
magento 2 - Set limit to the compared product
I need to set limit to the compared product, for example: max_limit 4, But now it is adding Number of products to compare list.
Kindly suggest.
1
vote
1
answer
86
views
Magento override Catalog Compare controller doesn't work
for some reason the Compare controller override doesn't work for me, I tried about everything I could find, but it just doesn't happen and I am running out of ideas. Do you see anything I am doing ...
0
votes
1
answer
694
views
How to get product's comparable attributes list by product id
I would like to know, the process to get list of comparable attributes of a product with their label/name and their values.
i'm using this, but it's not working.
$attributes = $objectManager->...
3
votes
1
answer
1k
views
Core configuration of Recently Viewed/Compared Products | Synchronize widget products with backend storage | Magento 2
Can someone explain what enabling this option do:
Store -> Settings -> Configuration -> Catalog -> Catalog -> Recently Viewed/Compared Products:
Synchronize widget products with backend storage: ...