Post by s.freimanis » Mon Feb 23, 2015 11:50 pm

Hi All

I have found several topics about how to remove "compare products" link, however
I would like to add it somewhere at the top, lets say between "my account" and "Shopping cart"
so customer has an easy access to comparison list.

I have seen a topic for Open Cart 1.5.x. Unfortunately it does not work for OC 2.0

Forgot to mention, that I use default OpenCart 2.0.1.1 theme

Any advices please?

New member

Posts

Joined
Sun May 12, 2013 10:02 pm

Post by viethemes » Wed Feb 25, 2015 12:22 am

You can edit the file catalog\view\theme\default\template\common\header.tpl, find

Code: Select all

<li><a href="<?php echo $wishlist; ?>" id="wishlist-total" title="<?php echo $text_wishlist; ?>"><i class="fa fa-heart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_wishlist; ?></span></a></li>
and add below code after that line

Code: Select all

<li><a href="<?php global $url; echo $url->link('product/compare'); ?>" title="Compare Product"><i class="fa fa-exchange"></i> <span class="hidden-xs hidden-sm hidden-md">Compare Product</span></a></li>

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by s.freimanis » Wed Feb 25, 2015 5:12 pm

Thanks for advice, working now :)

However it appears in English only, so it is not translated
in other languages.

Any ideas?

New member

Posts

Joined
Sun May 12, 2013 10:02 pm

Post by viethemes » Thu Feb 26, 2015 11:48 pm

s.freimanis wrote:Thanks for advice, working now :)

However it appears in English only, so it is not translated
in other languages.

Any ideas?
Hi,
Is your store multilingual or just one language?

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by s.freimanis » Fri Feb 27, 2015 1:09 am

viethemes wrote:
s.freimanis wrote:Thanks for advice, working now :)

However it appears in English only, so it is not translated
in other languages.

Any ideas?
Hi,
Is your store multilingual or just one language?

It is multilingual site. Sorry, I did not mention it before.
It contains three languages.

New member

Posts

Joined
Sun May 12, 2013 10:02 pm

Post by viethemes » Fri Feb 27, 2015 10:43 pm

You can try to replace with code below

Code: Select all

<li><a href="<?php global $url; echo $url->link('product/compare'); ?>" title="<?php global $language; echo $language->get('text_product_compare'); ?>"><i class="fa fa-exchange"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $language->get('text_product_compare'); ?></span></a></li>
and go to each language file, for example catalog\language\english\default.php, add code below at the end of file

Code: Select all

$_['text_product_compare'] = 'Compare Products';
Note that translate the ablove text in each language.

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by s.freimanis » Tue Mar 03, 2015 2:51 am

Working now!!! Thanks a lot!

In my case the main problem was, that after placing code, you need to go in admin panel of OpenCart -> Modifications and press on "Refresh"

Also the code provided <<< $_['text_product_compare'] = 'Compare Products'; >>> must be inserted at the end without
spaces before.


..................
$_['error_upload_7'] = 'Warning: Failed to write file to disk!';
$_['error_upload_8'] = 'Warning: File upload stopped by extension!';
$_['error_upload_999'] = 'Warning: No error code available!';

$_['text_product_compare'] = 'Compare Products';

New member

Posts

Joined
Sun May 12, 2013 10:02 pm

Post by hassni » Sat Jun 15, 2019 7:05 pm

Please guide , i want to make different comparison banner on product page related to that product. i want comparison url of between products. when i add it products for compare, the seo url generates store.com/product_compare. I want the complete url of between products. Hope you will understand my query .

New member

Posts

Joined
Tue Oct 13, 2015 3:01 am
Who is online

Users browsing this forum: No registered users and 99 guests