Post by CedSha » Mon Apr 21, 2025 11:25 pm

As far as I can understand there was an update on how the columns sku, upc, ean, jan, isbn, mpn are handled. They are no more parts of the main oc_product table, but now belongs to oc_product_code table. If so we need to join this table to search inside, else get an error
Error: Unknown column 'p.sku' in 'where clause'
In the mean time, to keep a reduce search, one could comment out the block from line 359 of catalog/model/catalog/product.php

Code: Select all

//if (!empty($data['filter_search'])) {
//    $sql .= " OR LCASE(`p`.`model`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
//    $sql .= " OR LCASE(`p`.`sku`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
//    $sql .= " OR LCASE(`p`.`upc`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
//    $sql .= " OR LCASE(`p`.`ean`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
//    $sql .= " OR LCASE(`p`.`jan`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
//    $sql .= " OR LCASE(`p`.`isbn`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
//    $sql .= " OR LCASE(`p`.`mpn`) = '" . $this->db->escape(oc_strtolower($data['filter_search'])) . "'";
// }
HTH
Last edited by CedSha on Tue Apr 22, 2025 3:34 pm, edited 1 time in total.

Image


User avatar
New member

Posts

Joined
Mon Sep 18, 2023 1:01 am


Post by khnaz35 » Mon Apr 21, 2025 11:49 pm

Feel free to report your issue here.
https://github.com/opencart/opencart/issues

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by CedSha » Tue Apr 22, 2025 4:31 am

The bug was referenced as #14746 in Github
First I did not find it as they do not mention the 'search' term in the title ;D
I tried the committed file in d9714d1 which perfectly solved the problem.
Tks

Image


User avatar
New member

Posts

Joined
Mon Sep 18, 2023 1:01 am


Post by agenziarc@yahoo.com » Thu May 29, 2025 12:47 am

Can you tell me the exact solution to the problem?

New member

Posts

Joined
Sun Jan 02, 2022 10:40 pm

Post by khnaz35 » Thu May 29, 2025 2:16 am

Here is the solution to the problem
https://github.com/opencart/opencart/co ... 96a39bcebf

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by agenziarc@yahoo.com » Thu May 29, 2025 9:49 pm

khnaz35 wrote:
Thu May 29, 2025 2:16 am
Here is the solution to the problem
https://github.com/opencart/opencart/co ... 96a39bcebf
OK Thank you

New member

Posts

Joined
Sun Jan 02, 2022 10:40 pm
Who is online

Users browsing this forum: No registered users and 2 guests