Manual SEO URLs & Titles

Fra Ukjent
Medlem siden

Hello everybody!

Is it possible to set SEO urls manually? I'm going to make e-shop in russian, and automatic urls are not working here - all I get is ""-i-5"" and ""-c-3/1-p-5"". I believe I could ""teach"" litecart russian but I don't want to get transliteration. (Oh, I see in 1.3.1 it is already done!) Besides, if I'll do english (or different language) version of the shop I like the urls for the same products to be identical. This function is realized in almost every e-commerce software. I know that automatic urls is a litecart thing but I'd like to have an option to do it manually. How can I do it?

Main Crew
Fra Sweden
Medlem siden

Sorry, reply went to the wrong thread.

To rewrite urls and routes you must rewrite includes/routes/url_product.inc.php

The reason why this is not made already is that the gain is purely cosmetic.

  • You will need one rewrite rule for each product to route
  • You will lose all ability to migrate urls in the future as every link is unique of it's own
  • This will have a cost on performance

And the win?
We have so far seen no references for that custom permalinks is causing better traffic.

Fra Ukjent
Medlem siden

But how at least NOT to include in auto-generated product title subcategory?

Now we have:
Product name | Subcat 1 | Subsubcat 1 | Sitename

I need only:
Product name | Sitename

And where do I change "|" symbol ?

tim
Founder
Fra Sweden
Medlem siden
tim

If you are refering to the head title and not the URL, see pages/product.inc.php where it appends data to document::$title. You could also lastly overwrite the variable:

document::$title = array('My one and only title');

See lib_document.inc.php for the delimiter |.

Fra Ukjent
Medlem siden
document::$title = array - no such string there
tim
Founder
Fra Sweden
Medlem siden
tim

No it's not supposed to be there. That was an example how to overwrite all previously set titles. Play with pages/product.inc.php.

LiteCart Fan
Fra United Kingdom
Medlem siden

I'm struggling with this also!

Product name | Subcat 1 | Subsubcat 1 | Sitename

I need only: "Product name" in Meta Titles tag

else Google cuts off your title tags because these are too long in searches

anyone with fix please let us know :)

Main Crew
Fra Sweden
Medlem siden

If you wanna reset the head title trail simply add the following line in pages/product.inc.php:

document::$snippets['title'] = array();

before the actual title is appended:

document::$snippets['title'][] = $product->head_title[language::$selected['code']] ? $product->head_title[language::$selected['code']] : $product->name[language::$selected['code']];
LiteCart Fan
Fra United Kingdom
Medlem siden

Perfect! Thanks

This thread has been closed due to long inactivity. Posting to it is not possible.
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.