News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Slugs in products

Started by niosme, September 21, 2023, 14:34:12 PM

Previous topic - Next topic

niosme

slugs inside products is deriving from whatever language we type in the product name.
Why you are not using the joomlas default slug title creator which makes it easy for every language?

Now if you have arabic it will make a slug in product or in category with arabic. If we have chinese it will make a slug in url with chinese.With greek it will make it with greek characters which is a bad thing.Currently virtuemart handles only english language good.
Why you dont use the joomla's default behavior for that which handle it like a charm?

$item->slug = Joomla\CMS\Application\ApplicationHelper::stringURLSafe($item->slug);

or also this can be used

$item->slug = Joomla\CMS\Filter\OutputFilter::stringURLSafe($item->slug);

More specific inside adminsitraor/com_virtuemart/helpers/vmtable.php at line 1741 and 1742 replace with this code

$this->{$slugName} = Joomla\CMS\Filter\OutputFilter::stringURLSafe($this->{$slugName});

and it will work like a charm.

Thanks in advance.
Fullstack Developer and Joomla Expert

niosme

Can this be inserted please?
Its quite anoying and easy to be fixed in the right way with the code above.

Thanks in advance!
Fullstack Developer and Joomla Expert