1. garikello
  2. RO CSVI
  3. Saturday, 13 May 2017
  4.  Subscribe via email
My XML file generator for Virtuemart product export is working wrong lately.

I noticed that newly added products in their thumb image link have the phrase Default URL in them...

For example:
it should be like this:
domainname/images/stories/virtuemart/product/resized/AG_kopa [LYNXGEAR]_0x180.jpg

but new products now have this link:
domainname/(Default URL) images/stories/virtuemart/product/resized/IMG_1119_LYNXGEAR_0x180.jpg

Strange enough, old products have their links correct, only new ones, and not all of them, has this.

Looked through the settings, I didn't see, where this could be set.
Accepted Answer Pending Moderation
Hello,
VirtueMart product export gets what is saved in the database for products, how is your file_url_thumb values saved in your #__virtuemart_medias for new products? Can you post a screenshot of it?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Hmm, you are correct, database has the phrase in it.
https://www.screencast.com/t/VQFmfQOezn

Any ideas, how it got there? I found something in VM forums... researching that.
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
Can you tell me how you added those new products and their images? Which version of VirtueMart, CSVI you are using?
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Products are added manually
VirtueMart 3.2.1
Joomla! 3.7.0 Stable [ Amani ] 25-April-2017 15:36 GMT
PHP Version 7.0.18 .
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello,
Check your VirtueMart configuration page and on Templates tab the settings you have for media. If its all set up correct then i would suggest you to post the question on VirtueMart forum.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
VM forums don't give solution. As I understand, there has been a change since last big update.

There is no no field for thumb url anymore..

"all thumbs are rendered/displayed by a function so u can have as many different sized thumbs as u want

the thumb url field is just left there and serves no VM purpose except information

simplest would be to hack the CSVI VM plugin to remove the (Default URL) .. but check first for any update.. he may have done this already"

This is what I got from one of the VM support guys.
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hello,

Thank you for the feedback.

the thumb url field is just left there and serves no VM purpose except information
If it supplies information it still serves a purpose ;)

Not sure which "big update" as every release seems to be a big update :) I am going to take a look at what is happening now. Do you have a link to the forum post on the VM forum you are referring to?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Sorry, this was from my correspondence with John from GJC Web Design... ;)
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello,

Here are my findings using VirtueMart 3.2.2 and it seems to contradict what John is saying. Using the image name joomla.png as an example and the width is set to 0 and height is set to 90.

Dynamic thumbnail resizing enabled
The file_url_thumb field is empty, VM looks for an image in the resized folder with a name of joomla_0x90.png. If the image is not found a new thumbnail is generated from the file_url image. The 0x90 comes from the settings in VirtueMart for the width and height.

The file_url_thumb field is not empty. VM will show the image that is set in the file_url_thumb field.

Dynamic thumbnail resizing enabled
The file_url_thumb field is empty, VM will show the general image of /components/com_virtuemart/assets/images/vmgeneral/filetype_jpg.png although this file doesn't exist in the VM distribution. So in my case it won't show any image at all.

The file_url_thumb field is not empty. VM will show the image that is set in the file_url_thumb field.

I was not able to get the (Default URL) to be saved to the database from editing the VirtueMart product.

This is how it works for me with VirtueMart 3.2.2.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
OK, I see.

So, if I cannot call the field from database for thumb url, how do I setup CSVI for XML file generation?
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello,
We are checking on this issue, will keep you posted.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Hello,

One more question from my side. I now understand your question, that if the file_url_thumb field is empty, you are not getting a thumbnail in your export. So now the 1 million dollar question becomes, what to do?

As you can see from my analysis there is a bunch of ways VirtueMart responds to an empty file_url_thumb field also based on the global settings of VirtueMart. Now I totally understand that we need to get something out but what is the question. I do not believe that CSVI should be creating the thumbnail during export. CSVI should check if the automatic resizing is enabled in VirtueMart based on that export the appropriate value. This would also mean an empty value if automatic resizing is disabled and the file_url_thumb field is empty. When the automatic resizing is enabled and the file_url_thumb is empty, CSVI will construct an image name based on the resize settings of VirtueMart.

How does that sound?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
No, the main issue is that VM somehow puts the phrase "Default url" before the link in the thumb_url field.
Resizing is on. Thumbs are created and in webpage it self everything works.
This phrase is in the database as well. This is the reason, why CSVI gets it in the links of thumbs in the exported file.

I need to get rid of that "Default url" phrase. As I understand, that can be done if I find the source, what is making it there, or CSVI could clean the links.
I see in VM forums I am not only one with same issue. No one announced, what is causing the phrase to appear there.

So perhaps you can make a code for cleaning the url?
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
Hello,

I need to get rid of that "Default url" phrase. As I understand, that can be done if I find the source, what is making it there, or CSVI could clean the links.
That would mean CSVI needs to "fix" a VirtueMart bug :)

The easiest way is to empty the file_url_thumb value in the database with a single query.
UPDATE jos_virtuemart_medias SET file_url_thumb = '';
replace jos with your own prefix.

You can't consistently reproduce how the "Default url" ends up with a thumbnail?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
I really have no idea, how that phrase gets there.

Every new product has it.
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,
Did the query Roland posted helped? You should be having file_url_thumb empty in your table after running the query.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hello,

Look at what I found in the VirtueMart code regarding this issue:
//Nasty small hack, should work as long the word for default is in the language longer than 3 words and the first
//letter should be always / or something like this
//It prevents storing of the default path
$a = trim(substr($this->file_url_thumb,0,4));
$b = trim(substr(vmText::_('COM_VIRTUEMART_DEFAULT_URL'),0,4));
They even call it a nasty hack themselves :blink: This code means that the thumbnail path is not matching the language strings and as such it is being stored.

I put a space before the (Default URL) and it is also being stored. They really should refactor this to a checkbox or something that is ticked indicating the default URL is used.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 17
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!