Re: Ceon URI Mapping v4.x
Just updated to 4.03 and everything peachy! Thanks so much :) Amy
www.babygiftbasketstores.com
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
conor
Yes, you'd have to add custom for each custom product type the store uses.
ceon
I've just spent some time debugging this and thought I'd post here to help others in the same situation. If I've missed documentation covering this, please accept my apologies. If I haven't missed docs, please add some to this effect :) it would have saved some head scratching. This is pretty simple stuff, but hard to get into as a newcomer to the URI Mapping mod.
We have a custom product type "product_light" which was created following the standard Zen Cart approach of copying an existing product type, in my case the product_music files, and hacking the custom attributes to our requirements.
1/ We therefore have a custom admin/includes/modules/product_light/update_product.php, so the update_product action causes this update_product.php to be executed when saving changes to products, due to the code in admin/product.php that runs your custom update_product.php if it exists. So we have to copy the CEON modifications from admin/includes/modules/update_product.php to make any URI mappings be saved to the database. There's only one block, marked with "CEON URI MAPPING 1 of 1".
2/ We need a constant for our product type filename, just so we don't have to hardcode the string anywhere, so in includes/extra_datafiles/our_custom_stuff.php we include:
Code:
define('FILENAME_PRODUCT_LIGHT_INFO', 'product_light_info');
I am not clear whether this needs doing for admin/includes/extra_datafiles/our_custom_stuff.php also.
3/ Update includes/classes/class.CeonURIMappingHREFLinkBuilder.php to ADD line 238:
Code:
$main_page == FILENAME_PRODUCT_LIGHT_INFO ||
4/ Update includes/classes/class.CeonURIMappingHandler.php to ADD line 442:
Code:
$_GET['main_page'] == FILENAME_PRODUCT_INFO ||
and line 513:
Code:
$_GET['main_page'] == FILENAME_PRODUCT_LIGHT_INFO ||
5/ Update admin/includes/classes/class.CeonURIMappingAdminProductPages.php to ADD line 940:
Code:
FILENAME_PRODUCT_LIGHT_INFO,
and line 1436:
Code:
FILENAME_PRODUCT_LIGHT_INFO,
With these modifications in place, the URI mappings for our custom product types seem to work.
In summary, it would be nice if some of theses lists of FILENAME_* constant usages were driven by the product_types database table, if possible, as that would reduce the necessity to hardcode these lists of known product types, but perhaps it isn't that simple.
Re: Ceon URI Mapping v4.x
Hi,
Quote:
Originally Posted by
neekfenwick
I've just spent some time debugging this and thought I'd post here to help others in the same situation.
Thanks for posting this.
If anyone else ever needs to do this I'll post them towards this information. :)
Quote:
Originally Posted by
neekfenwick
If I've missed documentation covering this, please accept my apologies. If I haven't missed docs, please add some to this effect :)
I'm afraid I don't have the time at present.. writing good/worthwhile docs takes time as well!
Version 4.0.4 shall be out soon and this info can't be included in it at this late stage.. maybe in a future version.
Quote:
Originally Posted by
neekfenwick
In summary, it would be nice if some of theses lists of FILENAME_* constant usages were driven by the product_types database table, if possible, as that would reduce the necessity to hardcode these lists of known product types, but perhaps it isn't that simple.
It's a bit of a coincidence that the only two requests for this functionality in 3 years have within days of each other but that's always the way isn't it! :)
I'd previously thought about adding this functionality but the reason it isn't included in the standard version of the software is that it slows down the software.
It would mean that at every point at which you've seen you have had to modify the source code, an SQL lookup would have to be performed. Even with caching this would result in a lot of unnecessary/wasteful lookups for 99.99% of Zen Cart stores.
Ceon URI Mapping 4.0.0 implemented an overridable class system so that we could release versions which have customisations like this in them from the start.. requiring you to change just one single file to have the module use the updated/changed functionality.
We have as yet only released one other "edition" of the software other than the standard edition that you have modified.. (The UMM edition).. in a future version of the distribution I may include an edition which performs these additional SQL product_type lookups for stores such as yours, that have additional custom product types and don't want the hassle of hard-coding (despite its speed efficiency).
I'm sure you can understand now why things are currently how they are. I'm just sorry I didn't have the above solution for you out of the box but although you've supported us (thanks again!) and we are so grateful for that, almost no-one else does and my time's really limited at the minute, so I've had to put off adding extra editions to the main distribution. :(
At least you know that you have the most efficient implementation possible of this functionality now, with no need for SQL lookups.
I'm just sorry it took you the time it did as life is short and we all have better things to do than modify things. :)
Again, thanks for adding this info as I can point people towards it. Eventually I'll either include the info or an extra file for a "support any custom product types" "edition" of the software in a future version of the distribution.
All the best...
Conor
ceon
Re: Ceon URI Mapping v4.x
Hi,
How to add: about us page, to ceon url mapping manager, to rewrite it?
Thanks
Séb
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
triumph
Hi,
How to add: about us page, to ceon url mapping manager, to rewrite it?
Thanks
Séb
Lets say the page you want to change is /index.php?main_page=conditions, which represents "Conditions of use" page. In PHPMyAdmin, insert record with this values:
uri -> /conditions
language_id -> type your language_id
current_uri -> 1
main_page -> conditions
query_string_parameters -> NULL
associated_db_id -> NULL
alternate_uri -> NULL
redirection_type_code -> 301
date_added -> select NOW() function next to field
It is the same for all pages: privacy, contact_us, shipppinginfo, advanced_search...
Re: Ceon URI Mapping v4.x
I have one question too.
How to type disallow pages in robots.txt?
Like this (native):
Code:
Disallow: /index.php?main_page=contact_us
Or like this: I have mapped URI for contact_us page like I described in previous post. URL is http://sportak.rs/shop/kontakt
Re: Ceon URI Mapping v4.x
Hi Conor,
Greetings from hot and sticky Florida. Long time no talk, I hope this note finds you doing well!
I am writing because I have a three issues and hoped you might be kind enough to offer your thoughts.
ISSUE #1: Upgrading ZC from 1.3.9d to 1.3.9h
ISSUE #2: Upgrading Ceon URI from 3.6.3 to 4.0.3
ISSUE #3: Moving the entire store to a new domain
I reviewed your FAQ and Upgrading instructions included with 4.0.3 and I have two main questions.
FIRST: Do I need to flush Ceon URI from mySQL when I switch domains? Or should I be able to transfer the database to the new domain with no Ceon URI issues?
SECOND: What do you think about where "upgrading Ceon URI" fits into my order of operations? I am planning to address these issues in the order listed above.
Thanks again for all your help! Ceon URI has my vote as the BEST ZC mod ever!
Yours,
Mike