Post by Stuardo » Wed Aug 19, 2009 8:03 am

Hi all

I am new to this game, so pls stay with me!

I am trying to upload ADDITIONAL images to my products..

When up loading additional images for the products, it does not keep existing images, it discards the old ones. You have to add the links to every image each time you want to add an image. is this correct or am I missing a trick?

Stu

Newbie

Posts

Joined
Wed Aug 19, 2009 7:56 am

Post by Daniel » Wed Aug 19, 2009 9:10 am

shit!

just noticed this. its a bug.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Stuardo » Wed Aug 19, 2009 4:25 pm

Hi Daniel

Glad to be of service.

Any eta on a fix please?

Cheers
Stu

Newbie

Posts

Joined
Wed Aug 19, 2009 7:56 am

Post by Stuardo » Thu Aug 20, 2009 6:50 am

Do I need to raise this as a bug?

Many Thanks
Stu

Newbie

Posts

Joined
Wed Aug 19, 2009 7:56 am

Post by smallpox » Thu Aug 20, 2009 10:40 am

i have this problem too...... i'm crossing my fingers.

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by Daniel » Thu Aug 20, 2009 5:41 pm

i'm trying to get the next release out tonight.

I have added googlebase and need to finish google checkout and checkout without an account.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Daniel » Thu Aug 20, 2009 11:38 pm

re-download the latest version. I just put a fix in.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by smallpox » Fri Aug 21, 2009 12:07 am

thanks, found the difference:

if (isset($this->request->post['product_image'])) {
$data['product_image'] = array_merge($data['product_image'], $this->request->post['product_image']);
}

...

daniel, is there a way to use something like:

http://fisheye.freeswitch.org/browse/Fr ... 4&r2=14575

where we could tell all the changes?

thanks

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by Daniel » Fri Aug 21, 2009 12:56 am

i just did another upload because there was a bug with that. please try again.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by smallpox » Fri Aug 21, 2009 12:58 am

thanks, i just noticed it. that's why i came on to write that it didn't work ;)

it actually still doesn't work for me:

if (isset($data['product_image']) && isset($this->request->post['product_image'])) {
$data['product_image'] = array_merge($data['product_image'], $this->request->post['product_image']);
}

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by Daniel » Fri Aug 21, 2009 2:03 am

what is happening when you use the latest code?

it works fine for me.

any errors?

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by smallpox » Fri Aug 21, 2009 2:05 am

no errors, it just deletes the original images from sql.

if there is 03.jpg and 04.jpg, it will just replace it with 05.jpg in sql (if i upload 05.jpg)

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by smallpox » Fri Aug 21, 2009 2:18 am

411729 Query INSERT INTO product_image SET product_id = '74', image = '1.jpg'

that's when i upload 1.jpg into a product

i go again to the product - > image and add image, select 2.jpg

i get this in the log

411736 Query INSERT INTO product_image SET product_id = '74', image = '2.jpg'

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by smallpox » Fri Aug 21, 2009 2:34 am

i've tested it on a new install, your latest one

MD5 (opencart_v1.3.2.zip) = 7967ff82a1e423a7483e7d8d1ba68e5f

and it's doing the same thing still

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by Unknown » Fri Aug 21, 2009 3:07 am

Will there be a patch for this bug because I can't keep uploading the whole release each time because I make many changes ???

http://www.virusclothing.co.uk / http://www.viruselectronics.co.uk


New member

Posts

Joined
Fri Jul 24, 2009 4:56 am


Post by Daniel » Fri Aug 21, 2009 4:36 am

smallpox wrote:411729 Query INSERT INTO product_image SET product_id = '74', image = '1.jpg'

that's when i upload 1.jpg into a product

i go again to the product - > image and add image, select 2.jpg

i get this in the log

411736 Query INSERT INTO product_image SET product_id = '74', image = '2.jpg'
theses are not errors

they are just sql queries.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by smallpox » Fri Aug 21, 2009 4:41 am

daniel, i understand.. but when comparing to 1.2.8, 1.2.8 adds the filenames through sql queries, your latest patched 1.3.2 still does not work. i've patched and tried it on a new installation...

i'm just showing you that if you look at http://forum.opencart.com/viewtopic.php?f=20&t=5793 you can see what 1.2.8 does and you can see what 1.3.2 does through sql queries (i'm sure you already know)

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by Daniel » Fri Aug 21, 2009 6:03 am

the problem is you have 2 types of image data.

one is the files and the other is the post data.

files have to used to upload new images and post data stores the files names of the images already being used.

so the fix should be to merge both sets of data.

i'll keep looking into this.

I think I have an idea how to fix it.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by smallpox » Fri Aug 21, 2009 6:11 am

thanks a lot Daniel, appreciate it.

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm

Post by smallpox » Tue Aug 25, 2009 3:19 am

any luck daniel?

New member

Posts

Joined
Sun Mar 29, 2009 2:12 pm
Who is online

Users browsing this forum: Google [Bot] and 104 guests