Author Topic: Additional files vs additional images  (Read 2820 times)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Additional files vs additional images
« on: February 15, 2011, 20:01:19 pm »
Hi,

Hope someone can shed some light on this one for me.

Today needed to incorporate downloadable PDF files to be associated with certain products. But when I incorporated the outputting of the $file_list variable in the product detail pages we get a listing of all of the additional IMAGES in this same list. For some reason the additional images are being categorised as "isFile" not "isImage". We have hundreds of additional files and it seems that VM's media file manager has decided all these images are not images. As you can imagine this is posing a bit of a challenge. Has anyone encountered this ? Can anyone please offer a possible solution ?

Many thanks in advance.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #1 on: February 15, 2011, 21:58:30 pm »
do you have product files uploaded already?

If not, you can use myphpadmin to update all of them to isImage

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #2 on: February 15, 2011, 22:42:10 pm »
Hi,

Thanks for your reply. I've just uploaded one product file as a test. I'm concerned going forward, as we are constantly adding new product, that additional images are going to continue being classified as isFile, in which case the issue won't actually go away. Is this a known bug ? Is there a way to resolve so that the classification is correct ?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #3 on: February 15, 2011, 23:23:15 pm »
start to upload a file, and see what the drop down is defaulted to
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #4 on: February 15, 2011, 23:54:02 pm »
Default is "additionalImage"

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #5 on: February 16, 2011, 01:59:28 am »
go into your phpmyadmin, and see what the default is set to

vm_product_files    table
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #6 on: February 16, 2011, 09:49:27 am »
Looking at the vm_product_files table the default for "file_is_image" is 0.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #7 on: February 16, 2011, 13:20:54 pm »
1 equals yes

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #8 on: February 16, 2011, 13:50:40 pm »
Thanks for getting back to me. Apologies I'm not really clear on what the best approach is from here.

You say 1 equals yes. Should I change this default in myphpadmin, and if so could you talk me through that please ?

Once this is done then I suppose I should change all current classifications from isFile to isImage as you suggested. Again could you talk me through this part please ?

And going forward, do you think that these steps will resolve the issue with the incorrect classification ?

Thanks again.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #9 on: February 16, 2011, 14:06:53 pm »
1st backup the site before ever making changing to the database.

2nd.

yes change the 0 to a 1.

THEN: do you have csv improved? You can easily change the isImage with a csv upload.



[attachment cleanup by admin]
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #10 on: February 20, 2011, 22:55:15 pm »
Thanks Banquet - that all worked a treat - thank you so much.

One additional question - is there a way to ensure with new installs that the default file_is_image setting is correct ? I don't believe we ever altered this

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #11 on: February 21, 2011, 01:05:57 am »
Mine has never defaulted to file. So i dunno
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #12 on: February 21, 2011, 18:02:01 pm »
While the isImage and isFile classification now seems to be correct, I have ended up with duplicate additional images, as much as 4 or 5 of the same additional image duplicated!!

I've taken a look at the database and there are duplicate entries there, so somehow the change of the value for product_is_file from "0" to "1" has resulted in duplicates being created.

Resolving the duplicates though is proving to be an issue. Deleting a duplicate is resulting in a deletion of the original file and thumbnail !! So at present the only option appears to be unpublishing the duplicates in the filemanager, which is proving to be very labour intensive.

Question - is this normal that one cannot delete duplicates in the file manager without deleting the original image files ?

Grateful for any help/advice.

Many thanks


PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10322
  • VirtueMart Version: 3+
Re: Additional files vs additional images
« Reply #13 on: February 21, 2011, 18:33:54 pm »
seems like you should have went the csvimproved route
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

qme1ster

  • Jr. Member
  • **
  • Posts: 276
Re: Additional files vs additional images
« Reply #14 on: February 21, 2011, 19:52:52 pm »
Forgive me for saying this banquettables, but that's not particularly helpful to me right now. Moreover, how is the use or non-use of csvimproved related to what seems like poor functioning of the file manager ? Would be grateful for any suggestions for moving forward from my current situation.

Thanks in advance