Post by J_Thomas » Sat Oct 31, 2020 2:26 am

I am trying to modify the list view in the category section. I want to remove the image and the description from this view ONLY. I would also like to add the item number and attributes to this section too, if possible. If someone can just point me in the right direction, I appreciate it. Almost every time I try anything when I change the .php code, I get a 500 script error.

Thanks,

Scott
Ps. Please do not reply "did you search google" or "Have you thought of paying someone to do this for you?" Why? That's what a forum is for... Let's keep open source OPEN.

Newbie

Posts

Joined
Fri Aug 21, 2020 11:08 pm

Post by sw!tch » Sat Oct 31, 2020 2:35 am

You can see here - https://github.com/opencart/opencart/bl ... s#L84-L120

The List Grid is handled via javascript with basic JS skills (show/hide) and google you can achieve what you need.

or you can use css selectors

ex:

Code: Select all

.product-list .product-thumb .image { display: none; }

.product-list .product-thumb .caption { margin-left: 0; }
...etc.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by paulfeakins » Mon Nov 02, 2020 7:06 pm

partsace wrote:
Sat Oct 31, 2020 2:26 am
Ps. Please do not reply "did you search google"
But often this is exactly the right advice.
partsace wrote:
Sat Oct 31, 2020 2:26 am
or "Have you thought of paying someone to do this for you?" Why? That's what a forum is for... Let's keep open source OPEN.

Open source doesn't mean you put little projects on the forum and people code them for you for free, although sometimes if you're very lucky that will happen.

partsace wrote:
Sat Oct 31, 2020 2:26 am

If someone can just point me in the right direction, I appreciate it. Almost every time I try anything when I change the .php code, I get a 500 script error.

If every time you make any sort of change you get a 500 error you're going to need more than pointing in the right direction aren't you?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by J_Thomas » Tue Nov 03, 2020 2:21 am

paulfeakins wrote:
Mon Nov 02, 2020 7:06 pm
partsace wrote:
Sat Oct 31, 2020 2:26 am
Ps. Please do not reply "did you search google"
But often this is exactly the right advice.
partsace wrote:
Sat Oct 31, 2020 2:26 am
or "Have you thought of paying someone to do this for you?" Why? That's what a forum is for... Let's keep open source OPEN.

Open source doesn't mean you put little projects on the forum and people code them for you for free, although sometimes if you're very lucky that will happen.

partsace wrote:
Sat Oct 31, 2020 2:26 am

If someone can just point me in the right direction, I appreciate it. Almost every time I try anything when I change the .php code, I get a 500 script error.

If every time you make any sort of change you get a 500 error you're going to need more than pointing in the right direction aren't you?


Thanks for not helping...

Newbie

Posts

Joined
Fri Aug 21, 2020 11:08 pm

Post by J_Thomas » Tue Nov 03, 2020 2:25 am

sw!tch wrote:
Sat Oct 31, 2020 2:35 am
You can see here - https://github.com/opencart/opencart/bl ... s#L84-L120

The List Grid is handled via javascript with basic JS skills (show/hide) and google you can achieve what you need.

or you can use css selectors

ex:

Code: Select all

.product-list .product-thumb .image { display: none; }

.product-list .product-thumb .caption { margin-left: 0; }
...etc.
Where am I going to find the javascript files that handle the lines view? I did a grep for product-thumb and product-desc and I come up with /public_html/catalog/view/theme/so-emarket/template/soconfig/listing.twig. I changed those files and don't get any results. Can you let me know where the JS files might be?

Thanks,

Scott

Newbie

Posts

Joined
Fri Aug 21, 2020 11:08 pm

Post by sw!tch » Tue Nov 03, 2020 2:43 am

You find it in the default theme, however appears you are running an aftermarket theme.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by J_Thomas » Tue Nov 03, 2020 2:47 am

In the default theme, where would I find it?

Scott

Newbie

Posts

Joined
Fri Aug 21, 2020 11:08 pm

Post by sw!tch » Tue Nov 03, 2020 3:25 am

If you are not using the default theme then chances are the above won't work.. To do this with CSS the code would go in your stylesheet.css or custom.css if you have one.

Above was just an example - if you don't understand work with a professional.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by J_Thomas » Tue Nov 03, 2020 5:29 am

A simple answer to what should be a simple question...

Does anyone know where the code is to modify the list (or grid) view in the default catalog when you’re in the category section? All I want to do is remove the image and description.

Scott

Newbie

Posts

Joined
Fri Aug 21, 2020 11:08 pm
Who is online

Users browsing this forum: No registered users and 414 guests