Questions tagged [compare]
Questions about the "compare products" feature. Do not use this tag for questions about comparing anything else.
117 questions
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
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 !!!
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....
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
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 ...
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
...
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
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
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
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?
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\...
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
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 ...
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
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
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 ...
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 ...
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 ...
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
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/...
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....
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?
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 ...
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
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 ...
0
votes
1
answer
630
views
Retrieve Compare Items Collection returning zero Items Magento 2
While I am trying to return compare items in custom module phtml file, it is returning zero items but in database table catalog_compare_item showing all the added items to compare.
Class Used : ...
1
vote
1
answer
580
views
Magento 2 : do not add products to compare if attributes set different
Case : Suppose i have products Shirts and Electronics, now if i add Shirt A and Mobile B to compare it allows but i want to restrict compare if same attributes sets .
So i user add Shirt to compare ...
1
vote
1
answer
85
views
Magento2: Object DOMDocument should be created
I have installed the Tigren_Ajaxcompare extension. Got the error message below
Object DOMDocument should be created.
Block
<?php
/**
* @copyright Copyright (c) 2017 www....
0
votes
0
answers
96
views
Magento2: Custom comapre button functionality
How to add custom compare button with check-box. The page should be not refreshing.
Please check below screenshot
My Magento v2.0.17
1
vote
0
answers
455
views
Magento 2 compare only those products which are having same parent category?
anyone having an idea how to compare only that category which is having the same parent.
for example, a customer can compare Samsung washing machine with LG washing machine but if customer wants to ...
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: ...
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.
...
0
votes
2
answers
497
views
How to call Plugin which already using the preference for vendor file in magento 2
How to call Plugin which already using the preference for vendor file in magento 2. I have already has preference which is overridding the some custom Magento controller, Now how can i use plugin to ...
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.
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 ...
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
1
answer
128
views
How to delete compare and shop by function in Magento 2
I'd like to delete all the compare and shop-by functions completely,
how can I do this through the cpanel?
Thank you.
2
votes
0
answers
2k
views
Check if there are any products in the compare list in Magento 2
I'm using Magento v 2.2 and I'm trying to check if the customer/visitor (doesn't matter if logged in or not) has any products in their compare list and I'm trying to do this in
{theme_dir}/...