Questions tagged [compare]

Questions about the "compare products" feature. Do not use this tag for questions about comparing anything else.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

iusse in reloading the compare product section

I just want to reload compare product section in product detail phtml page. Product adding to compare item successfully but compare product link in header doesn't update so, I reload compare product ...
user avatar
1 vote
0 answers
31 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
user avatar
  • 11
0 votes
1 answer
30 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 ...
user avatar
  • 1
0 votes
0 answers
17 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( \...
user avatar
  • 3,446
0 votes
0 answers
53 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 ...
user avatar
  • 3,446
0 votes
2 answers
48 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 ...
user avatar
  • 3,446
0 votes
1 answer
47 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 ...
user avatar
0 votes
0 answers
28 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
user avatar
  • 3,446
0 votes
0 answers
24 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?
user avatar
  • 3,446
1 vote
1 answer
166 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?
user avatar
  • 3,446
1 vote
0 answers
86 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\...
user avatar
2 votes
1 answer
189 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
user avatar
0 votes
1 answer
245 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 ...
user avatar
  • 1,498
0 votes
1 answer
146 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 ...
user avatar
  • 1,498
0 votes
1 answer
172 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 ...
user avatar
  • 1,498
1 vote
1 answer
276 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 ...
user avatar
  • 1,498
1 vote
2 answers
803 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 ...
user avatar
0 votes
1 answer
113 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
user avatar
0 votes
1 answer
148 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" => "...
user avatar
  • 309
2 votes
0 answers
62 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 ...
user avatar
  • 480
2 votes
1 answer
4k 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 ...
user avatar
0 votes
1 answer
823 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 ...
user avatar
  • 1,597
1 vote
0 answers
139 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 ...
user avatar
  • 1,597
0 votes
0 answers
132 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 = ...
user avatar
  • 749
0 votes
1 answer
25 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?
user avatar
0 votes
0 answers
64 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 ?
user avatar
  • 700
0 votes
1 answer
68 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/...
user avatar
  • 455
0 votes
1 answer
112 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....
user avatar
  • 101
0 votes
2 answers
202 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?
user avatar
1 vote
1 answer
58 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 ...
user avatar
  • 113
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 ...
user avatar
  • 5,876
2 votes
1 answer
521 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 ...
user avatar
  • 1,785
0 votes
1 answer
523 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 : ...
user avatar
1 vote
1 answer
443 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 ...
user avatar
1 vote
1 answer
48 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....
user avatar
  • 1,127
0 votes
0 answers
40 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
user avatar
  • 1,127
1 vote
0 answers
307 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 ...
user avatar
  • 3,582
0 votes
1 answer
571 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->...
user avatar
  • 618
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: ...
user avatar
  • 2,749
2 votes
3 answers
938 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. ...
user avatar
  • 21
0 votes
2 answers
306 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 ...
user avatar
1 vote
3 answers
3k 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.
user avatar
4 votes
3 answers
3k 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 ...
user avatar
1 vote
1 answer
228 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 ...
user avatar
0 votes
1 answer
92 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.
user avatar
  • 133
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}/...
user avatar
  • 2,737
2 votes
1 answer
561 views

Hide add to Compare in category page beside add to cart [duplicate]

I have been able to remove every link to add to compare but I cant get the one away that is placed beside the add to cart button on the category page.
user avatar
  • 327
4 votes
2 answers
1k views

Remove Compare from Product List in Magento 2.1.6 [duplicate]

I need to delete the compare button from product list but I don't know how to to do it in Magento 2.1.6. Under [vendor]/[theme]/Magento_Catalog/templates/product/ I deleted the following in list....
user avatar
  • 125
0 votes
1 answer
177 views

Add to Compare: is there known exploitation?

Last week, one of my site received a bruteforce attack. When I check log/reports, I see this in my report: a:5:{i:0;s:313:"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or ...
user avatar
1 vote
1 answer
744 views

Magento 2 Add 'My Cart','Compare Products','Newsletter' Sidebars in right column

I have a CMS Page with '2 Column Right' layout. I want to add 'My Cart','Compare Products','Newsletter' Sidebars in right column. http://i.prntscr.com/eb303e17180d467dbc80b942cd3076ee.png How is ...
user avatar