Jump to content

How do I find and export all product URLs? Solved.


Recommended Posts

How do I find and export all of the product URLs, can I use phpmyadmin to do it, if so, how?

 

I would like to create a csv file with the product ID, category, name and product URL. The only thing I can't find is the product URL, please help.

 

Thanks Stoosh

Edited by stoosh (see edit history)
Link to comment
Share on other sites

If you have turned OFF friendly URL's, it's pretty straightforward:

 

http://www.yourdomain.com/index.php?id_product=1&controller=product

 

Where you can change the 1 into the id_product number for every product.

 

 

If you have turned on friendly URL's, it's a little more complicated:

example: http://www.yourdomain.com/summer-dresses/7-printed-chiffon-dress.html

 

Here,

summer-dresses is the default category for the product, all lower case, with spaces replaced by '-''s

7 is the id_product of the product

printed-chiffon-dress is the product name, all lower case, with spaces replaced by '-''s

 

post-455771-0-45230100-1428467892_thumb.png

 

the rest of the characters are fillers, like '/' and '-' between the three parts, '.html' at the end etc.

 

If you also use ean13, that that will be added at the end, after the product name part, separated with a '-' again

 

You can remove the ean13 or modify the URL in Preferences->SEO & URL's, when Friendly URL's is turned ON (scroll all the way down, there you see the definition of the product URL, among others)

 

Hope this helps,

pascal.

Link to comment
Share on other sites

I have attach a sample excel file that should help you find your product URLs if you are using friendly URLs.

 

Just edit the content of cell D1 for your website domain and/or folder.

 

Drag cell D1 down from the bottom right corner and you will see how it works.

 

To use your own data complete column A1, B1 and C1 (do not delete row 1).

 

 

Stoosh

 

prestashop-product-URL-creation.zip

Link to comment
Share on other sites

  • 3 years later...
On 8/4/2015 at 6:36 AM, PascalVG said:

Here,

summer-dresses is the default category for the product, all lower case, with spaces replaced by '-''s

7 is the id_product of the product

printed-chiffon-dress is the product name, all lower case, with spaces replaced by '-''s

post-455771-0-45230100-1428467892_thumb.png

 

Hi I found this post for export correct and complete URL for any products.

But I cannote combine it with a SQL query.. can anyone hel me please?

Thanks

Link to comment
Share on other sites

  • 8 months later...

This query will show your product url with your default category and product id in (should work for most shops using prestashop 1.6)

You might have to change your table prefix to whatever yours is, i.e. change this bit "ps"

 

SELECT
ps_product.id_product,
ps_product.id_category_default,
ps_product.active,
ps_product_lang.link_rewrite,
ps_category_lang.link_rewrite,
CONCAT("https://YOURWEBISTE.co.uk/", ps_category_lang.link_rewrite, "/", ps_product.id_product, "-",ps_product_lang.link_rewrite,".html") AS ConcatenatedString
FROM
ps_product
INNER JOIN ps_product_lang ON ps_product.id_product = ps_product_lang.id_product
INNER JOIN ps_category_lang ON ps_product.id_category_default = ps_category_lang.id_category

  • Thanks 1
Link to comment
Share on other sites

  • 1 year later...
On 4/18/2015 at 1:05 AM, stoosh said:

I have attach a sample excel file that should help you find your product URLs if you are using friendly URLs.

 

Just edit the content of cell D1 for your website domain and/or folder.

 

Drag cell D1 down from the bottom right corner and you will see how it works.

 

To use your own data complete column A1, B1 and C1 (do not delete row 1).

 

 

Stoosh

 

prestashop-product-URL-creation.zip 6.21 kB · 133 downloads

Thank you very much for your comments! It has helped me a lot! 

One thing that might be useful to others: I didn't have the category of the products, so I just omitted it on the formula, and the product URL works fine also!

like this: www.”yourURL.com”/”ID-product-name.html”

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...