Post by eryk2kartman » Tue Mar 06, 2018 11:31 pm

Hi Guys,

By default when i go to category i can see products and first line is product name after that there is a bit pulled from decryption.
I would like to delete that part from description,
Also is there any way all products will have same size boxes?
Iv attached screenshot just to make sure you know what im talking about.
Im using OC 3.0.2.0

I would appreciate if someone can point me into right direction.
Image

New member

Posts

Joined
Mon Oct 27, 2014 4:46 pm

Post by IP_CAM » Wed Mar 07, 2018 2:00 am

Well, the vertical size of a box depends on the amount of characters
in the Title and Description Section, and also, if special Prices exist.
You could a add/enlarge the minimum height, i.E.; (min-height:300px;) Value,
to be placed in the corresponding Stylesheet Section.

Code: Select all

.product-thumb .caption {
	padding: 0 20px;
	min-height: 180px;

Code: Select all

.product-grid .product-thumb .caption {
	min-height: 210px;
	padding: 0 10px;

Code: Select all

.product-grid .product-thumb .caption {
	min-height: 0;
---
But you could also try, what Viethemes did with his solution, by adding this Javascript
into the theme/template/common/header.twig file, between the </head> and <body>,
like:
</head> Line 39 default Theme

Code: Select all

<script>
        $(document).ready(function () {
           var maxHeight = 0;

           $('.product-thumb .caption').each(function () {
              if ($(this).height() > maxHeight) {
                 maxHeight = $(this).height();
              }
           });

           $('.product-thumb .caption').height(maxHeight + 15);
        });
        </script>
<body> Line 40 default Theme
to find out, if it's working in your Version too:
---
Product Layout Fix by viethemes
https://www.opencart.com/index.php?rout ... n_id=23735
---
Untested, I don't use this Version...
Good Luck! ;)
Ernie

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 wid » Wed Mar 07, 2018 2:18 am

so as to remove description you can do it with many ways
one of them is to go to catalog/controler/product/category.php
and add to line 362 before : $this->response->setOutput($this->load->view('product/category', $data));

Code: Select all

$data['description'] = null ;
if (isset($data['products'])) {
	foreach ($data['products'] as $key => $product) {
		$data['products'][$key]['description'] = null;
	}
}
go to file catalog/view/theme/*/template/product/category.twig
and replace <p>{{ product.description }}</p>
with
{% if product.description %} <p>{{ product.description }}</p>{% endif %}

or simple you can only delete this line
" <p>{{ product.description }}</p>
from file catalog/view/theme/*/template/product/category.twig

ofcource all this has to be done or with an event (first solution)
or with ocmod (second solution)
its very bad practice to change core files of oc

take a visit to My Modules !


wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by eryk2kartman » Wed Mar 07, 2018 5:51 pm

Thanks guys,

This is more than i expected, will give it a go later on today and report back.
Cheers

New member

Posts

Joined
Mon Oct 27, 2014 4:46 pm

Post by eryk2kartman » Mon Mar 12, 2018 5:30 am

Hi Lads,

So i manged to remove the description from category and all is nice, it even sort out the box size now too:)
Thank you for that>
However if i go to product itself at the bottom i have Related Products section and unfortunately the description is still there:( I guess its the same scenario as before but just different file to edit, but i haven't found the file:( any idea which one is it?
Thanks in advance

New member

Posts

Joined
Mon Oct 27, 2014 4:46 pm

Post by wid » Mon Mar 12, 2018 5:03 pm

from file catalog/view/theme/*/template/product/product.twig
line:315
"<p>{{ product.description }}</p>"
put it on comments
<!-- <p>{{ product.description }}</p> -->

but as i mentioned before you have to do all this changes with ocmod througth modification system
read here: ocmod

take a visit to My Modules !


wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by eryk2kartman » Mon Mar 12, 2018 6:31 pm

Thank you,

Im not deleting anything i only greyed out some lines thats all.
Maybe a bit more complicated changes i will do through ocmode

New member

Posts

Joined
Mon Oct 27, 2014 4:46 pm

Post by wid » Mon Mar 12, 2018 6:45 pm

you have to make all changes with ocmod so as you can update your oc to a new version, when you have to with no problem.

take a visit to My Modules !


wid
New member

Posts

Joined
Fri Feb 02, 2018 9:19 pm
Location - Athens/Greece

Post by IP_CAM » Wed Mar 14, 2018 2:28 am

as you can update your oc to a new version
Well, this may work on certain software, but sure not on Opencart,
since Opencart NEVER releases Upgrade-Packages, but only full Version
Software, containing everything, down to the last piece of code.
But obviously, many ever-upgraders never realized this fact, that, why
so many a screwing up, again and again... :joker:
Ernie

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
Who is online

Users browsing this forum: No registered users and 6 guests