Hi,
Jerry5763837:
hello, conor,
thanks for your quick answer.
You're welcome.
Jerry5763837:
i tried to add a new record to the ceon_uri_mapping table to rewrite
/index.php?main_page=news, but unfortunately failed.
I'll be honest with you, it doesn't appear you spent much time at all reading the instructions?
Jerry5763837:
my settings are as follows:
The URI mapping to be mapped from should be entered in the uri field. (/index.php?main_page=news)
So you want this to be:
/news
Jerry5763837:
The number representing the language ID this URI mapping applies for should be entered in the language_id field. (en)
"The Number representing"
so
1
if your language ID is 1 (if you only have one language that is likely).
Jerry5763837:
The current_uri field should be set to “1” to make this the “current” URI. (1)
Yes, that's right.
Jerry5763837:
The Zen Cart page to be mapped to should be entered in the main_page field. (/news)
/news is a URI not a Zen Cart page but the following is the name of the a Zen Cart page:
news
Jerry5763837:
The date/time this URI mapping was added should be set in the date_added field (or just use the “NOW()” SQL function). (leave as it is)
I would have set it to "NOW()" as that allows the historical mapping to work properly and it only takes 2 seconds to select it from the dropdown!
Jerry5763837:
The query_string_parameters, associated_db_id and alternate_uri fields are not used, they must be left as “NULL”. The redirection_type_code is not used either so it doesn't matter what value it has (it can just be left at the default value of 301). (leave as it is)
could you plesae help to check if any mistake about above settings?
I realise that examples in the docs may make these easier for people so will try to add some for the next version.
I've gone and spent this time to give an example here but **I want to make anyone else who is reading this aware that I won't giving site-specific examples here frequently, I don't have the time, **so please don't ask! (Sorry but life is too short to be so generous with time ;) )
Jerry5763837:
if also wan to rewrite /index.php?main_page=news_article&article_id=1 to /news/article_title, is it possible to achieve this? How?
Given the above and the section of the docs "Specifying the current URI Mapping for any other Zen Cart page" (part 2 of that section) you should be able to figure out what to enter.
I'll say specifically though so I don't need to reply later. please read the docs and try it yourself first then take note of the following if need be:
uri will be
/news/article_title
main_page will be
news_article
query_string_parameters will be
article_id=1
Enjoy the module and good luck with your site.
Now to get on to actual development work etc... :)
All the best...
Conor
ceon