Author Topic: Slugs in products  (Read 160 times)


  • Jr. Member
  • **
  • Posts: 94
  • Fullstack Developer and Joomla Expert
    • Easylogic
  • VirtueMart Version: Latest
Slugs in products
« on: September 21, 2023, 14:34:12 PM »
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