FROM CACHE - en_header

Return management just got easier! We’ve launched Customer Self-Serve Returns to all Shopify merchants. Click here to learn more!

how to remove shopify product url variant at the end of the url?

jamesdemongin
Tourist
14 0 0

hi 
i want to remove the variant=1234567 from my url pages. my product pages do not have multi variants and my url looks bad.  working on palo alto theme

 

https://acpcovers.com/products/bimini-top-replacement-6-ft-42-inch-68-72-inch?variant=44240919593243...

 

url.jpg

Replies 2 (2)
Niyeepo
Excursionist
201 14 24

There are a few ways to remove the variant parameter from your product URLs. One way would be to use a URL redirect to remove the variant parameter and redirect users to the URL without it. This can be done using a plugin such as "Redirection" or by modifying your .htaccess file.
Another way is to modify the theme's code, specifically the code that generates the URLs for the product pages, to exclude the variant parameter. This will require some knowledge of the theme's code and making the modification to the appropriate file.
Please note that it's important to make a backup of the theme files before making any changes, and also test the changes on a development environment before implementing them on the live site.

5diamond
jamesdemongin
Tourist
14 0 0

i was think i could edit this code? this is what i was looking at:
file name3.pngfile name2.pngfile name4.png