Search found 16239 matches

Search found 16239 matches

[MOD] OPTIMIZED admin/model/sale/order.php

When deleting / updating the orders from the sales report under the admin, an SQL SELECT query is being looped. To correct this, in your admin/model/sale/order.php file, Find: public function deleteOrder($order_id) { if ($this->config->get('config_stock_subtract')) { $order_query = $this->db->query(...

Jump to post
  • Wed Nov 23, 2011 1:36 am
  • Replies 0
  • Views 535
[MOD] OPTIMIZED admin/model/design/banner.php

The banner images loads under loop SELECT statement which has now been corrected to load as single queries: In admin/model/design/banner.php Find: public function getBannerImages($banner_id) { $banner_image_data = array(); $banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner...

Jump to post
  • Wed Nov 23, 2011 1:06 am
  • Replies 0
  • Views 552
Re: [MOD] OPTIMIZED system/library/cart.php

If there's a single value in an array, and implode is being used, an error message gets returned from PHP v5.3+ (during SQL queries). Join is implode. http://php.net/manual/en/function.join.php Regarding the alias from the PHP manual, I do agree but as stated above, without knowing exactly if it's ...

Jump to post
  • Tue Nov 22, 2011 11:59 pm
  • Replies 19
  • Views 3999
Re: [MOD] OPTIMIZED system/library/cart.php

It's strange I haven't experienced the issue you are describing with implode and I use it quite frequently to pass data to mysql IN and NOT IN functions. I'm certainly not against this type of optimization, but out of curiosity why start with the cart? Seems like there are other places that would b...

Jump to post
  • Tue Nov 22, 2011 11:52 pm
  • Replies 19
  • Views 3999
Re: [MOD] OPTIMIZED system/library/cart.php

This SQL optimization actually prevents SELECT statement from SQL to be looped constantly by each $this->session->data['cart'] => $key and not recommended to loop SELECT statements especially since the original codes contains multi-dimensional loops in the class. This alternative approach I coded wi...

Jump to post
  • Tue Nov 22, 2011 11:25 pm
  • Replies 19
  • Views 3999
Re: [MOD] OPTIMIZED system/library/cart.php

dony_b wrote:works with 1.5.1.2
As a single item from your basket or multiple items ? Can you confirm if it works on both ?

Jump to post
  • Tue Nov 22, 2011 10:45 pm
  • Replies 19
  • Views 3999
Re: [MOD] OPTIMIZED system/library/cart.php

An example you can use is from the PDO Extension (MySQL) I coded in the contribution if you do have access locally from OpenCart server to download it. You can see the PDO's construction file which only contains joins to make the preparations of any SQL queries involving to write into the database. ...

Jump to post
  • Tue Nov 22, 2011 10:39 pm
  • Replies 19
  • Views 3999
Re: [MOD] OPTIMIZED system/library/cart.php

system/library/cart.php file re-updated for sanitizing the product options though.

Jump to post
  • Tue Nov 22, 2011 9:49 pm
  • Replies 19
  • Views 3999
Re: [MOD] OPTIMIZED system/library/cart.php

1) You definitely want to make sure to sanitize the product_ids in your queries. The product ID from the $this->session->data['cart'] => $product[0] is already sanitized from the $product_id during the first loop. It wouldn't be quite useful to re-sanitize what has already been sanitized during the...

Jump to post
  • Tue Nov 22, 2011 9:13 pm
  • Replies 19
  • Views 3999
[MOD] OPTIMIZED system/library/cart.php

From system/library/cart.php file, I noticed an exaggerated use of SQL SELECT queries since all those query types are under PHP loops and it is obviously not recommended. I spent half the day to recode this class file and hopefully it will help others by optimizing their SQL resources in the future ...

Jump to post
  • Tue Nov 22, 2011 4:55 am
  • Replies 19
  • Views 3999
Re: Extension email notification update

Strange. Yesterday, when I checked 'Yes' for this option, I received a copy of the confirmation over email stating my package was indeed updated once I submitted the form ... is there a new policy since ?

Jump to post
  • Wed Nov 16, 2011 5:41 am
  • Replies 2
  • Views 1178
Extension email notification update

I don't know if I'm posting this under the right section in the forum but just to let the webmaster know that when I update extensions from my account and select 'yes' to notify over email, I don't receive an email anymore since this morning ... Perhaps a problem with SMTP relay from Opencart's serv...

Jump to post
  • Wed Nov 16, 2011 1:06 am
  • Replies 2
  • Views 1178
admin/controller/catalog/product.php file

While other controller / model / template files may involve the same issue, let's start with this one. admin/controller/catalog/product.php file has an array called $product_images as such: if (isset($this->request->post['product_image'])) { $product_images = $this->request->post['product_image']; }...

Jump to post
  • Tue Nov 15, 2011 11:21 pm
  • Replies 0
  • Views 729
Re: Call to a member function isLogged() on a non-object

I have faced similar situation yesterday as I also had to re-install my cart but no use. At least, here's what I did to get out of it: 1 - Before implementing any contributions, make sure to backup your database. Even though you re-install opencart's files on your FTP and you don't restore your data...

Jump to post
  • Tue Nov 15, 2011 11:09 pm
  • Replies 3
  • Views 2064
duplicate lines from admin/controller/common/header.php file

There are duplicated variable declarations from admin/controller/common/header.php file. $this->data['text_report_product_viewed'] = $this->language->get('text_report_product_viewed'); $this->data['text_report_product_purchased'] = $this->language->get('text_report_product_purchased'); $this->data['...

Jump to post
  • Tue Nov 15, 2011 8:51 am
  • Replies 0
  • Views 375
system/startup.php file - register globals bug

It has been known that register_globals cannot be verified by a simple ini_get within an if statement which will simply falsify the results. To correct this issue, from system/startup.php file, find: if (ini_get('register_globals')) { replace with: $register_globals = strtolower(@ini_get('register_g...

Jump to post
  • Tue Nov 15, 2011 8:27 am
  • Replies 0
  • Views 642
admin/model/setting/store.php file

In admin/model/setting/store.php file, there's an unknown and not declared array parameter which isn't used in the following function for an unknown reason: public function getStores($data = array()) { it should rather be replaced with this: public function getStores() { Fortunately, the array was d...

Jump to post
  • Tue Nov 15, 2011 4:21 am
  • Replies 0
  • Views 371
undefined index 'backup' - admin/controller/tool/backup.php

On line 99 of admin/controller/tool/backup.php file, find: $this->response->setOutput($this->model_tool_backup->backup($this->request->post['backup'])); replace with: if (isset($this->request->post['backup'])) { $this->response->setOutput($this->model_tool_backup->backup($this->request->post['backup...

Jump to post
  • Tue Nov 15, 2011 1:07 am
  • Replies 0
  • Views 362
admin controller's home.php file.

Hi, I discovered a bug in admin/controller/common/home.php file. Find: if (!file_exists($file)) { $this->data['errorlogs'] = sprintf($this->language->get('error_logs'). DIR_LOGS); } else { $this->data['error_logs'] = ''; unlink($file); } replace with: if (!file_exists($file)) { $this->data['error_lo...

Jump to post
  • Mon Nov 14, 2011 11:45 pm
  • Replies 0
  • Views 418

Search found 16239 matches