Inhalte aufrufen

Profilbild

Product Category in URL

category url product

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

#1 leonidas_fs

leonidas_fs

    Newbie

  • Members
  • Punkt
  • 3 Beiträge

Geschrieben: 31 August 2016 - 10:05

Hello everyone,

I am going to host a e-shop with electronics, so I would like to know if there is a way to customize the URL of my website so it will be like:  www.domainname.com/category/product

 

Now once you enter a category and your click on a product, the URL automatically goes like:

www.domainname.com/product

 

 

 

Thank you!



#2 Wolfgang Schmerge

Wolfgang Schmerge

    SmartStore AG

  • Administrators
  • 2449 Beiträge

Geschrieben: 31 August 2016 - 10:44

Hi,

 

welcome to our forum.

You can enter any url alias in the product details.

 

Regards

 

Wolfgang

Angehängte Bilder


Shopbetreiber benötigen Ihre Hilfe! Bewerten Sie jetzt Smartstore auf Capterra.

Als Dankeschön erhalten Sie 20 Euro für Ihren nächsten Kauf im Marketplace.

Smartstore bewerten


 

Bleibt gesund!

 

Viele zusätzliche Smartstore Plugins gibt es im MARKETPLACE:
http://community.sma...dex.php?/files/

 

Hier geht es zu den Smartstore Videos:
Smartstore.NET Youtube-Channel
 

Die deutsche Smartstore Online-Dokumentation gibt es hier:
https://smartstore.a...iew?mode=global

In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "Smartstore":

http://community.sma...t-tipps-tricks/

 


#3 leonidas_fs

leonidas_fs

    Newbie

  • Members
  • Punkt
  • 3 Beiträge

Geschrieben: 31 August 2016 - 11:24

Hello,

But how can i add the category before the product on the URL? 
So for example it will be: games/assassins-greed-iii ?

 

Here is my eshop to check what i am talking about.

If you navigate on a category, the URL is like: domainname/category

However if you click on a product, it goes like: domainname/product-url, while I want to be domainame/category/product-url



#4 Wolfgang Schmerge

Wolfgang Schmerge

    SmartStore AG

  • Administrators
  • 2449 Beiträge

Geschrieben: 31 August 2016 - 11:37

Hi,

 

yes, like this example:

plugadaptors/assassins-creed-iii

 

Regards

 

Wolfgang

Angehängte Bilder


Shopbetreiber benötigen Ihre Hilfe! Bewerten Sie jetzt Smartstore auf Capterra.

Als Dankeschön erhalten Sie 20 Euro für Ihren nächsten Kauf im Marketplace.

Smartstore bewerten


 

Bleibt gesund!

 

Viele zusätzliche Smartstore Plugins gibt es im MARKETPLACE:
http://community.sma...dex.php?/files/

 

Hier geht es zu den Smartstore Videos:
Smartstore.NET Youtube-Channel
 

Die deutsche Smartstore Online-Dokumentation gibt es hier:
https://smartstore.a...iew?mode=global

In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "Smartstore":

http://community.sma...t-tipps-tricks/

 


#5 leonidas_fs

leonidas_fs

    Newbie

  • Members
  • Punkt
  • 3 Beiträge

Geschrieben: 31 August 2016 - 11:42

Ok thank you for your reply!

Is there any way to make the change on bulk?



#6 Wolfgang Schmerge

Wolfgang Schmerge

    SmartStore AG

  • Administrators
  • 2449 Beiträge

Geschrieben: 31 August 2016 - 11:48

Hello,

 

unfortunately not.

 

Regards

 

Wolfgang


Shopbetreiber benötigen Ihre Hilfe! Bewerten Sie jetzt Smartstore auf Capterra.

Als Dankeschön erhalten Sie 20 Euro für Ihren nächsten Kauf im Marketplace.

Smartstore bewerten


 

Bleibt gesund!

 

Viele zusätzliche Smartstore Plugins gibt es im MARKETPLACE:
http://community.sma...dex.php?/files/

 

Hier geht es zu den Smartstore Videos:
Smartstore.NET Youtube-Channel
 

Die deutsche Smartstore Online-Dokumentation gibt es hier:
https://smartstore.a...iew?mode=global

In dem folgenden BLOG findet man interessante Tipps & Tricks zum Thema "Smartstore":

http://community.sma...t-tipps-tricks/

 


#7 nickh

nickh

    Erfahrener Benutzer

  • Members
  • 129 Beiträge

Geschrieben: 06 September 2016 - 14:35

There actually is a fairly easy way to do this in bulk, but it involves writing some SQL:

 

UPDATE
UrlRecord SET Slug = categoryUrl.Slug + '/' + u.Slug
  FROM [SmartStore].[dbo].[Product] p
  inner join [SmartStore].[dbo].Product_Category_Mapping pcm ON pcm.ProductId = p.Id
  inner join [SmartStore].[dbo].Category c on c.Id = pcm.CategoryId
  inner join UrlRecord u on u.EntityId = p.Id AND u.EntityName = 'Product'
  inner join UrlRecord categoryUrl on categoryUrl.EntityId = c.Id AND u.EntityName = 'Category'
 
 
(I don't have a DB to test this on at the moment so there may be bugs with the above SQL).  Run it in a transaction (with rollback), and a "select * from UrlRecord" before and after, to see the results.
 
Hope this helps you see what I mean.



Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: category, url, product