Post by Xellz » Tue Jun 17, 2014 11:39 pm

I want to use List view as default, but currently it looks rather bad. All formatting is dropped and becomes wall of text. Is there any way to keep formating same as in product page?

Can check how it currently looks, any category will do http://zenhodo.com/tea

Or any other recommendations how to make List view look decent?

Japanese green tea


New member

Posts

Joined
Fri Feb 11, 2011 8:55 pm

Post by IP_CAM » Wed Jun 18, 2014 2:25 am

It's probably within the:

Code: Select all

<div class="product-list">
this:

Code: Select all

<div class="description">
Your Stylesheet is here:

Code: Select all

catalog/view/theme/hakoniwado/stylesheet/stylesheet.css
REPLACE:

Code: Select all

.product-list .description {
	line-height: 15px;
	margin-bottom: 15px;
	color: #4D4D4D;
}
WITH THIS:

Code: Select all

.product-list .description {
	line-height: 15px;
	margin-top: 15px;
	margin-right: 15px;
	margin-bottom: 15px;
	margin-left: 15px;
	color: #4D4D4D;
	text-align: justify;
}
THEN, you'll have the TEXT justified,
you'll also have on top/right/bottom/left sides 15px. of 'space',
wich you may adjust individually.

Good Luck

Ernie

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by Xellz » Wed Jun 18, 2014 8:55 am

Thanks, looks a bit better now.

But the biggest problem are missing line breaks. Text color also is changed to black only.

Japanese green tea


New member

Posts

Joined
Fri Feb 11, 2011 8:55 pm

Post by IP_CAM » Wed Jun 18, 2014 10:26 am

Category Fields are no Product Fields, their 'planned' purpose is to serve most important Top Info, not beautyful aligned and styled content. This, at least, is the philosophy of this kind of setup. In addition, it's a PAGE-LOAD Speed Matter as well. One could change this only by removing some of the (apparently existing) html-tag-filtering within this Section.

You need to make yourselfs familiar with, at least, very basic CSS. If you plan to survife with OC, there is no way around it.

Image

good Luck

Ernie
Last edited by IP_CAM on Sat Jun 21, 2014 1:42 am, edited 1 time in total.

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


User avatar
Legendary Member

Posts

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

Post by Xellz » Wed Jun 18, 2014 12:03 pm

More or less familiar with css and basic php, current template i did myself. But i don't really know much how the data is handled in opencart. At least question is more clear now, how to disable html tag striping. Seems that's the problem here.

Japanese green tea


New member

Posts

Joined
Fri Feb 11, 2011 8:55 pm

Post by IP_CAM » Fri Jun 20, 2014 7:55 am

I think, this is more like what your'e looking for?!

Image

it this file:

Code: Select all

..\shop\catalog\controller\product\category.php
around line 151:

Code: Select all

$this->data['description'] = htmlspecialchars_decode($category_info['description'], ENT_QUOTES);
//$this->data['description'] = html_entity_decode($category_info['description'], ENT_QUOTES, 'UTF-8');
around line 244:

Code: Select all

'description'	=> htmlspecialchars_decode(substr($result['description'],0,500)),
//'description' => utf8_substr(html_entity_decode(strstr($result['description'], '.', true), ENT_QUOTES, 'UTF-8'), 0, 400) . '.',
the NEW Line comes above the Old One, then QUOTE the Old ONE as I did. It's better than remove it, you may want to change it back later again, then, it still exists...

The DEFAULT (old) Line is QUOTED above with //
'500' is the max.character value displayed.
>>ENT_QUOTES<< may not even be needed, I find out about this later...(step by step)

or then, create yourself a simple VQMOD to do it, it could be done in a few minutes, it's just two lines to be replaced in the same file.
But please, noone ask me for this, I just don't plan to jump on this 'horse', using a VqMod for this could get to be just one more time-consuming Job for a Server, if very many Items are displayed in a Category. One (more) complete backend-template to create, for each Product to be shown !...

---

PS: Important: When using this, Default Filtering + Code Security Settings for the Product Description Sections (on such Pages) are widely disabled. By example, because of the -allowed numbers of characters- limitation, possibly, existing and OPENED <LI><UL><DIV><SPAN><HREF><FORM><CLASS><E.T.C.> 'Sections' cannot be closed. As a result of this and from that POINT on, the following (Category-Display) Page Content can get SCREWED UP, even Error-Messages could pop up. Therefore, a lot of Care has to be taken, when creating Description Content, that NO SUCH Tag-Elements are 'implanted' just ANYWHERE within the description Fields, all OPEN Sections need to be closed again, BEFORE the Character-Limiter cut's further Product-Description-Section-Content/Code. I just wanted to mention this, it's probably the No.1 Reason, why this 'Option' has not been placed into OC by Default, nor is it available as Mod. For good Reasons...

My sample image displays what may happen, one Product shows up,
it does not even 'complete' itself anymore in order (because it's Description-Section
Content has been limited to appr. 131 Characters), 'inside' of a <UL>-Section
(and inside others, as well...). What follows, depends on what's still 'unclosed'
in this first Product Dispay. It could look much worse...

Image

...just to avoid possible negative Comments, of some 'Beginners', trying it out!

---

I wanted to solve this little Tag-Filter-Gizmo-Thing, and by accident, I run into a Mod, containing that >>htmlspecialchars_decode<< contentfilter 'definition/declaration' element (as I call it)! And since I don't like to read books (anymore), I just find out by doing. Would have been easy for a Pro, if one would have been around, I guess.
But I understand, it's just to much hassle with such 'potentially problemloaded Mods', trying to assist 95% so-called 'Code-Strangers', and likely to end in frustration anyway ...

Good Luck, let me know, if I forgot to mention something else I did, to make this work.

Ernie

Conclusion: It should be possible to ALLOW certain TAGS, like <p>...</p>,to be used in this Area.
It would help a lot. (how I miss Perl..., doing such) ::)

I am no longer active at this Forum.
Please don't send Personal Messages, contact: jti@jacob.ch
---
Github OC Downloads: https://github.com/IP-CAM
2'000+ FREE OC Extensions from the World's largest Github OC Archive.


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 29 guests