Manual SEO URLs & Titles

From Necunoscut
Member since dec. -0001

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
From Sweden
Member since feb. 2013

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.

From Necunoscut
Member since dec. -0001

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
From Sweden
Member since mai 2013
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 |.

From Necunoscut
Member since dec. -0001
document::$title = array - no such string there
tim
Founder
From Sweden
Member since mai 2013
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
From United Kingdom
Member since mar. 2016

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
From Sweden
Member since feb. 2013

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
From United Kingdom
Member since mar. 2016

Perfect! Thanks

Acest thread a fost închis din cauza inactivității îndelungate. Postarea pe acesta nu mai este posibilă.
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.