I have noticed that the language ID is saved in the order DB.
Bug or suggestions?
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
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.DirkZz wrote:Daniel wouldnt this be a better query for counting the category totals?:
You only have to run this once, instead of putting it in a loop.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
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.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Dave
www.coderstudios.com
Read my reaction in the other topic, because now im not quite sure what you are talking about.Xsecrets wrote: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.DirkZz wrote:Daniel wouldnt this be a better query for counting the category totals?:
You only have to run this once, instead of putting it in a loop.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
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.
It looks fine to me.
you shoudl not decompress on the server. unzip it on the desktop and upload using filezilla or something.'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:
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.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
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.
OpenCart®
Project Owner & Developer.
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
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.
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
In admin email confirmation order, the address of the customer did not appear. is it like that - how to insert back?
Currently using OpenCart ver 3.0.2.0
Trend2style.com
Hi,audiomarket wrote:I have resolved with css upgrade!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?
In the stylesheet file, search class .box-product > div and replace it with:
Yes, tou hahve only 5 products but a nice aligned!!Code: Select all
.box-product > div { width: 20%; float: left; text-align: center; margin-bottom: 20px; }
Olso in other page the alignement is great!!
Bye
I use your code, nice alignment but problem with side box. it seems the product overlapping. how to correct this?
Currently using OpenCart ver 3.0.2.0
Trend2style.com
use mb_substr
Encoding errors for the Cyrillic: http://forum.opencart.com/viewtopic.php ... 34#p163964
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) . '..',
Code: Select all
'description' => mb_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 100, 'utf-8') . '..',
Reason: added "Encoding errors for the Cyrillic: "
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.phpeka7a 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');
find
Code: Select all
public function getStyles() {
return array_unique($this->styles);
}
Code: Select all
public function getStyles() {
return $this->styles;
}
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
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);
}
Code: Select all
public function addStyle($style) {
$this->styles[] = $style;
}
public function getStyles() {
return array_unique($this->styles);
}
fınd
Code: Select all
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
Code: Select all
<link rel="stylesheet" type="text/css" href="<?php echo $style; ?>" media="screen" />
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
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())
Code: Select all
$sort_data = array(
Code: Select all
$sql .= " GROUP BY p.product_id";
I've added this to the issue tracker as well.
Users browsing this forum: No registered users and 67 guests