0

I'm an IT student and new in magento.

I was wondering, how can I create compare button as on that link http://ultimo.infortis-themes.com/demo/

I found sidebar.phtml file under vendor/magento/module-catalog/..../compare/ but I cannot find any code which would be responsible for creating that button with whole functionality.

Please help. I was looking for any answer in google but mostly there are topic about 'how to disable compare button/features etc' and nobody is asking how to add it.

I would appreciate for any help, advices.

0

If you are looking for 'Compare' button then the details are as under:

First go to page.xml and insert

<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>

in header block.

Now call getChildHtml('catalog.compare.sidebar'); ?> in header.phtml

Change the layout html in file sidebar.phtml path (\app\design\frontend\rwd\default\template\catalog\product\compare\sidebar.phtml)

Clear admin cache if it is enabled & refresh the page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.