Post by onlinephilately » Thu Jul 07, 2011 4:24 pm

I don't know if this is a bug but when you get an order from a customer with a different language (ie English) and you have your admin in a second language (ie Swedish) the invoice printed will come out in the Admin language (ie Swedish).

I have noticed that the language ID is saved in the order DB.

Bug or suggestions?

New member

Posts

Joined
Thu Jan 27, 2011 3:14 am

Post by DirkZz » Thu Jul 07, 2011 7:58 pm

Daniel wouldnt this be a better query for counting the category totals?:

Code: Select all

                       SELECT COUNT( p.product_id ) AS total, p2c.category_id
                FROM product p
                LEFT JOIN product_description pd ON ( p.product_id = pd.product_id )
                LEFT JOIN product_to_store p2s ON ( p.product_id = p2s.product_id )
                LEFT JOIN product_to_category p2c ON ( p2c.product_id = p.product_id )
                WHERE pd.language_id = '1'
                AND p.status = '1'
                AND p.date_available <= NOW( )
                AND p2s.store_id = '0'
                GROUP BY p2c.category_id
You only have to run this once, instead of putting it in a loop.
Requires some extra code, but for me it helps quite a-lot. Much faster pageloads.

This starts getting faster then the current query when you have 5 categories.
at 4 categories the speed is the same.

New member

Posts

Joined
Thu Jun 16, 2011 3:34 pm

Post by Xsecrets » Thu Jul 07, 2011 9:14 pm

DirkZz wrote:Daniel wouldnt this be a better query for counting the category totals?:

Code: Select all

                       SELECT COUNT( p.product_id ) AS total, p2c.category_id
                FROM product p
                LEFT JOIN product_description pd ON ( p.product_id = pd.product_id )
                LEFT JOIN product_to_store p2s ON ( p.product_id = p2s.product_id )
                LEFT JOIN product_to_category p2c ON ( p2c.product_id = p.product_id )
                WHERE pd.language_id = '1'
                AND p.status = '1'
                AND p.date_available <= NOW( )
                AND p2s.store_id = '0'
                GROUP BY p2c.category_id
You only have to run this once, instead of putting it in a loop.
Requires some extra code, but for me it helps quite a-lot. Much faster pageloads.

This starts getting faster then the current query when you have 5 categories.
at 4 categories the speed is the same.
That won't get you total products including subcategories no matter how you slice and dice it. Believe me I hit it from every angle and you simply can't do category + subcategory count that way.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by ritey » Thu Jul 07, 2011 9:17 pm

Why not just cache the product count and delete/re-create when a product or category is counted, then for the menu just read a json cache file?

Dave
www.coderstudios.com


User avatar
Active Member

Posts

Joined
Fri Jan 22, 2010 4:28 am
Location - Richmond

Post by DirkZz » Thu Jul 07, 2011 9:30 pm

Xsecrets wrote:
DirkZz wrote:Daniel wouldnt this be a better query for counting the category totals?:

Code: Select all

                       SELECT COUNT( p.product_id ) AS total, p2c.category_id
                FROM product p
                LEFT JOIN product_description pd ON ( p.product_id = pd.product_id )
                LEFT JOIN product_to_store p2s ON ( p.product_id = p2s.product_id )
                LEFT JOIN product_to_category p2c ON ( p2c.product_id = p.product_id )
                WHERE pd.language_id = '1'
                AND p.status = '1'
                AND p.date_available <= NOW( )
                AND p2s.store_id = '0'
                GROUP BY p2c.category_id
You only have to run this once, instead of putting it in a loop.
Requires some extra code, but for me it helps quite a-lot. Much faster pageloads.

This starts getting faster then the current query when you have 5 categories.
at 4 categories the speed is the same.
That won't get you total products including subcategories no matter how you slice and dice it. Believe me I hit it from every angle and you simply can't do category + subcategory count that way.
Read my reaction in the other topic, because now im not quite sure what you are talking about.
It looks fine to me.

New member

Posts

Joined
Thu Jun 16, 2011 3:34 pm

Post by Daniel » Thu Jul 07, 2011 10:06 pm

'tis-grand wrote:Thanks for the speedy reply. I installed opencart 1.5.0.5 on another server using softaculous and indeed the error did not repeat. So I went back to my first server and deleted the original installation of opencart and deleted the database associated with it and started again, including downloading a new copy of opencart onto another computer before uploading it.

I also unzipped this new version on my desktop first using 7zip to check it. It gave me a number of diagnostic messages including:
CRC failed in 'Opencart v.1.5.0.5\upload\admin\view\javascript\jquery\ui\external\simulate\jquery.simulate.js.' File is broken.

It gave me a lot of other messages saying 'Unsupported compression method for Opencart v.1.5.0.5\upload\admin\view\javascript\jquery\ui\i18n\jquery.ui.datepick' - somthing like 62 of these messages which I can't paste here because I am unable to copy and paste.

Undeterred I uploaded the opencart_v1.5.0.5.zip that I had just downloaded via File manage in cPanel and then used the extract facility to decompress it. I received the following errors:

Code: Select all

inflating: OpenCart v1.5.0.5/upload/admin/view/javascript/jquery/ui/external/qunit.js  
   creating: OpenCart v1.5.0.5/upload/admin/view/javascript/jquery/ui/external/simulate/
  inflating: OpenCart v1.5.0.5/upload/admin/view/javascript/jquery/ui/external/simulate/jquery.simulate.js  
  error:  invalid compressed data to inflate
 bad CRC 00000000  (should be 7639f86a)
file #1235:  bad zipfile offset (local header sig):  2156334
file #1236:  bad zipfile offset (local header sig):  2156426
file #1237:  bad zipfile offset (local header sig):  2169843
file #1238:  bad zipfile offset (local header sig):  2170441
file #1239:  bad zipfile offset (local header sig):  2171149
file #1240:  bad zipfile offset (local header sig):  2171900
file #1241:  bad zipfile offset (local header sig):  2172536
file #1242:  bad zipfile offset (local header sig):  2173251
file #1243:  bad zipfile offset (local header sig):  2173828
file #1244:  bad zipfile offset (local header sig):  2174424
file #1245:  bad zipfile offset (local header sig):  2175059
file #1246:  bad zipfile offset (local header sig):  2175674
file #1247:  bad zipfile offset (local header sig):  2176267
file #1248:  bad zipfile offset (local header sig):  2177011
file #1249:  bad zipfile offset (local header sig):  2177595
file #1250:  bad zipfile offset (local header sig):  2178182
file #1251:  bad zipfile offset (local header sig):  2178769
file #1252:  bad zipfile offset (local header sig):  2179369
file #1253:  bad zipfile offset (local header sig):  2179973
file #1254:  bad zipfile offset (local header sig):  2180599
file #1255:  bad zipfile offset (local header sig):  2181188
file #1256:  bad zipfile offset (local header sig):  2181906
file #1257:  bad zipfile offset (local header sig):  2182522
file #1258:  bad zipfile offset (local header sig):  2183142
file #1259:  bad zipfile offset (local header sig):  2183751
file #1260:  bad zipfile offset (local header sig):  2184408
file #1261:  bad zipfile offset (local header sig):  2185011
file #1262:  bad zipfile offset (local header sig):  2185655
file #1263:  bad zipfile offset (local header sig):  2186253
file #1264:  bad zipfile offset (local header sig):  2186894
file #1265:  bad zipfile offset (local header sig):  2187586
file #1266:  bad zipfile offset (local header sig):  2188176
file #1267:  bad zipfile offset (local header sig):  2188821
file #1268:  bad zipfile offset (local header sig):  2189427
file #1269:  bad zipfile offset (local header sig):  2190015
file #1270:  bad zipfile offset (local header sig):  2190619
file #1271:  bad zipfile offset (local header sig):  2191349
file #1272:  bad zipfile offset (local header sig):  2191998
file #1273:  bad zipfile offset (local header sig):  2192625
file #1274:  bad zipfile offset (local header sig):  2193389
file #1275:  bad zipfile offset (local header sig):  2193983
file #1276:  bad zipfile offset (local header sig):  2194579
file #1277:  bad zipfile offset (local header sig):  2195184
file #1278:  bad zipfile offset (local header sig):  2195809
file #1279:  bad zipfile offset (local header sig):  2196423
file #1280:  bad zipfile offset (local header sig):  2196985
file #1281:  bad zipfile offset (local header sig):  2197583
file #1282:  bad zipfile offset (local header sig):  2198257
file #1283:  bad zipfile offset (local header sig):  2198994
file #1284:  bad zipfile offset (local header sig):  2199611
file #1285:  bad zipfile offset (local header sig):  2200247
file #1286:  bad zipfile offset (local header sig):  2200846
file #1287:  bad zipfile offset (local header sig):  2201421
file #1288:  bad zipfile offset (local header sig):  2202073
file #1289:  bad zipfile offset (local header sig):  2202692
file #1290:  bad zipfile offset (local header sig):  2203419
file #1291:  bad zipfile offset (local header sig):  2204156
file #1292:  bad zipfile offset (local header sig):  2204764
file #1293:  bad zipfile offset (local header sig):  2205496
file #1294:  bad zipfile offset (local header sig):  2206153
file #1295:  bad zipfile offset (local header sig):  2206773
file #1296:  bad zipfile offset (local header sig):  2207396
file #1297:  bad zipfile offset (local header sig):  2208019
  inflating: OpenCart v1.5.0.5/upload/admin/view/javascript/jquery/ui/i18n/ui.datepicker-bg.js  
  inflating: OpenCart v1.5.0.5/upload/admin/view/javascript/jquery/ui/i18n/ui.datepicker-ca.js
Nevertheless the frontend seemed alright and gave me green marks all the way so I went through the frontend install process and then logged in and started to disable the top level categories as before. Again I got the same problem - all the top level categories would disable except for 'Laptops & Notebooks' and 'MP3 Players'. When I try to disable those I get sent to the homepage of the frontend rather than back to the Categories listing in the backend.

I have a lot of stuff on my server and no issues with any other installation. I'm wondering if the download version of opencart_v1.5.0.5.zip does indeed contain a broken file that is doing this or where the issue lies - my server, the opencart files, where?

I can delete these remaining categories no problem but I'm wondering if this whole issue indicates some other problems that are going to come back and cause problems somewhere down the line.
you shoudl not decompress on the server. unzip it on the desktop and upload using filezilla or something.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Blnukem » Thu Jul 07, 2011 10:31 pm

Today's fresh install errors:

ADMIN ERROR:

Modules -> Information

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/admin/view/template/module/information.tpl on line 29

CART ERROR MSG:

2011-07-07 13:53:52 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/column_left.php on line 49
2011-07-07 13:53:52 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/column_right.php on line 49
2011-07-07 13:53:52 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/content_bottom.php on line 49
2011-07-07 13:54:24 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/content_top.php on line 49

New member

Posts

Joined
Wed Apr 28, 2010 11:17 pm

Post by Daniel » Thu Jul 07, 2011 10:41 pm

Blnukem wrote:Today's fresh install errors:

ADMIN ERROR:

Modules -> Information

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/admin/view/template/module/information.tpl on line 29

CART ERROR MSG:

2011-07-07 13:53:52 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/column_left.php on line 49
2011-07-07 13:53:52 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/column_right.php on line 49
2011-07-07 13:53:52 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/content_bottom.php on line 49
2011-07-07 13:54:24 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/httpdocs/catalog/controller/common/content_top.php on line 49

uninstall the modules from the admin and reinstall them. i'm aware of this, but its the svn version. don;t use it on a live site. an upgrade script might have to be built to avoid the errors you have.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Blnukem » Thu Jul 07, 2011 10:44 pm

OK that fixed it 100%

New member

Posts

Joined
Wed Apr 28, 2010 11:17 pm

Post by eccorals » Thu Jul 07, 2011 11:33 pm

Problem with new customer at checkout!

Just set up a couple days ago. getting everythign ready.. did a mock checkout with a new customer.

I made a new customer account in the checkout section. entered all the info. and the continue button was a dead end. nothing happened , didnt redirect you, didnt let you continue with he rest of checkout. But it registered the customer, because i had to back out of checkout, login with new account and then proceed.

known issue? or did i mess something up? ha
feel free to check it out opencart.eccorals.com

thanks

Newbie

Posts

Joined
Thu Jul 07, 2011 7:19 am

Post by mayor21 » Fri Jul 08, 2011 2:15 am

hi,

In admin email confirmation order, the address of the customer did not appear. is it like that - how to insert back?
admin-email.JPG

admin-email.JPG (35.61 KiB) Viewed 3440 times


Currently using OpenCart ver 3.0.2.0
Trend2style.com


User avatar
New member

Posts

Joined
Wed Jul 28, 2010 5:28 pm

Post by mayor21 » Fri Jul 08, 2011 5:42 pm

audiomarket wrote:
Ambottera wrote:I see this in demo.opencart.com and in my installation, the 8th product goes to the second line. What's the problem?
I have resolved with css upgrade!
In the stylesheet file, search class .box-product > div and replace it with:

Code: Select all

.box-product > div {
	width: 20%;
	float: left;
	text-align: center;
	margin-bottom: 20px;
}
Yes, tou hahve only 5 products but a nice aligned!!
Olso in other page the alignement is great!!

Bye
Hi,
I use your code, nice alignment but problem with side box. it seems the product overlapping. how to correct this?
Screen shot 2011-07-08 at 5.33.40 PM.jpg

Screen shot 2011-07-08 at 5.33.40 PM.jpg (34.69 KiB) Viewed 3364 times


Currently using OpenCart ver 3.0.2.0
Trend2style.com


User avatar
New member

Posts

Joined
Wed Jul 28, 2010 5:28 pm

Post by gruzdev » Fri Jul 08, 2011 7:50 pm

use mb_substr

in catalog/controller/product/category.php
find:

Code: Select all

'description' => substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',
replace:

Code: Select all

'description' => mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100, 'utf-8') . '..',
Last edited by i2Paq on Sat Jul 09, 2011 4:27 am, edited 1 time in total.
Reason: added "Encoding errors for the Cyrillic: "

Newbie

Posts

Joined
Fri Jul 08, 2011 7:45 pm

Post by PetracheNicolae » Sat Jul 09, 2011 4:15 am

after me, when you hit write a review link in a product page, the page should automatic move down to the review tab. i was ready to post that the section is not working just to realise that is working but is below the page and you have to scroll the page to see it (most of us have wide screens wich do not cover the whole page). something like it is done when you add a product in the cart. thanks

New member

Posts

Joined
Tue May 24, 2011 5:40 am

Post by PetracheNicolae » Sat Jul 09, 2011 4:33 am

can anyone post detailed instructions to fix the broken layout of the emails that a customer recives when making a order? thanks

New member

Posts

Joined
Tue May 24, 2011 5:40 am

Post by eka7a » Sat Jul 09, 2011 5:05 am

I add in this way but can not add more than one style file

Code: Select all

$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/first.css');
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/other.css');
not_added_style.png

not_added_style.png (16.78 KiB) Viewed 3296 times



User avatar
Active Member

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by Xsecrets » Sat Jul 09, 2011 6:05 am

eka7a wrote:I add in this way but can not add more than one style file

Code: Select all

$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/first.css');
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/other.css');
yeah in system/library/document.php
find

Code: Select all

    public function getStyles() {
		return array_unique($this->styles);
	}
and change it to

Code: Select all

    public function getStyles() {
		return $this->styles;
	}
array unique doesn't really like multidimensional arrays.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by eka7a » Sat Jul 09, 2011 11:22 am

I know but this time is added to the same files.

This Works
find system/library/document.php

Code: Select all

	public function addStyle($href, $rel = 'stylesheet', $media = 'screen') {
		$this->styles[] = array(
			'href'  => $href,
			'rel'   => $rel,
			'media' => $media
		);
	}
	
	public function getStyles() {
		return array_unique($this->styles);
	}
Replace

Code: Select all

	public function addStyle($style) {
		$this->styles[] = $style;			
	}
	
	public function getStyles() {
		return array_unique($this->styles);
	}
yourtemplate/common/header.tpl
fınd

Code: Select all

<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
Replace

Code: Select all

<link rel="stylesheet" type="text/css" href="<?php echo $style; ?>" media="screen" />


User avatar
Active Member

Posts

Joined
Sun Apr 12, 2009 12:59 am
Location - Türkiye

Post by Xsecrets » Sat Jul 09, 2011 11:51 am

are you saying my fix didn't work? It should have worked without you having to do anything to the header files.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Johnathan » Sat Jul 09, 2011 9:33 pm

/catalog/model/catalog/product.php is missing the "GROUP BY p.product_id" statement from previous versions, which sometimes messes up search results. As an example, see the following search in the demo:

http://demo.opencart.com/index.php?rout ... ption=true

The first and second pages both contain the iPod Classic product the same random product. It's more apparent with smaller items per page, where multiple items are duplicated on each page.

The bugfix is:

IN:

Code: Select all

public function getProducts($data = array()) 
BEFORE:

Code: Select all

$sort_data = array( 
ADD:

Code: Select all

$sql .= " GROUP BY p.product_id"; 
This may need to be added to other "get" functions...I haven't checked them out.

I've added this to the issue tracker as well.
Last edited by Johnathan on Sun Jul 10, 2011 3:19 pm, edited 1 time in total.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 4 guests