Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Clean URLs in 5.2.5

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #11  
Old 06-16-2015, 05:36 AM
 
mohammadUMAR mohammadUMAR is offline
 

Member
  
Join Date: May 2008
Posts: 25
 

Default Re: Clean URLs in 5.2.5

Hi Tony,

Thanks for understanding.

How about the frontpage issue? Its not resolved yet.

Regards,
Umar
__________________
Mohammad UMAR
X-Cart Business 5.2.5
Reply With Quote
  #12  
Old 06-16-2015, 11:00 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Clean URLs in 5.2.5

@mohammadUMAR,

1) I just talked to the team and we come up with the following solution for SEO-friendly URLs:

We will remove category_id parameter from the URL if a product is assigned to a single category. If it is assigned to multiple categories, this parameter (category_id) will still be added in order to allow breadcrumbs and next/previous product links work properly.

2) As for Front Page, the text marked on my snapshot
https://i.imgur.com/eOhonn0.png

is defined in the Catalog > Front Page > Description section in X-Cart's admin area. So if you want to change it, you change it there.

If for some reason, such change does not affect your home page, this problem requires a thorough investigation and I would recommend you contacting our support team at support@x-cart.com.

Thank you.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #13  
Old 06-17-2015, 08:48 AM
 
bob@n-flatables bob@n-flatables is offline
 

Member
  
Join Date: Nov 2012
Posts: 26
 

Default Re: Clean URLs in 5.2.5

Quote:
Originally Posted by tony_sologubov
@mohammadUMAR,

1) I just talked to the team and we come up with the following solution for SEO-friendly URLs:

We will remove category_id parameter from the URL if a product is assigned to a single category. If it is assigned to multiple categories, this parameter (category_id) will still be added in order to allow breadcrumbs and next/previous product links work properly.


Tony

I don't think this is the best approach. Perhaps instead there should be a primary category, and the additional categories.

For instance, we have a product that is primarily associated with a single category. However, it is also in a category for products approved for a certain geographical region. The primary category should create the cleanURL, but that product should be able to be accessed from additional categories.

It's very rare we have a product in only one category.

Before 5.2.5 it use to dynamically assign a URL based on whatever category it was accessed from. Not sure if this is best practice, but it was far more user-friendly.
__________________
X-cart v 5.2
Reply With Quote
  #14  
Old 06-18-2015, 02:51 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Clean URLs in 5.2.5

Quote:
Originally Posted by bob@n-flatables
I don't think this is the best approach. Perhaps instead there should be a primary category, and the additional categories.

For instance, we have a product that is primarily associated with a single category. However, it is also in a category for products approved for a certain geographical region. The primary category should create the cleanURL, but that product should be able to be accessed from additional categories.

It's very rare we have a product in only one category.

Before 5.2.5 it use to dynamically assign a URL based on whatever category it was accessed from. Not sure if this is best practice, but it was far more user-friendly.

First of all, you can return prior-5.2.5 functionality if you go to etc/config.php file and define the use_canonical_urls_only option as Off, i.e.
Code:
use_canonical_urls_only = Off

Could you please let me know why is the approach of adding category_id parameter is bad for you? What is particularly bad in it?

Thank you.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #15  
Old 06-18-2015, 05:19 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Clean URLs in 5.2.5

mydomain.com/this-is-test-page.html

mydomain.com/this-is-test-page.html?category_id=4005

They are called user-friendly for a reason. First one is, second one is not. I can't really say how bad this second one SEO-wise but it looks ugly and not user-friendly at all. With the same success you can have it as

mydomain.com/cart.php?target=product&product_id=34&category_id= 4005 - what's the difference right...

After all the goal of having html urls is to have html urls not html urls with dynamic parameters
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #16  
Old 06-23-2015, 06:32 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Clean URLs in 5.2.5

Hi Steve,

Frankly, there is a huge difference between URLs:

mydomain.com/this-is-test-page.html?category_id=4005
mydomain.com/cart.php?target=product&product_id=34&category_id= 4005

First one is far more readable that other one. However, I agree that adding category_id makes it less pretty. On the other hand, if you want to assign a product to multiple categories, then it is logical that when you want to share a link to the product, it must be opened in a particular category not in default/random one, right?

I.e you have product Chianti and it belongs to categories Wines and Shop by country > Italy > Toscana. Then, a shopper can give this link to a friend with words "Hey I've found a decent wine" and this link will open the product in Wines category. Or shopper can share this link with words "Hey, they added Chianti to products from Toscana" and then the product must be opened in the Toscana sub-category.

Defaulting product to one of those categories will not solve the problem.

In this case, we have to somehow let X-Cart know that it must display this product in particular category. Previously, this info was passed in the structure of the URL:
Code:
http://domain.com/category/sub-category/product.html

But people complained about it, so we changed it to be:
Code:
http://domain.com/product.html?category_id=12

And this seems to be not the best approach either. So, my question is how do you like to work then?

Thank you.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #17  
Old 06-23-2015, 06:49 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Clean URLs in 5.2.5

Tony,
I appreciate the point you have here. How to cover all the bases, and it looks tricky.

From an SEO perspective, we know Google does not want duplicate content. The same content accessible from different URLs. Canonical tag helps but I am not sure that it is as powerful as removing alternate URLs.

Personally I would want one URL per product. As we know everyone will have a different opinion.

So, why don't we give them options. 3 options:
1. Always redirect to canonical URL. (In this case URL will be main category) This is a checkbox.

If this option is not checked, we present the other two options:
1. Use category based URLS for products. (i.e. Wines/Chianti and Italy/Toscana/Chianti)
2. Use dynamic categoryid in URL ( chianti.html?categoryid=12 )
This is a select box or radio.

I still maintain that the best structure for SEO is mydomain.com/Wines/Chianti.html, but I would not want the product to also be accessible from mydomain.com/Italy/Toscana/Chianti.html

So I would choose the first option I described above.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #18  
Old 06-23-2015, 06:54 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Clean URLs in 5.2.5

Quote:
Frankly, there is a huge difference between URLs:

mydomain.com/this-is-test-page.html?category_id=4005
mydomain.com/cart.php?target=product&product_id=34&category_id= 4005

I agree, I was just trying to emphasize the problem.

I am probably not the right person to tell you what is good/best for SEO, there are others well more professional in this to answer the question. From customer point of view I'd rather have

domain/cat/product.html

with canonical url to point to the main url on all variations. To me this follows the site structure.

Why don't you have it both ways and allow admin to select?

Another way would be to include the catid in the clean url instead as a parameter but again you may hear it is bed

domain/product-id.html

Or you can have all 3 as options and admin can select how to have it... Just a thought
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #19  
Old 06-23-2015, 07:29 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Clean URLs in 5.2.5

Steve, once again we are in complete agreement. Stop reading my mind man.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
cflsystems (06-23-2015)
  #20  
Old 06-24-2015, 04:17 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Clean URLs in 5.2.5

Thanks guys for your opinions!

From what I have heard so far, there are two common cases:
1) If each product belongs to one and only category, there should be a single link for a product and it must be the same as canonical one. X-Cart does not work this way, but it will be hotifxed in 5.2.6.

2) If a product can belong to multiple categories, the domain.com/category/subcategory/product.html URL structure is preferable. You can set up X-Cart this way already if you go to etc/config.php and define the option there as follows:
Code:
use_canonical_urls_only = Off

If I forgot about some case, please let me know so we can find out a solution for it.

Thank you.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:13 AM.

   

 
X-Cart forums © 2001-2020