View Single Post
  #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