- Chris
My Extensions
OpenCart Developer (OCD) Tools
Donate - If I ever helped you.
Try the catalog/view/theme/default/template/module and open the featured.tpl file. Another place it can be is in the controller file, but the featured.tpl is where the featured module gets its front end display view from. Remember to find the string of code where its pulling both the image and product name text. It will look something like <php echo$ blah blah blah>
Good luck,
Christian
My Extensions
OpenCart Developer (OCD) Tools
Donate - If I ever helped you.
In your stylesheet, look for the division for box products and add text-align: center;kartuser wrote:Didn't work for me. Tried <center> in different combinations.
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
changed stylesheet.css by adding text-align: center;
default line 734
Code: Select all
.box-product .image {
display: block;
margin-bottom: 0px;
text-align: center;
}
under .box in your Stylesheet (line 680 ish) add:
width:100%;
text-align:center;
This will center featured products but it will also center the text in your account list on account pages/login page etc as well as the headings in these boxes.
So to keep them left aligned but to center the featured products go into your featured.tpl file and add align="center" to the box product div (line 4) as below:
Code: Select all
<div class="box-product" align="center">
Affiliate Homepage Link and Promote All Products
Hide Empty Shopping Cart
Remove Shipping and Handling from Affiliate Commission
Move Affiliate Info to Top of Orders Page
I want these products to center under the yellow featured bar.
I tried to resize the size of the featured products icons but then they run in on each other.

Affiliate Homepage Link and Promote All Products
Hide Empty Shopping Cart
Remove Shipping and Handling from Affiliate Commission
Move Affiliate Info to Top of Orders Page
As I said above, add it to your box product division itself:labeshops wrote:In your stylesheet, look for the division for box products and add text-align: center;kartuser wrote:Didn't work for me. Tried <center> in different combinations.
Code: Select all
.box-product {
width: 100%;
overflow: auto;
text-align: center;
}
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
@labeshops, by your method all the text is also center aligned,labeshops wrote: As I said above, add it to your box product division itself:
Code: Select all
.box-product { width: 100%; overflow: auto; text-align: center; }
In place of "text-align" I have used the padding function
Code: Select all
.box-product {
width: 100%;
overflow: auto;
padding-left: 30px;
}
Regards,
Sun Systems
Industrial Electronics and Instrumentation
Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.
@ labeshop, You are right on both counts, thank you for your reply.labeshops wrote:In my case, I wanted my text aligned center as well, but yeah, padding would also work. Though if you change the size of the image, remember to change the amount of padding.
Regards,
Sun Systems
Industrial Electronics and Instrumentation
Users browsing this forum: No registered users and 5 guests