Jump to content
  • 0
selin

About Link re-write (Migration)

Question

Hello,

I use a private e-commerce script but I'll migrate it to Prestashop.

Now I'm importing products to Prestashop, everything is okay. I'm confused about product links.

  • As you know, Prestashop default links: {category:/}{id}{-:id_product_attribute}-{rewrite}{-:ean13}.html
  • URL of my current script: just = /rewriteName-PiD
    such as: mysite.com/product-name-546 (546 is product id.)

I don't want to lost my Google indexes. :( What should I do for this?

Thanks a lot.

Best regards. 

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

As far as I know only id, attribute and rewrite are mandatory, so you should be able to get same link by using

  {rewrite}-{id}{:id_product_atttribute}

Share this post


Link to post
Share on other sites
  • 0

this is simple, you need to map the old to the new.  they were going to change anyway.  I recommend this module:

https://addons.prestashop.com/en/url-redirects/11399-301-302-303-url-redirects-and-404-seo.html

then you can upload .csv.  From that point on you can add redirects as you find them.  We use screaming frog on old shop and then manually match to new shop which works if not to many products.  Note:  you can also get your new shop  urls via screaming frog or (tip: run sitemap to get links in xml).

....Note:  I do not recommend 'pretty urls', this changes native and while it might see like good idea it never is lol.  voodoo

hope this helps...

e

 

 

Share this post


Link to post
Share on other sites
  • 0

Hello Selin,

if your products don't have atribute chance like this.

{id_product_attribute}{rewrite}-{id}

if your products have a atribute you have chance some codes in prestashop classes. do you have ?

 

Share this post


Link to post
Share on other sites
  • 0
10 hours ago, safa said:

Hello Selin,

if your products don't have atribute chance like this.

{id_product_attribute}{rewrite}-{id}

if your products have a atribute you have chance some codes in prestashop classes. do you have ?

 

Hello Safa,

Yes I have a lof products  and they have some attributes. Can u explain pls. ?

 

12 hours ago, JBW said:

As far as I know only id, attribute and rewrite are mandatory, so you should be able to get same link by using

  {rewrite}-{id}{:id_product_atttribute}

No,

Not just {id}. Also, {:id_product_atttribute}

Share this post


Link to post
Share on other sites
  • 0
12 hours ago, El Patron said:

this is simple, you need to map the old to the new.  they were going to change anyway.  I recommend this module:

https://addons.prestashop.com/en/url-redirects/11399-301-302-303-url-redirects-and-404-seo.html

then you can upload .csv.  From that point on you can add redirects as you find them.  We use screaming frog on old shop and then manually match to new shop which works if not to many products.  Note:  you can also get your new shop  urls via screaming frog or (tip: run sitemap to get links in xml).

....Note:  I do not recommend 'pretty urls', this changes native and while it might see like good idea it never is lol.  voodoo

hope this helps...

e

 

 

Hello Dear El Patron,
It's okay but I have a lot of products. (Maybe 6.000) Is this suggestion logical still? (for Performance or for another thing?)

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, selin said:

Hello Dear El Patron,
It's okay but I have a lot of products. (Maybe 6.000) Is this suggestion logical still? (for Performance or for another thing?)

There really is no magic bullet.  To be honest we did large url migration and unless you can write scripts to build the rewrites....it's a very time consuming effort.  They hired us just for that bit of work and to big dog review their new shop.  

best case scenario is you can keep same URI's....from old to new for say cat products, in which case you would need to investigate module for PS that could support non-native url's, i.e. with id's.  

note: problem with url 301 rewrite module above is it does not keep a counter of hits...then you would  know if used, last used or if ever used.  

maybe give example of existing product link as we already know what a native ps link looks like lol.  Then maybe we come up with something. :)

 

el

Share this post


Link to post
Share on other sites
  • 0
On 12/7/2018 at 6:41 PM, El Patron said:

There really is no magic bullet.  To be honest we did large url migration and unless you can write scripts to build the rewrites....it's a very time consuming effort.  They hired us just for that bit of work and to big dog review their new shop.  

best case scenario is you can keep same URI's....from old to new for say cat products, in which case you would need to investigate module for PS that could support non-native url's, i.e. with id's.  

note: problem with url 301 rewrite module above is it does not keep a counter of hits...then you would  know if used, last used or if ever used.  

maybe give example of existing product link as we already know what a native ps link looks like lol.  Then maybe we come up with something. :)

 

el

Okay,

Let's start! :)

First question is basic:

How can I do insert a product with a specific ID? (I want to keep product's id as original). Like this: X product id = 234 at old DB, I want to insert to P.S with 234. (just for XML import)

My codes for insert:

$product 				= New Product();
$name 					= (string)$xml->name;
..
bla bla
..
$product->save();

If I send id product such as Product($id_product), it will be updated.

I think; If I can keep IDs the same, I can re-direct all  product url types and it will be okay. ? :)

 

In addition to these, the URL sets like this at old script:

elpatron.com/baby-set-red--3041 (uniqe product ID)

Thanks a lot! :)

Edited by selin

Share this post


Link to post
Share on other sites
  • 0

Hi, look at .csv import capability of PrestaShop.  There you can specify a product id but I would have to ask one of my team on a sunday lol.  I do not   if you can 'add' a product with specific id.  

Recommend  opening a new topic on how to import products and specifying their product id.  Posts link to that post here if you like.  

Share this post


Link to post
Share on other sites
  • 0
5 hours ago, El Patron said:

Hi, look at .csv import capability of PrestaShop.  There you can specify a product id but I would have to ask one of my team on a sunday lol.  I do not   if you can 'add' a product with specific id.  

Recommend  opening a new topic on how to import products and specifying their product id.  Posts link to that post here if you like.  

Okay,

I opened it at here.

Well, can I change URL set to patron.com/link-rewrite-pID ?

Thanks!

Edited by selin
link

Share this post


Link to post
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

×

Important Information

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