Inhalte aufrufen

Change product URL to include full category hierarchy


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
9 Antworten zu diesem Thema

#1 Guest_nickh_*

Guest_nickh_*
  • Guests

Geschrieben: 20 November 2014 - 13:19

Hi all,

 

I'm working with v2.0.2 and have run into an issue...I'm wanting to change all product URLs to include the category hierarchy.  E.g.  change www.test.com/my-product   to   www.test.com/my-category-name/my-product

 

I found this article which details exactly how to do this in NOP, but I was hoping that this functionality was already supported in SmartStore.

 

What is the easiest way to achieve this?  Do I really need to make a code change (which would then be lost when I updated smartstore version), or could I write DB scripts to update all products in UrlRecord table to include their parent category (and grand-parent category, if necessary)?



#2 Chris_tian

Chris_tian

    Senior Benutzer

  • Members
  • 1017 Beiträge

Geschrieben: 20 November 2014 - 17:01

I would also prefer this.


CS BikeWear


#3 Guest_nickh_*

Guest_nickh_*
  • Guests

Geschrieben: 21 November 2014 - 12:24

Please could someone working on the SmartStore code base reply?...This missing functionality is clearly an over-sight and in high demand due to SEO benefits...



#4 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3801 Beiträge

Geschrieben: 21 November 2014 - 12:30

I created an issue for it.


Marcus Gesing

Smartstore AG


#5 Guest_nickh_*

Guest_nickh_*
  • Guests

Geschrieben: 21 November 2014 - 13:23

Thanks.  Do you know which release version this is likely to be in?

 

In the mean time, how would you suggest I get around this problem?  Was I right in thinking that I could just hack the slug in the UrlRecord table for all existing products (and manually update it after each new product is added), or will that have other implications?



#6 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 21 November 2014 - 17:33

I'm afraid that won't work, because slashes in a slug are considered to beinvalid at the moment.


Murat Cakir
SmartStore AG


#7 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 21 November 2014 - 23:20

Good news! I managed to implement this... in a few minutes  :D  Backgound is: we massively changed the routing mechanism for V2.1. And a very positive side effect of this - one that I even didn't realize when I changed the code - is how easy it would be now to support hierarchical SEO slugs. Well, here it is... final release is scheduled for next week BTW. Have fun.


Murat Cakir
SmartStore AG


#8 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 21 November 2014 - 23:27

I forgot: the application makes NO attempt to precreate a hierarchical slug for you. This is something that you have to edit manually in Backend > [Product] > SEO > Search engine friendly page name.


Murat Cakir
SmartStore AG


#9 Chris_tian

Chris_tian

    Senior Benutzer

  • Members
  • 1017 Beiträge

Geschrieben: 22 November 2014 - 08:47

Nice!


CS BikeWear


#10 Guest_nickh_*

Guest_nickh_*
  • Guests

Geschrieben: 22 November 2014 - 09:41

Excellent!  Thanks very much.