2

We are having a URL issues

For Example -

If Title = Bose® SoundLink™ 10 Wireless Music System

Then URL = bose-soundlink-10-wireless-music-system

But in our new website URL is - boser-soundlinktm-10-wireless-music-system


We need Bose® = bose and SoundLink™ = soundlink

How to exclude ® ™ signs in URL

Please suggest!

Thanks

0
$product_url = $product->getProductUrl();

$replace = array(' ','!', '@', '#', '$', '%', '^', '&', '*', '_', '.','(', ')', '=', '+', '?','®', '/', '<', '>', '|', '`', '~','™');

$updated_product_url = strtolower(str_replace($replace, '-', trim($product_url)));

You need to do this process in the proper steps. Then, You can use this $updated_product_url variable as your product url.

  • Do we have to update this in every page? – Rachna Thakur Jul 17 '18 at 8:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.