Post by pwood » Sat Jun 15, 2013 10:50 am

Hi guys, I want to know how to move the category title to center instead on the left?\

Thanks in advance! :)

Image

Active Member

Posts

Joined
Tue May 07, 2013 7:58 pm

Post by Xyph3r » Sat Jun 15, 2013 5:51 pm

only the category title or every title?

for every title
catalog/view/theme/*yourtheme*/stylesheet/stylesheet.css
find

Code: Select all

h1, .welcome {
and add

Code: Select all

text-align: center;
after

for category title Only
open catalog/view/theme/*yourtheme*/template/product/category.tpl

and replace

Code: Select all

 <h1><?php echo $heading_title; ?></h1>
with

Code: Select all

  <h1 class="categorytitle"><?php echo $heading_title; ?></h1>
then in catalog/view/theme/*yourtheme*/stylesheet/stylesheet.css add this at the bottom...or whatever..

Code: Select all

.categorytitle { text-align: center; }

ImageImageImage
Opencart Templates, Modules, Themes & Custom Development | ShopThemer


User avatar
Active Member

Posts

Joined
Sun Feb 10, 2013 1:08 am


Post by pwood » Sat Jun 15, 2013 5:55 pm

Xyph3r wrote:only the category title or every title?

for every title
catalog/view/theme/*yourtheme*/stylesheet/stylesheet.css
find

Code: Select all

h1, .welcome {
and add

Code: Select all

text-align: center;
after

for category title Only
open catalog/view/theme/*yourtheme*/template/product/category.tpl

and replace

Code: Select all

 <h1><?php echo $heading_title; ?></h1>
with

Code: Select all

  <h1 class="categorytitle"><?php echo $heading_title; ?></h1>
then in catalog/view/theme/*yourtheme*/stylesheet/stylesheet.css add this at the bottom...or whatever..

Code: Select all

.categorytitle { text-align: center; }
Wow thanks! That totally worked!

I forgot there's a text-align property.. my bad ;D

By the way, Can I add some short description below the Title?

Active Member

Posts

Joined
Tue May 07, 2013 7:58 pm

Post by Xyph3r » Sun Jun 16, 2013 12:12 am

how? some short description from the existing one(let's say first 50 characters)..or you want to add a custom field in admin for each product(more difficult)?

ImageImageImage
Opencart Templates, Modules, Themes & Custom Development | ShopThemer


User avatar
Active Member

Posts

Joined
Sun Feb 10, 2013 1:08 am


Post by pwood » Sun Jun 16, 2013 2:53 am

Xyph3r wrote:how? some short description from the existing one(let's say first 50 characters)..or you want to add a custom field in admin for each product(more difficult)?
Hmm the one I want is short description exactly below the h1 title (which mean Category and Sub-Category Title), and I want each category / sub to have a different description.

Is that possible?

Thank You!

Active Member

Posts

Joined
Tue May 07, 2013 7:58 pm

Post by Xyph3r » Sun Jun 16, 2013 6:19 am

You move the category description unde the h1...

ImageImageImage
Opencart Templates, Modules, Themes & Custom Development | ShopThemer


User avatar
Active Member

Posts

Joined
Sun Feb 10, 2013 1:08 am


Post by pwood » Sun Jun 16, 2013 12:36 pm

Xyph3r wrote:You move the category description unde the h1...
Jeez... Totally my fault for not aware about that....
Thanks for clearing that up, Xyph3r!

Active Member

Posts

Joined
Tue May 07, 2013 7:58 pm

Post by swiftws » Sun Sep 16, 2018 9:41 pm

How to move product title in middle above image in opencart 3.0?

Newbie

Posts

Joined
Mon Dec 23, 2013 11:00 pm

Post by IP_CAM » Tue Sep 18, 2018 7:38 am

A strictly theoretical Solution for centered Category and Product Page Titles in OC v.3.0.2 Versions:
in:
OC v.3.0.2.0 theme/default/template/product/category.twig LINE Number ~17
change:

Code: Select all

<h2>{{ heading_title }}</h2>
to:

Code: Select all

<h2 class="categorytitle">{{ heading_title }}</h2>
then, add:

Code: Select all

.categorytitle {text-align: center;}
above the content below: (OC 3 default Theme stylesheet view)

Code: Select all

h1, h2, h3, h4, h5, h6 {
	color: #444;
}
to make it look like:

Code: Select all

.categorytitle {text-align: center;}
h1, h2, h3, h4, h5, h6 {
	color: #444;
}
into your...theme/default/stylesheet/stylesheet.css file.
---
and this one should match a default Product Page Code in OC v.3.0.2 Versions:
in:
OC v.3.0.2.0 theme/default/template/product/product.twig LINE Number ~123
change:

Code: Select all

<h1>{{ heading_title }}</h1>
to:

Code: Select all

<h1 class="categorytitle">{{ heading_title }}</h1>
in addition to adding the:

Code: Select all

.categorytitle {text-align: center;}
to the stylesheet.css File as mentioned above. Only use one single
.categorytitle {text-align: center;} Line Entry in the stylesheet.css file,
if you use this 'Center Title' Function in both Category and Product Pages.
---
Untested, good Luck!
And don't forget, to clear out all of your CACHE Systems in OC-3, after you made the changes,
and clear out Browser Cache too, or better don't expect it to show up anywhere, as it should... :laugh:
Ernie
---
Imagelink: (OC v.1.5.6.5_rc/OC v.2.0.3.1 Theme)
download/file.php?mode=view&id=35600

Attachments

center_category_and_product_title_oc_3.jpg

center_category_and_product_title_oc_3.jpg (136.39 KiB) Viewed 14 times


For Sale: Top URL's, including OpenCart V-Pro installed, like seen here:
http://www.bigmax.ch - http://www.ipcam.li - http://www.opencart.li
For Information + URL's offered, please contact me at: jti@jacob.ch
I am NOT available for Custom Support in existing OC Installations!
My Github Repositories: https://github.com/IP-CAM
Image


User avatar
Guru Member

Posts

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

Users browsing this forum: Bing [Bot] and 36 guests