1. atrus
  2. RO CSVI
  3. Wednesday, 15 July 2015
  4.  Subscribe via email
Hi Roland,

Noted an issue when importing VM3 product names which include a " character. More specifically not the whole product_name enters the database but only the name up to the " character.

The weird is that at the VM product List screen, the name is ok:

Twister Front Wiper Blade for Trucks 24" 600mm

But in the Product Edit Screen the product name is:

Twister Front Wiper Blade for Trucks 24

See attached import file and log.

Would appreciate your feedback on this.

Rgrds,
Chris
Accepted Answer Pending Moderation
Hello Chris,

Not really a CSVI issue but rather an incorrect CSV file. By default a CSV file has a comma as field delimiter and a double quote as text enclosure. Since you are not specifying any text enclosure, the system takes the double quote as text enclosure. That is why it stops. A valid CSV line in your case would look like this:
"TFW-24";"trucks-front-wiper-blades";"Twister Front Wiper Blade for Trucks 24"" 600mm"
The 24" is double double quoted because it is a sort of escape character, so the quote remains and you get 24".
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. # 1
Accepted Answer Pending Moderation
Thanks for the tip Roland, had forgotten about the enclosures.

However, even if i changed the enclosure to ^ and used the following syntax:

^product_sku^;^product_name^
^FW-24^;^Twister Flat Wiper Blade-Multi Fit 24" 600mm^

The product name shown in product edit list is still wrong: Twister Flat Wiper Blade-Multi Fit 24

See attached screenshot and log.

If you click at the product link in product edit page you go to the following error page:

http://www.quality-tuning.co.uk/index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=5939&Itemid=451

The weird thing is that in the virtuemart_products table the product_name is correct; it seems that the import works partially perhaps?

Rgrds,
Chris
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hey Chris,

This is not a CSVI but a VM issue. The name is going into the database just fine
`product_name`='Twister Flat Wiper Blade-Multi Fit 24\" 600mm'
and as you can see it in the list and at the top of the page in VM as well. However the edit box breaks it.

I have entered the data into VM directly into the database and I see the same thing happening. Will you excuse me while I go pull out the little hair I have left :crazy:

VM is encoding the data when saving at least the product name. This is funky because when you import the data with CSVI or directly into the database by hand and you view the product, it is all fine.

I will need to investigate when this change happened and how to deal with it.
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. # 3
Accepted Answer Pending Moderation
Thanks Roland,

It's crazy indeed :blink:

I have entered the data into VM directly into the database and I see the same thing happening.


You mean you edited the product name through Product Edit screen in VM3? Because for me this works, i.e. when i click SAVE then it saves correctly in the database and the edit box shows also fine as well as the link.

As this error has messed up thousands of products, would appreciate your priority handling, i'm willing to pay some support for this,

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Chris,

You mean you edited the product name through Product Edit screen in VM3?
No I entered it into the database directly, no edit screens or imports.

Because for me this works, i.e. when i click SAVE then it saves correctly in the database and the edit box shows also fine as well as the link.
That is because the " gets encoded to it's HTML counterpart. So it is stored as
Twister Flat Wiper Blade-Multi Fit 24" blade
. Either you can change your file and replace " with the code
"
or I can make an update of CSVI :) For now I am working on the last option.
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. # 5
Accepted Answer Pending Moderation
Ok i think i have a clue now:

I tried to SAVE using the VM3 Product Edit Screen and it works, so i checked the database and i saw that the name there is saved by VM3 as:

Twister Flat Wiper Blade-Multi Fit 24" 600mm


But when importing using CSVI it shows: Twister Flat Wiper Blade-Multi Fit 24" 600mm

So it seems that VM prefers the HTML Number/Encoding of the symbols in the database to work properly. If this is the case, I guess this is smth that can be fixed in CSVI?

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hey Chris,

That is what I have been trying to tell you :)

So it seems that VM prefers the HTML Number/Encoding of the symbols in the database to work properly.
Apparantly however nothing wrong with all existing solutions.

I am testing a code update, if it works, I will post the patch file.
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
Hey Roland,

I can make an update of CSVI :) For now I am working on the last option.


That's great and the best solution, we have quite a lot of special chars in our import files, it's impossible to change them all :P

I also guess the fix will apply to all imported fields, not only product_name.

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Chris,

It seems this change in VM was already there since 3.0, perhaps nobody has used " in their product names and used CSVI :)

Attached is a patch file that should fix the issue. Can you please confirm?
Attachments (1)
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
Hi Roland,

Yes, it is working now ok for the names, thanks! :)

Only noted the following issue with the alias which is now:

e.g: Product Name: RDX Universal-Alerón Trasero GT-Race "Type 1"
--> Alias : rdx-universal-aleron-trasero-gt-race-34-type-1-34.html

I guess the 34s need to be removed :P

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hey Chris,

It depends if the 34 needs to be removed, maybe you like it :)

The attached patch should fix the alias issue while still dealing with the quotes.
Attachments (1)
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. # 11
Accepted Answer Pending Moderation
Thanks Roland,

Hmm, the alias seems to be fixed but the previous error with the double quote " character came up again.

Tried to delete the cache but to no avail.

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hey Chris,

Ok, third time is a charm they say. This should be all good.
Attachments (1)
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. # 13
Accepted Answer Pending Moderation
Hi Roland,

Ok, third time is a charm they say


Yes it is indeed, problem solved! B)

The only pending for me to check is whether multivariant values with " chars import ok also, if i find any issues i will advise.

Thanks again,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Hello Chris,

Good to hear it works. As for the multi-variant values, I haven't checked but let me know if it needs some massaging.
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. # 15
Accepted Answer Pending Moderation
Hi Roland,

Same issue noted with other characters also, like apostrophe '

The html code is
'


http://www.quality-tuning.co.uk/universal-stainless-steel-exhaust-tip-supersprint-style-144x75-l180-in58.html

You can see in the link above what i mean, slug is ok at least :p

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hey Chris,

Something has gone goofy because if I import single apostrophe now, it is displayed correctly everywhere. The same goes for the ampersand. It has to be because the product_name field is handled the same way everywhere.
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
Accepted Answer Pending Moderation
Hi Roland,

Hope u r well! Noted that the issue comes up again in CSVI 6.1.2, see for example attached test import file.

After import the name in the product edit screen shows as:

RDX Πλαϊνά Μαρσπιέ Peugeot 308 Phase 1 SW (StationWagon) "TurboR"


The alias is ok.

Rgrds,
Chris
Attachments (1)
  1. more than a month ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hello Chris,

All is fine, I hope for you as well.

Oh this is the problem with the crazy conversion we spoke about in 32378. I haven't changed anything in that regard, so I wonder if something changed in VirtueMart. Did you do any update of VirtueMart?

The change we discussed and tested in the other thread is still in place.
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. # 19
Accepted Answer Pending Moderation
Hi Roland,

No update in Virtuemart, strange indeed. Can you verify the issue in your installation?

Rgrds,
Chris
  1. more than a month ago
  2. RO CSVI
  3. # 20
  • Page :
  • 1
  • 2


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