Post by mark4785 » Wed Mar 04, 2015 7:44 am

I have experienced multiple issues with my OC installation which I have not been able to resolve. One of the issues is the fact that review comments that overspill onto page 2 do not display with the template surrounding them. This issue can be found by clicking http://dev.darkmoontest.com/farmhouse_s ... nghamshire_ followed by clicking 'reviews' and then clicking the 'page 2' button.

A user of this forum thought that this issue could be resolved by accessing product.tpl and making the following changes:
yodapt wrote:

Code: Select all

$('#review .pagination a').live('click', function() {
should be

Code: Select all

$('#review .pagination-bottom a').live('click', function() {
However, the problem is still persisting.

I decided that I would change the pagination limit to 30 so that all of the 9 reviews (there are about 9 reviews on the above website, 5 displaying on page 1 and the remainder on page 2) display on page 1 which does not have the template display error. I changed the pagination limit to 30 within:
catalog/controller/product/product.php
by making the necessary changes to:

Code: Select all

	$results = $this->model_catalog_review->getReviewsByProductId($this->request->get['product_id'], ($page - 1) * 30, 30);
      		
		foreach ($results as $result) {
        	$this->data['reviews'][] = array(
        		'author'     => $result['author'],
				'rating'     => $result['rating'],
				'text'       => strip_tags($result['text']),
        		'stars'      => sprintf($this->language->get('text_stars'), $result['rating']),
        		'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added']))
        	);
      	}			
		
		$review_total = $this->model_catalog_review->getTotalReviewsByProductId($this->request->get['product_id']);
			
		$pagination = new Pagination();
		$pagination->total = $review_total;
		$pagination->page = $page;
		$pagination->limit = 30; 
This change did not take effect on the frontend as it is still displaying 5 reviews per page.

Is there anything else that I can try to resolve the reviews page issue?

Regards,
Mark.


Active Member

Posts

Joined
Fri Jan 30, 2015 3:01 am

Post by gedielson » Wed Mar 04, 2015 9:08 am

The yodapt sugestion should solve the issue. BUT, let's try a different approach:
Open up catalog/view/theme/elegium/template/product/review.tpl, find

Code: Select all

<div class="pagination-bottom"><?php echo $pagination; ?></div>
and replace by

Code: Select all

<div class="pagination"><?php echo $pagination; ?></div>
In other words, just replace "pagination-bottom" class by "pagination" only. Then, open up /catalog/view/theme/elegium/stylesheet/stylesheet.css and add this

Code: Select all

.pagination {
	display: inline-block;
	width: 100%;
	padding-bottom: 30px;
}
.pagination-bottom .links {
	float: left;
}
.pagination .links a {
	display: inline-block;
	background: #eee;
	padding: 3px 8px;
	text-decoration: none;
	color: #888;
	-webkit-border-radius: 2px;
	-moz-border-radius: 2px;
	-khtml-border-radius: 2px;
	border-radius: 2px;
}
.pagination .links a:hover {
	color: #666;
	background: #eee;
}
.pagination .links b {
	display: inline-block;
	background: #d6d6d6;
	padding: 3px 8px;
	font-weight: normal;
	text-decoration: none;
	color: #666;
	-webkit-border-radius: 2px;
	-moz-border-radius: 2px;
	-khtml-border-radius: 2px;
	border-radius: 2px;
}
.pagination .results {
	float: right;
	padding-top: 3px;
}
This should do the trick.

http://gepeixoto.com.br


User avatar
New member

Posts

Joined
Wed Oct 01, 2014 7:37 am
Location - Brazil

Post by mark4785 » Wed Mar 04, 2015 10:35 am

Then, open up /catalog/view/theme/elegium/stylesheet/stylesheet.css and add this:...
Would I add the code right at the end of the stylesheet.css file?

Regards,
Mark.


Active Member

Posts

Joined
Fri Jan 30, 2015 3:01 am

Post by gedielson » Wed Mar 04, 2015 11:32 am

Yes.

http://gepeixoto.com.br


User avatar
New member

Posts

Joined
Wed Oct 01, 2014 7:37 am
Location - Brazil

Post by mark4785 » Thu Mar 05, 2015 3:14 am

gedielson wrote:The yodapt sugestion should solve the issue. BUT, let's try a different approach:
Open up catalog/view/theme/elegium/template/product/review.tpl, find

Code: Select all

<div class="pagination-bottom"><?php echo $pagination; ?></div>
and replace by

Code: Select all

<div class="pagination"><?php echo $pagination; ?></div>
In other words, just replace "pagination-bottom" class by "pagination" only. Then, open up /catalog/view/theme/elegium/stylesheet/stylesheet.css and add this

Code: Select all

.pagination {
	display: inline-block;
	width: 100%;
	padding-bottom: 30px;
}
.pagination-bottom .links {
	float: left;
}
.pagination .links a {
	display: inline-block;
	background: #eee;
	padding: 3px 8px;
	text-decoration: none;
	color: #888;
	-webkit-border-radius: 2px;
	-moz-border-radius: 2px;
	-khtml-border-radius: 2px;
	border-radius: 2px;
}
.pagination .links a:hover {
	color: #666;
	background: #eee;
}
.pagination .links b {
	display: inline-block;
	background: #d6d6d6;
	padding: 3px 8px;
	font-weight: normal;
	text-decoration: none;
	color: #666;
	-webkit-border-radius: 2px;
	-moz-border-radius: 2px;
	-khtml-border-radius: 2px;
	border-radius: 2px;
}
.pagination .results {
	float: right;
	padding-top: 3px;
}
This should do the trick.
I have made the changes outlined above but it hasn't resolved the issue. Is there any other way to tackle this issue?

Note, the website I'm working on initially did NOT have the elegium folder found at: /catalog/view/theme/elegium BUT the elegium template still loaded up fine with the exception of page 2 of the reviews section not loading up. Would this signify that the place to configure the elegium template is not located at /catalog/view/theme/elegium/stylesheet/stylesheet.css or catalog/view/theme/elegium/template/product/review.tpl ?

It would appear that any backend changes I make do not take effect at the frontend. Why is this?

Regards,
Mark.


Active Member

Posts

Joined
Fri Jan 30, 2015 3:01 am

Post by mark4785 » Thu Mar 05, 2015 7:24 am

Any clues/pointers? ???

Regards,
Mark.


Active Member

Posts

Joined
Fri Jan 30, 2015 3:01 am

Post by gedielson » Thu Mar 05, 2015 8:26 am

I got it. You are modifying the wrong files, that are in root folder, instead of the files on dev subdomain. You changed this file:
darkmoontest.com/catalog/view/theme/elegium/stylesheet/stylesheet.css
When you have to change the one in dev subdomain to take effect:
dev.darkmoontest.com/catalog/view/theme/elegium/stylesheet/stylesheet.css

This is why your changes aren't taking effect.

Same with review.tpl

Do the changes in correct files and the issue will be solved.

Cheers.

http://gepeixoto.com.br


User avatar
New member

Posts

Joined
Wed Oct 01, 2014 7:37 am
Location - Brazil

Post by mark4785 » Fri Mar 13, 2015 5:34 am

gedielson wrote:I got it. You are modifying the wrong files, that are in root folder, instead of the files on dev subdomain. You changed this file:
darkmoontest.com/catalog/view/theme/elegium/stylesheet/stylesheet.css
When you have to change the one in dev subdomain to take effect:
dev.darkmoontest.com/catalog/view/theme/elegium/stylesheet/stylesheet.css

This is why your changes aren't taking effect.

Same with review.tpl

Do the changes in correct files and the issue will be solved.

Cheers.
Thanks for pointing this out. I guess it's an easy mistake to make haha :crazy:

Regards,
Mark.


Active Member

Posts

Joined
Fri Jan 30, 2015 3:01 am

Post by gedielson » Fri Mar 13, 2015 5:49 am

Yeah, we focus so much in probably complex solutions that sometimes the simple ones go unperceived. :laugh:

http://gepeixoto.com.br


User avatar
New member

Posts

Joined
Wed Oct 01, 2014 7:37 am
Location - Brazil

Post by sunsys » Mon Jul 06, 2015 10:00 pm

gedielson wrote:Yeah, we focus so much in probably complex solutions that sometimes the simple ones go unperceived. :laugh:
Using OC-2031, I have 3 pagination questions I wish somebody could kindly help me out with:

1. On specials page there is pagination present at the bottom of the page but there is no reference of pagination anywhere in ../catalog/view/theme/default/template/module/special.tpl so where is the pagination part for specials page ?

2. The pagination appears as follows "Showing 1 to 16 of 42 (3 Pages)" I want to change that to
"Showing 16 of 42 Products [26 products more]"

3. I would like to change the appearance of the pagination buttons to something more fancy, where do I make the changes so that it applies to all pagination pages of the cart.

Thank you.

Regards,
Sun Systems
Industrial Electronics and Instrumentation


User avatar
Active Member

Posts

Joined
Tue Jan 27, 2015 5:19 am

Post by sunsys » Sun Jul 12, 2015 6:38 pm

6 days no reply, really no one knows about this ?

Regards,
Sun Systems
Industrial Electronics and Instrumentation


User avatar
Active Member

Posts

Joined
Tue Jan 27, 2015 5:19 am

Post by gedielson » Mon Jul 13, 2015 2:14 am

1 - Yes, there is reference to pagination in Special page template located in ../catalog/view/theme/*/template/product/special.tpl, line 99. NOT in module folder.

2 - To do this, go to ../catalog/language/english/english.php, line 19, and edit the text to:

Code: Select all

'Showing %d of %d Products [%d products more]'
So, open up ../catalog/controller/product/special.php, line 256, replace this line with following:

Code: Select all

$data['results'] = sprintf($this->language->get('text_pagination'), ((((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit)) - (($product_total) ? (($page - 1) * $limit) + 1 : 0) + 1), $product_total, ($product_total - (((($page - 1) * $limit) > ($product_total - $limit)) ? $product_total : ((($page - 1) * $limit) + $limit)));
You need to make this change to all files that you want to display results in this way. But, in my opinion, it wil be weird when, e.g., there are 32 products total and in last page there are 2 products, it will display "Showing 2 of 32 Products [0 products more]". As I said, just my opinion.

3 - There are two files: ../catalog/view/theme/*/stylesheet/stylesheet.css, line 372; and ../catalog/view/javascript/bootstrap/css/bootstrap.min.css, this one compressed. Use your editor's search feature (normally Ctrl + F) and search for "pagination" class.

Cheers.

http://gepeixoto.com.br


User avatar
New member

Posts

Joined
Wed Oct 01, 2014 7:37 am
Location - Brazil

Post by sunsys » Mon Jul 13, 2015 6:33 am

gedielson wrote:You need to make this change to all files that you want to display results in this way. But, in my opinion, it wil be weird when, e.g., there are 32 products total and in last page there are 2 products, it will display "Showing 2 of 32 Products [0 products more]". As I said, just my opinion.
You are absolutely correct I shall leave it the way it is.
gedielson wrote:There are two files: ../catalog/view/theme/*/stylesheet/stylesheet.css, line 372; and ../catalog/view/javascript/bootstrap/css/bootstrap.min.css, this one compressed. Use your editor's search feature (normally Ctrl + F) and search for "pagination" class.
The pagination part in stylesheet.css is practically nothing:
.pagination {
margin: 0;
}
and whatever changes I do here does not reflect on frontend. The bootstrap.min.css looks very complicated and not laid out like the stylesheet cause I think to remove empty spaces.
- Why are there 2 bootstrap files min and non-min version.
- I was under the impression that bootstrap file is needed only for responsive or mobile compliant websites so why is pagination part put in bootstrap whereas in oc1564 it is in stylesheet, please kindly explain this part.

Regards,
Sun Systems
Industrial Electronics and Instrumentation


User avatar
Active Member

Posts

Joined
Tue Jan 27, 2015 5:19 am

Post by gedielson » Mon Jul 13, 2015 7:44 am

Hi,
The pagination part in stylesheet.css is practically nothing (...) and whatever changes I do here does not reflect on frontend.
Make sure there isn't other css rule/class overwriting your changes (obviously, this requires css knowledge).
Why are there 2 bootstrap files min and non-min version.
Self-explanatory: one version is minified - to reduce file size, speeding up the page loading - which is used by default; and the other isn't, just in case you to think it easyest to modify and use. But to use this last, you need to point it in ../catalog/view/theme/*/template/common/header.tpl, line 27. Just remove the ".min" from "bootstrap.min.css".
I was under the impression that bootstrap file is needed only for responsive or mobile compliant websites so why is pagination part put in bootstrap whereas in oc1564 it is in stylesheet, please kindly explain this part
Previous versions to 2.x don't make use of Bootstrap, but custom stylesheet instead. Bootstrap is a complete free opensource framework used in web development (http://getbootstrap.com/). In Opencart's case, it is used as stylesheet's base, and just other custom css is included in stylesheet.css.

Regards.

http://gepeixoto.com.br


User avatar
New member

Posts

Joined
Wed Oct 01, 2014 7:37 am
Location - Brazil
Who is online

Users browsing this forum: Google [Bot] and 237 guests