[ZenCart] EZ-Pages don't get the magic

Magic SEO URLs for Zen Cart.
Mickpunt
Posts: 5
Joined: Tue Apr 14, 2009 3:13 pm

[ZenCart] EZ-Pages don't get the magic

Postby Mickpunt » Tue Apr 21, 2009 12:16 am

Hi,

I just noticed that practically all pages get a nice URL from Magic SEO URL except the EZ-Pages... which is a pity since I quite often use them in our shop. Is there a way to enable them?

Or do I need to manually add rules to the .htaccess file? (And if yes, how?)

Thanks!

Mick

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [ZenCart] EZ-Pages don't get the magic

Postby inveo » Tue Apr 21, 2009 3:38 am

EZ Pages are supported automatically. According to what I can see on your web site there are some troubles with EZ Pages tables (duplicate/missing records). Please check that tables with phpMyAdmin.

Mickpunt
Posts: 5
Joined: Tue Apr 14, 2009 3:13 pm

Re: [ZenCart] EZ-Pages don't get the magic

Postby Mickpunt » Tue Apr 21, 2009 4:48 am

Hi J,

I just checked the tables zen_ezpages & zen_ezpages_content, one entry was indeed wrong. I corrected it and regenerated the htaccess. Unfortunately it still doesn't work.

I've installed the zen cart mod called multilanguage_ezpages_1-3-0-5v2-01. Do you think this might interfere with Magic SEO? Would it help you to have a look at my database?

Kind regards,

Mick

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [ZenCart] EZ-Pages don't get the magic

Postby inveo » Tue Apr 21, 2009 5:37 am

I don't know, but to make things clear, here is the exact SQL query used by MSU for title detection which is injected to URI:

Code: Select all

SELECT pages_title FROM ezpages WHERE pages_id = '<id>' AND languages_id = '<active_language>'

Mickpunt
Posts: 5
Joined: Tue Apr 14, 2009 3:13 pm

Re: [ZenCart] EZ-Pages don't get the magic

Postby Mickpunt » Tue Apr 21, 2009 2:51 pm

Well that's the problem then...

Installation of the mod multilanguage_ezpages_1-3-0-5v2-01 introduces a new table called zen_ezpages_content where all the multilingual content is placed including titles and languageid's.

This could be problematic...

Is there a possibility you make a special compilation where you change your code to new table (ezpages_content), columns pages_id and languages_id are named exactly the same...

Code: Select all

SELECT pages_title FROM ezpages_content WHERE pages_id = '<id>' AND languages_id = '<active_language>'


I hope so!

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [ZenCart] EZ-Pages don't get the magic

Postby inveo » Fri Apr 24, 2009 8:22 am

More clean solution will be to make appropriate change to TABLE_EZPAGES constant in includes/database_tables.php.

lacabessa
Posts: 4
Joined: Thu Sep 17, 2009 10:24 am

Re: [ZenCart] EZ-Pages don't get the magic

Postby lacabessa » Thu Sep 17, 2009 10:31 am

Hello,

We are using your add on in one of our website and would like to buy a second one for another site (which is multi langual). However, we have the same issue as described above. We don't feel comfortable about changing the table name to ezpages_content in database_tables.php as this will impact all other scripts that refer to ezpages table (There are columns in ezpages that do not exist in ezpages_content). Is it possible to have a different compile as suggested above.

Thank you

Regards

inveo
Inveo Support
Posts: 1280
Joined: Sat Feb 02, 2008 12:07 pm
Contact:

Re: [ZenCart] EZ-Pages don't get the magic

Postby inveo » Thu Sep 17, 2009 12:29 pm

Sorry we no longer provide customized versions to avoid any compatibility issue with updates.

Spike00
Posts: 15
Joined: Sat Nov 08, 2008 9:29 am

Re: [ZenCart] EZ-Pages don't get the magic

Postby Spike00 » Thu Jun 24, 2010 2:34 am

~J~ wrote:More clean solution will be to make appropriate change to TABLE_EZPAGES constant in includes/database_tables.php.


Hi Jiri, to solve this problem I made this simple workaround:

Code: Select all

define('TABLE_EZPAGES', DB_PREFIX . 'ezpages_content');
include(DIR_WS_INCLUDES . 'magic_seo_url.php');
define('TABLE_EZPAGES', DB_PREFIX . 'ezpages');


But, nothing changed, the title still was taken from ezpages table.

May you confirm that the query uses the define TABLE_EZPAGES and not the table name itself?

Spike00
Posts: 15
Joined: Sat Nov 08, 2008 9:29 am

Re: [ZenCart] EZ-Pages don't get the magic

Postby Spike00 » Thu Jun 24, 2010 3:10 am

Well, ok, I learnt the non-redefineability of defined stuff, unless to use runkit which unfortunately is not recommended in a production environment.

So, jiry, please this thing must be solved.

We cannot modify the define since it's needed that way in a lot of other scripts.

If you are worried about compatibility issues, the solution is quite simple:

just a check if TABLE_EZPAGES_TEXT is defined.

If yes use TABLE_EZPAGES_TEXT, if not, use TABLE_EZPAGES in your query.

Isn't it simple? ;)