Post by mophielle » Wed Apr 15, 2020 9:07 pm

Hello, I updated OC for years up to OC 3.0.3.2 but transferred products via databases or as well a transfer module. Never had problems but now, after installing a new theme with another Product page which has a special view on product pictures i get an error undefined variable: result in /catalog/controller/product/product.php on line 290 at the products which are not in the "default" image folder.
I´m using image/data (OC 1.5), image/catalog (think this is OC 2) and image/image (which works so i think OC3). The problem is just at the product page, not at categories eg. you still can see the pictures working on main page, but causing this problems if they are in the folders image/data or image/catalog. So can somebody tell me whether how to bulk transfer the image folders without uploading a few hundret pictures one by one for each product by database or however to the default OC3 image folder?

Or does anybody have a clue why i got this problem?

On line 290 it says

Code: Select all

$images = $this->model_catalog_product->getProductImages($result['product_id']); 
So i don't understand why there is an error, because actually the products have pictures connected to their id.

Thank you for your support!
Last edited by straightlight on Wed Apr 15, 2020 10:47 pm, edited 1 time in total.
Reason: Added code tags.

New member

Posts

Joined
Wed Jun 03, 2015 2:33 am

Post by straightlight » Wed Apr 15, 2020 9:26 pm

This topic has now been moved to the OpenCart 3.0 Support > General Support section of the forum.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by letxobnav » Wed Apr 15, 2020 10:38 pm

first of all, that is not default OC, default, the product images are fetched with:

Code: Select all

$results = $this->model_catalog_product->getProductImages($this->request->get['product_id']);
on line 269
second, if you get an undefined variable result on your line 290:

Code: Select all

$images = $this->model_catalog_product->getProductImages($result['product_id']);
then that means that $result['product_id'] is undefined, resulting in a warning (not error) and no retrieved results from that function of course.
So better focus on why $result['product_id'] is undefined.

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by paulfeakins » Thu Apr 16, 2020 3:56 pm

mophielle wrote:
Wed Apr 15, 2020 9:07 pm
can somebody tell me whether how to bulk transfer the image folders without uploading a few hundret pictures one by one for each product by database or however to the default OC3 image folder?
You may find this article interesting:
https://www.antropy.co.uk/blog/using-wi ... -opencart/

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: Amazon [Bot] and 75 guests