Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
picandnix
Quote:
Originally Posted by
picandnix
Hi Conor
I totally understand this must be a frustration, but please make it idiot proof for me... :hug:
Ive searched the thread as you can tell by the above quotes, Ive read rhe old 'how to' post on resolving, but I too have come up against the same issue as alarmy-e.pl, I cannot find the answer to how to mod the code for 1.3.9.
Sorry to be a plank.
Thanks in advance.
Based on your post, it's not clear (at least to me) what you are still having an issue with. The post that you reference (and I've properly quoted it so they are easier to read) is a pretty straight forward change and has been confirmed by Conor as the solution. This is not an issue with Ceon URI Mapping, but is in fact an issue with a Zen Cart function.
So please clarify what you are having issues with still:
- Did you try making these changes, and they did not work
..
OR
.. - Are you unsure how to go about making the changes needed??
Quote:
Originally Posted by
damiantaylor
Just thought I'd come back and let you know I've found a fix to the problem I was having where the cPath extension was incorrectly appended to the end of the URIs.
As Conor said, it is nothing to do with the URI mapping module, it's a problem in the zen_get_product_path function.
The code to fix is here:
http://www.zen-cart.com/forum/showth...aster+category
Hope this helps!
Quote:
Originally Posted by
conor
Hi,
Yes, thanks that was interesting.. a silly Zen Cart bug, surprised it's only fixed in 1.4.0 and not in 1.3.9.. at least we know what to say if anyone else has the same problem!
All the best..
Conor
ceon
Re: Ceon URI Mapping (SEO)
hi Divavocals
thankyou for your attention. & apologies for the above format (I'm posting from my phone so I dont the full page one would see on a p.c)
Yes its the fact I cant find the correct code to mod. I have found what I believe to be the correct lines, however as alarmy-e.pl states the code in 1.3.9 is slightly different to that of the code in the solution quoted by DamianTaylor from the earlier version of ZC. So yes I'm having trouble going about making the correct changes to the php file.
Regards
Posted via Mobile Device
Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
picandnix
hi Divavocals
thankyou for your attention. & apologies for the above format (I'm posting from my phone so I dont the full page one would see on a p.c)
Yes its the fact I cant find the correct code to mod. I have found what I believe to be the correct lines, however as alarmy-e.pl states the code in 1.3.9 is slightly different to that of the code in the solution quoted by DamianTaylor from the earlier version of ZC. So yes I'm having trouble going about making the correct changes to the php file.
Regards
Posted via Mobile Device
The code DamianTaylor quote IS the corrected code so YES it will not be the same as the current 1.3.9 code found in the functions_categories.php file.. You must modify the zen_get_product_path function which is found in the functions_categories.php file. You need you make the query LOOK like the code in the referenced thread. (I've quoted the posted fix) Does that make sense??
Quote:
Originally Posted by
capnhairdo
Apologies for cross-posting this excerpt from
another, longer post, but it seemed to merit being posted here:
When ZC doesn't know the category you want—because no category is defined in the URL (cPath)—then init_category_path.php runs zen_get_product_path() to determine and set it.
zen_get_product_path() (in functions_categories.php) does a general query of the products_to_categories table to find all product/category associations. However, this query has a limit=1, so it only gets the first record it finds there. For products in only one category, this is fine; but if a product is in multiple categories, then the category it returns is essentially random. Which defeats the purpose of a "master" category. If a category is going to be determined automatically by ZenCart, it should be the master category for the product, not a random one.
This change to functions_categories.php fixes this (additions to original code in red):
Code:
// first, try to get master category id
$category_query = "select p2c.categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = '" . (int)$products_id . "'
and p.products_status = '1'
and p.products_id = p2c.products_id and p.master_categories_id = p2c.categories_id";
// in case the master category is invalid, fall back on getting first product/category association instead
$category_query .= " union distinct select p2c.categories_id
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c
where p.products_id = '" . (int)$products_id . "'
and p.products_status = '1'
and p.products_id = p2c.products_id limit 1";
Re: Ceon URI Mapping (SEO)
Hi,
Quote:
Originally Posted by
picandnix
Yes its the fact I cant find the correct code to mod.
Sorry but I don't think this is appropriate for this thread. Please move it to another one.
Thanks,
Conor
ceon
Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
conor
Hi,
Sorry but I don't think this is appropriate for this thread. Please move it to another one.
Thanks,
Conor
ceon
Sorry Conor.. I should have included that in my last post..:oops:
Quote:
Originally Posted by
DivaVocals
The code DamianTaylor quote IS the corrected code so YES it will not be the same as the current 1.3.9 code found in the functions_categories.php file.. You must modify the zen_get_product_path function which is found in the functions_categories.php file. You need you make the query LOOK like the code in the referenced thread. (I've quoted the posted fix) Does that make sense??
Conor is absolutely right.. The "issue" and the "fix" are not related in ANY WAY to this mod.. Any further discussion on this topic should be carried on a new separate thread.. (sorry Conor)
Re: Ceon URI Mapping (SEO)
my zc 1.39h
now, i have install a module "news_and_article_manager__optional_sideboxes_2-2"
how to rewrite :
PHP Code:
news
news_archive
news_article
news_comments
especially news_article
Re: Ceon URI Mapping (SEO)
Hi,
Quote:
Originally Posted by
ebloger
mnow, i have install a module "news_and_article_manager__optional_sideboxes_2-2"
how to rewrite
You will have to manually edit the database, adding a record by hand for each page and each article.
You need to read the section of the documentation "Specifying the current URI Mapping for any other Zen Cart page".
This module is not static URI compatible as it is and needs to be rewritten to be so.
For which someone will have to pay someone I'd imagine.
All the best...
Conor
ceon
Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
conor
Hi,
It features "auto-generation" so it's ideally placed for new stores.. by default a full URI will be auto-generated for a new product/category/EZ-page.
It will also be auto-generated if you are editing a product/category/EZ-page which doesn't yet have a URI mapping.
Instead of generating a URI when the customer looks at a product/category/EZ-Page, the store admin user(s) create the URI when adding/editing products/categories/EZ-pages...
so it is automatic, but in a "different" way. :)
I just took a look at the website for that module and its code and it seems to be a good module also.. however it adds product IDs etc. by default which I find ugly. The new alias feature is great but that didn't exist when I wrote this module and it requires more work for the admin user(s) than the auto-generation features of this new module (for products/categories and EZ-pages but not for other pages, it's easier for them!).
As yellow says, it does no harm to have a choice! (Thanks for the nice comment yellow1912) :)
Hope that makes things clearer still!
All the best...
Conor
Ceon
Hi Conor,
I'd like to rewrite my URLs in more descriptive ways. I've got a lot of pages (thousands) to rewrite.
Can you tell me if this module is suitable for my job and is there any potential problem that I should pay attention to? First of all is there a possibility to get damaged URLs or to lost any of them?
Also is rewritting automatic process?
If I decide to install the module would you mind me asking you if I stamble somewhere?
Thanks.
Re: Ceon URI Mapping (SEO)
Hi,
Quote:
Originally Posted by
Lazar
I'd like to rewrite my URLs in more descriptive ways. I've got a lot of pages (thousands) to rewrite.
Can you tell me if this module is suitable for my job and is there any potential problem that I should pay attention to? First of all is there a possibility to get damaged URLs or to lost any of them?
Also is rewritting automatic process?
If I decide to install the module would you mind me asking you if I stamble somewhere?
I'm afraid that the module as it comes is designed for stores that are just starting or small.. it would take a long time to generate URIs for 1000s of products as the autogeneration is NOT an automatic process. It autogenerates URIs only when you click "Update" in the admin.
If you search this thread you can find out more about how things work.
There is no possibility of "damaged URLs" unless you have products which have the same name. Which you should never have.
All the best...
Conor
ceon