Jump to content

[SOLVED] Friendly URL not working - Product Categories / Product Variants

Recommended Posts

Hi there!

I have discovered some strange problems with our url structure / friendly url.
Overall its working but in certain cases it is not. 

Shop URL: https://cokocbd.com/
URL to product category: https://cokocbd.com/e-liquidos-28
URL to product: https://cokocbd.com/e-liquidos/super-skank-25
URL to product variant: https://cokocbd.com/e-liquidos/super-skank-25-107#/55-concentracion-300mg

1. Its not really a problem, i am just wondering:
The URL to a category has "-28" attached to it. If i only visit "/e-liquidos" its no longer working. Thats normal right? 

2. URLs to product variants are not working at all. 
In some cases like with the example given it links to a completely different product.
In most other cases it goes to 404 like with this product variant URL: https://cokocbd.com/aceites-cannabis/valeo-care-51-374#/79-concentracion-1500mg
As you can see, it is adding "-374" to the URL which causes it to no longer work. 

3. When adding any product to the shopping cart, the link to the product is not working since its url is including the product variant and therefor it no longer works.

4. The Search Bar is not working because of that. If you search for any product, the suggestion box is using URLs to products that do not work. I guess it is because it is linking to product variants. 

Is there a solution to this?

If not, is there a way to disable product variants showing up in the URL? That would fix it i guess.

Our route to products in Scheme URL is: {category:/}{rewrite}-{id}{-:id_product_attribute}

Thanks in advance! ❤️


Edited by laserloui (see edit history)

Share this post

Link to post
Share on other sites

I was able to fix the problem.
I changed the product route to "{category:/}{rewrite}-{id}{/:id_product_attribute}{ean13}" 

I added the slash (/) before product attribute.
This helped! Now URLs to product variants / product attributes are working.
Don't ask me why. I am just happy it works.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More