Post by OldBrewer17 » Wed Jul 11, 2018 11:43 pm

Hello All,
I well know that this one is nor the first nor the last request of help on this matter, but I'm almost desperate.

Before posting I tried to follow every kind of process found here or in other forums but without any result.

First of all I am a Beginner then, please, be patient.
I Need to remove from the header line (the one with language module on the) the text "Shopping Cart" and leave only the icons of a Bag (Code Fontsawesome: /f290) and remove the text "Checkout" and leave only the icons of a credit card (Code Fontsawesome: /f09d)

I have tried:
1) To change the code in the files fonts-awesome.css, all of them.
2) To change all codes: fa fa-shopping-cart with fas fa-shopping-bag.
3) I have also tried son tricks found in Forum but again, no result.

Please can you help me with a step by step guide line?
I've installed Opencart 2.2.0.0

Thank you
Bye
Steve

Newbie

Posts

Joined
Wed Jul 11, 2018 9:44 pm

Post by IP_CAM » Thu Jul 12, 2018 3:25 am

Well, to make it short and easy, FIND the Checkout word in the corresponding
Language File, and replace it by nothing., like shown here:
$_['text_checkout'] = '';
But if you play around in your Software, without knowing BASICS, you won't
succeed. Therfore, better check on the http://isenselabs.com free eBooks,
to at least get some basic information on how this thing works.
Good Luck !
Ernie
---
Image

Attachments

checkout_word.jpg

checkout_word.jpg (44.37 KiB) Viewed 416 times


For Sale: Top URL's, including an OpenCart V-Pro Shop!
A wide range of matching Designs can be seen here: http://www.opencart.li
For Information on URL's offered, please contact me at: jti@jacob.ch
Hundreds of Mods in 380+ Repositories for OC v.1.5.x - v.2.3.x
to be found on my Github Site: https://github.com/IP-CAM
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by OldBrewer17 » Thu Jul 12, 2018 2:39 pm

Thanks a lot for answer.
One thing is done, thanks to you I was able to remove the text.
Now the icons are missing.

More or less I know how it works (even if in a basic way), I know that css is just a matter of link and reports from other files, in fact I was able to modify all of rest as I wanted.
Except for these 2 icons, "fa fa-shopping-cart" and "fa fa-share", these are the reasons why I asked for your help.
Sure I will take in examine the link you gave me, and thanks a lot for it, by the way, some advice on how to change those "terrible" icons? :D

Thanks again.
Enjoy your day!
Ste

Newbie

Posts

Joined
Wed Jul 11, 2018 9:44 pm

Post by OSWorX » Thu Jul 12, 2018 2:42 pm

Just to add one more notice rearding this line you have changed:
fa fa-shopping-cart with fas fa-shopping-bag
Why?
fa fa-shopping-cart is BS3
while
fas fa-shopping-bag is BS4

OpenCart 2 is using BS3, OpenCart 3.1.x will be using BS4, therefore changing icons only makes absolutely no sense and will not work.
And one last: do not use OpenCart 2.2.x if you can avoid, better 2.3.0.2

Forum Rules: viewtopic.php?f=176&t=200480
Commercial Request: viewforum.php?f=88

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by OldBrewer17 » Thu Jul 12, 2018 2:49 pm

Thank you too for answer,
than as I understand it is not possible to change such icons?
I followed that line because I have found a tutorial that showed it, but, as you can imagine, no results came.

Is there another way to reach the same goal? Even change manually the icons is good for me.

Thank you.
Ste

Newbie

Posts

Joined
Wed Jul 11, 2018 9:44 pm

Post by OSWorX » Thu Jul 12, 2018 3:16 pm

Well, in your first post you wrote that you want to remove the text and leave the icons.
Are you using the standard or a custom template?

And, if you really want to use FA 5 ( = Fontawesome) icons (prefix fab- / fas-), you have to add the library also.
https://fontawesome.com/icons/shopping-bag?style=solid

But I guess that will lead to other problems when using 2 libraries of the same kind.

Displaying only icons, should be possible also if you are removing the text.
Original line:

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_shopping_cart; ?></span></a></li>
Changed line (without text):

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i></a></li>
Now only the icon is displayed.
Last edited by OSWorX on Thu Jul 12, 2018 4:16 pm, edited 2 times in total.

Forum Rules: viewtopic.php?f=176&t=200480
Commercial Request: viewforum.php?f=88

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by kestas » Thu Jul 12, 2018 3:24 pm

For example in default theme to remove words Shopping Cart try this:
find in catalog/view/theme/default/template/common/header.tpl line

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_shopping_cart; ?></span></a></li>
and replace with:

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-lg hidden-md"><?php echo $text_shopping_cart; ?></span></a></li>
I have added class statement
hidden-lg
which will hide text on large screen. You can try add this where you want.

Cheers

Custom OpenCart modules and solutions. Just PM me... Extensions you can find here and here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by OldBrewer17 » Thu Jul 12, 2018 3:32 pm

I'm using the default template, I've tried to insert both the code with fas and fa (just removing the final s by the code).
I have and see the standard icons and I want to change a couple of them (cart [with a bag] and share [with a credit card])
Maybe it is better if I don't try to pass to BS4 (I don't want to put myself in more crysis :D ), but can I change the icons if I don't use BS4?

About the text the problem is solved, I have changed in a "empty space" the words "shopping cart" and "Checkout" in en-gb/common/header.php, as IP_CAM illustrated me in the very beginning.
Now the problem is How to change the icons.
By the way, thanks a lot for answer.

Thank you again
Ste

Newbie

Posts

Joined
Wed Jul 11, 2018 9:44 pm

Post by OSWorX » Thu Jul 12, 2018 4:08 pm

OldBrewer17 wrote:
Thu Jul 12, 2018 3:32 pm
I'm using the default template, I've tried to insert both the code with fas and fa (just removing the final s by the code).
I have and see the standard icons and I want to change a couple of them (cart [with a bag] and share [with a credit card])
Maybe it is better if I don't try to pass to BS4 (I don't want to put myself in more crysis :D ), but can I change the icons if I don't use BS4?
You can change the icons in whatever you like.
But (!!), you can use only those icons which are included in that version you are using (or the shop).
And OC 2.2.x is using Fontawesome 4.4 - sorry, my fault previous, icons are not Bootstrap, they are Fontawesome

Means: NO icons added in later versions, and your desired fa-shopping-bag is for 4.5
https://fontawesome.com/v4.7.0/icon/shopping-bag

That will never work, except you change the underlying Framework Fontawesome to a higher version.
That is all.
And has nothing to do with Bootstrap.
OldBrewer17 wrote:
Thu Jul 12, 2018 3:32 pm
About the text the problem is solved, I have changed in a "empty space" the words "shopping cart" and "Checkout" in en-gb/common/header.php, as IP_CAM illustrated me in the very beginning.
Now the problem is How to change the icons.
See my solution above directly inside the template - is language independend (if you are using several languages).
While I prefer for such changes to do it with a simple OCMod instead editing core files.

Forum Rules: viewtopic.php?f=176&t=200480
Commercial Request: viewforum.php?f=88

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by OldBrewer17 » Thu Jul 12, 2018 4:26 pm

OK Thank You,
in order to don't alterate to much the code I have tried to follow this line, tell me what do you think about:

Change the code:

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md"><?php echo $text_shopping_cart; ?></span></a></li>
With:

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><img src="../httpdocs/image/Bag.png" title="Shopping Bag" alt="" width="16" height="16" border="0"></a><span class="hidden-xs hidden-sm hidden-md"></span></li>]
Sadly no Image come out, is it a wrong way?
Thank You!
Ste

Newbie

Posts

Joined
Wed Jul 11, 2018 9:44 pm

Post by OSWorX » Thu Jul 12, 2018 7:29 pm

Yes, wrong.
How many title do you want to have - one is enough?

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><img src="../httpdocs/image/Bag.png" title="Shopping Bag" alt="" width="16" height="16" border="0"></a><span class="hidden-xs hidden-sm hidden-md"></span></li>
And why absolute path:

Code: Select all

../httpdocs/image/Bag.png
Are you sure the path is correct?
I already have given you the correct code, so why your playing now around?

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><i class="fa fa-shopping-cart"></i></a></li>
And if you really want to use another icon/image, use the correct path, like:

Code: Select all

<li><a href="<?php echo $shopping_cart; ?>" title="<?php echo $text_shopping_cart; ?>"><img src="image/PATH/MY_IMAGE.png" alt="" height="16" width="16" /></a></li>
If that does not work, or you cannot do it, hire someone who can.

Forum Rules: viewtopic.php?f=176&t=200480
Commercial Request: viewforum.php?f=88

Image


User avatar
Expert Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: No registered users and 5 guests