Post by krum_yordanov » Sun Nov 21, 2021 4:20 pm

I upgrade version opencart to 3.0.3.8
Today i see some problem
i have article
https://www.agrogradina.bg/semena/semen ... ok-agrosel - work url
https://www.agrogradina.bg/artishok-agrosel - work url
i use modul to see article in category
but url:
https://www.agrogradina.bg/semena/semen ... ok-agrosel
https://www.agrogradina.bg/semena/artishok-agrosel
not work
i see in category and subcategory article but when i click i see massege not fount

Product not found!

idea?

Newbie

Posts

Joined
Mon Jul 09, 2018 4:56 pm

Post by ADD Creative » Sun Nov 21, 2021 7:39 pm

If you are using an extension to make you products appear in parent categories, it would probably need to be updated to work with 3.0.3.8, due to the changes below.

https://github.com/opencart/opencart/pull/9478

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Mon Nov 22, 2021 8:43 pm

krum_yordanov wrote:
Sun Nov 21, 2021 4:20 pm
I upgrade version opencart to 3.0.3.8
From what version and how did you do it?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by krum_yordanov » Tue Nov 23, 2021 5:35 am

3.0.3.2 to 3.0.3.8
update standart
Upload files to your server
Run automatic installer


now i see new problem. i can not make new product... i have error
Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT DISTINCT image FROM ocim_product WHERE product_id=' at line 2<br />Error No: 1064<br />SELECT DISTINCT image FROM ocim_product_image WHERE product_id= UNION SELECT DISTINCT image FROM ocim_product WHERE product_id= in /home/gameuthv/public_html/seedsbg.com/system/library/db/mysqli.php:48 Stack trace: #0 /home/gameuthv/public_html/seedsbg.com/system/library/db.php(45): DB\MySQLi->query('SELECT DISTINCT...') #1 /home/gameuthv/public_html/seedsbg.com/system/ocmodify/classes/override/database.php(18): DB->query('SELECT DISTINCT...', Array) #2 /home/gameuthv/public_html/seedsbg.com/system/ocmodify/classes/engine/bridge.php(47): OCMDatabase->query('SELECT DISTINCT...') #3 /home/gameuthv/public_html/seedsbg.com/system/storage/modification/admin/model/catalog/product.php(463): OCMBridge->__call('query', Array) #4 /home/gameuthv/public_ht in /home/gameuthv/public_html/seedsbg.com/system/library/db/mysqli.php on line 48

Newbie

Posts

Joined
Mon Jul 09, 2018 4:56 pm

Post by ADD Creative » Tue Nov 23, 2021 7:47 am

Looks to be an issue with one of your extensions. Disable them one by one until you find which one.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JustRetro » Fri Nov 11, 2022 5:07 am

I understand this is an old thread, but I wanted to actually share a solution since this thread shows up on google and I want to help others that come across this.

Basically if you use any of those classic 2.0-3.0 OpenCart VQMods that shows products from child categories onto the parent categories.
Aka the manual mod where you add

Code: Select all

'filter_sub_category' => true,
underneath

Code: Select all

$filter_data = array(
'filter_category_id' => $category_id,
in \catalog\controller\product\category.php that lots of people mention here and stackoverflow.

You'll find that the child products show in parent categories now, but when clicking on them you get "Product not found!"
That's due to this commit: https://github.com/opencart/opencart/co ... 77a7614ed7
It was a bugfix so shoppers can't mess with the SEO url for categories. So someone cant change coolshop.net/furniture/oakchair12 to some gibberish like coolshop.net/irgn6dodrg iuopfdbi/oakchair12.
Although really, I find this fix not that important honestly, because it only needs to check the end bit anyway to get the product, plus this commit tends to break a few other old VQMods from my testing.

So the workaround I found (for at least OpenCart 3.0.3.8 ) is to just revert the behavior, additionally this also fixed the 500 server error I was having on another VQmod that generated thumbnails for embeds on discord/facebook/twitter etc that had trouble on some of the urls.

To apply the workaround, open:
\catalog\controller\product\product.php
find these lines

Code: Select all

//check product page open from cateory page
if (isset($this->request->get['path'])) {
	$parts = explode('_', (string)$this->request->get['path']);				

	if(empty($this->model_catalog_product->checkProductCategory($product_id, $parts))) {
		$product_info = array();
	}
}
And either delete it or comment it out. I commented this on mine using /* and */:

Code: Select all

//check product page open from cateory page
/* DISABLE!!!, BREAKS SHOWING SUBCATEGORIES IN PARENTS - 11/11/22
if (isset($this->request->get['path'])) {
$parts = explode('_', (string)$this->request->get['path']);
				
if(empty($this->model_catalog_product->checkProductCategory($product_id, $parts))) {
		$product_info = array();
	}
}*/
Hope this helps somebody in the future! ;D

User avatar
Newbie

Posts

Joined
Mon Dec 14, 2020 11:14 pm

Post by relatees » Wed Mar 20, 2024 10:49 am

Old thread, but thanks for posting the follow up. Every now and then you need this exact info in the moment and it's helpful. Appreciate you.

PHP/CSS/HTML guru - Wordpress, Drupal, and now OpenCart lover. Learning is key to living!


User avatar
Newbie

Posts

Joined
Sat Jan 28, 2012 9:37 pm

Post by paulfeakins » Wed Mar 20, 2024 8:32 pm

JustRetro wrote:
Fri Nov 11, 2022 5:07 am
Hope this helps somebody in the future! ;D
Very well done.

As you aren't the original author, I'll add [SOLVED] to the start of the post title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 18 guests