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.
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.
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.
---
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
<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
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>
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
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
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));
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
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;
}
}
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 !
Thanks guys,
This is more than i expected, will give it a go later on today and report back.
Cheers
This is more than i expected, will give it a go later on today and report back.
Cheers
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
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
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
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 !
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
Im not deleting anything i only greyed out some lines thats all.
Maybe a bit more complicated changes i will do through ocmode
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 !
Well, this may work on certain software, but sure not on Opencart,as you can update your oc to a new version
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...
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: daniil_oc, drag84, WaxedPerfection and 471 guests