Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping v4.x

Ceon URI Mapping v4.x

Views: 451,986

Results 2,061 to 2,080 of 2,454
3 Nov 2016, 7:10 PM
#2061
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Ceon URI Mapping v4.x

I just had a quick look at your site and would like to suggest that after choosing an instrument, a genre selection would maintain that instrument selection. I'm pretty sure there's a module that does this kind of thing, and might at the same time solve your genre SEO question.

3 Nov 2016, 7:27 PM
#2062
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

mrcastle:

I'm still hoping some one can help me with an answer on URI mapping for genres. I've posted this question once with no results. I've setup all of my inventory and categories with no problems but the genres do not have this option. Go into a category, save it, and CEON shows that the re-write has been completed but you can't do this with genres. As of today, my website is showing this designation for the jazz genre.

http://cheapsongbooks.com/index.php?...sic_genre_id=2

I'd like to change it to something like: http://cheapsongbooks.com..genre=jazz or something that might help get rankings using genre & jazz in the link. Is this possible ?

I have 10 genres and am willing to change them manually if necessary.. I'm not a programmer but I'm willing to give it shot.... thx

So for your example from earlier:
http://cheapsongbooks.com/index.php?main_page=index&typefilter=music_genre&music_genre_id=2
In the tools->install sql patches, apply the following:

INSERT INTO `ceon_uri_mappings` 
(`uri` ,`language_id` ,`current_uri` ,`main_page` ,`query_string_parameters` ,`associated_db_id` ,`alternate_uri` ,`date_added`) 
VALUES 
( '/jazz','1','1','index','typefilter=music_genre&music_genre_id=2',NULL ,NULL , NOW() );

Where the first '1' represents the language number for the language to which this is applied (typically English but this needs to be reviewed/verified by looking at your localities/languages section).

5 Nov 2016, 6:29 AM
#2063
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Ok thanks but what about the second 1 ? I just want to make sure it doesn't refer to type... all of my inventory is type 2. Thx

5 Nov 2016, 7:32 AM
#2064
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

mrcastle:

Ok thanks but what about the second 1 ? I just want to make sure it doesn't refer to type... all of my inventory is type 2. Thx
Did the vertical alignment of the information not make sense?

notice how uri has '/jazz' below it?
language_id and '1'...

Pretty much all of this is covered in the documentation explaining what piece of information should go into which field and the potential concerns of using anything more than a single parameter in the query_string_parameters field.

5 Nov 2016, 4:01 PM
#2065
mrcastle avatar

mrcastle

Zen Follower

Join Date:
Feb 2010
Posts:
205
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Ok, that's a little embarrassing but I get it now. Thanks. On another subject: after you helped me figure out my easypopulate issue, I started looking around to see how I could convert my uri's without having to edit each one separately. I found a post showing the module you have created and looks like the perfect solution. I'll plan to get it this weekend.... I was going to private post you on this but I thought it might be a good idea to let other zc users know it's available.

6 Dec 2016, 3:45 PM
#2066
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

torvista:

Bugfix
When all site is SSL using these settings on config.php:
define('HTTP_SERVER', 'https://YOURSITE...
and
define('ENABLE_SSL', 'false'); yes, that DOES says false as per
https://www.zen-cart.com/showthread.php?220226-SSL-suggestion&p=1311391#post1311391

customer is unable to log in with Chrome (but Firefox yes). An issue with cookie setting/handling.

Merged changes in html_output.php ZC155 to make the relevant section identical (including formatting, for future comparisons).

Available in Github.
https://github.com/torvista/CEON-URI-Mapping

Hi Torvista

Currently having the same issue Chrome not liking the cookies and won't let us login - I have looked at the github but the htnl_output.php file is exactly the same as I already am using - could you highlight what you changed to resolve this issue - or is it still a bug? ie not resolved?

Thank you
Sarah

6 Dec 2016, 5:27 PM
#2067
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

SarahL:

Hi Torvista

Currently having the same issue Chrome not liking the cookies and won't let us login - I have looked at the github but the htnl_output.php file is exactly the same as I already am using - could you highlight what you changed to resolve this issue - or is it still a bug? ie not resolved?

Thank you
Sarah
If the login issue with chrome is related to the admin side, then please see: https://www.zen-cart.com/showthread.php?219760-Known-Bugs-%28and-fixes%29-with-v1-5-5-a-b&p=1320243#post1320243

It affects all ZC versions 1.5.0 and above but was corrected in 1.5.5.b.

7 Dec 2016, 8:45 AM
#2068
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

Currently having the same issue Chrome not liking the cookies and won't let us login
I assume you mean you cannot login in the CATALOG side? Any problem on the ADMIN side is unrelated, and is indeed probably as per the previous post.
The version I have on Github is the same as my live site which is working ok.
If the problem persists you can post your (obfuscated) site address here for review.

10 Dec 2016, 11:30 AM
#2069
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

It appears I have found a bug in the current fileset, relating to the creating of urls from the admin side.
I find that very hard to believe but since Conor is not here to enlighten me, I'll describe in detail so someone else can corroborate it.
**
Catalog Side**
On a page, links to other pages are created using the Catalog function zen_href_link

This builds the link in two chunks:

a) The server bit that is the same per site, eg: www.mysite.com/myshop/
I'll call this the link stub to simplify things.

b) The page bit: index.php?main_page=product_info&cPath=2_1273&products_id=819

The CEON URI code is inserted between a) and b) and when enabled, makes a nice friendly url like this:

manufacturers/rg-racing/general-accessories/rg-dhb0001bk-deluxe-helmet-bag

And it returns the two bits concatenated to make the link:

www.mysite.com/myshop/manufacturers/rg-racing/general-accessories/rg-dhb0001bk-deluxe-helmet-bag

All well and good.
**
Admin Side**​
URI mapping is used on the admin side to generate friendly urls such as emails sent to customers such as Back in Stock notifications, or Abandoned Shopping Cart reminders, Order Status updates, Sitemapxml.

In this case the Admin function zen_catalog_href_link is used.

In the CEON fileset, I find two things that stop this from building the link correctly.

  1. the CEON code is inserted BEFORE the a) above, so only the page link is returned from the function:
    manufacturers/rg-racing/general-accessories/rg-dhb0001bk-deluxe-helmet-bag

  2. The CEON method/function call is this:

buildHREFLink(NULL, $page, $parameters, $connection, false))

The first parameter is the link stub that has to be prefixed to the friendly url.
As it is set to null it still will not work. It should be "$link".

Once these two changes are made, the email links are generated correctly.

So, for those who want to test, the complete Admin function zen_catalog_href_link as I currently have it is

function zen_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
  global $zco_notifier;
  $link = null;
  $zco_notifier->notify('NOTIFY_SEFU_INTERCEPT_ADMCATHREF', array(), $link, $page, $parameters, $connection);
  if($link !== null) return $link;


  if ($connection == 'NONSSL') {
    $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
  } elseif ($connection == 'SSL') {
    if (ENABLE_SSL_CATALOG == 'true') {
      $link = HTTPS_CATALOG_SERVER . DIR_WS_HTTPS_CATALOG;
    } else {
      $link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;
    }
  } else {
    die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>zen_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
  }
    // BEGIN CEON URI MAPPING 1 of 1 - placed AFTER the web server address is built as per the catalog side but NOT as per the file in the CEON URI installation pack!! This issue is highlighted by BISN that uses this function.
    if (defined('CEON_URI_MAPPING_ENABLED') && CEON_URI_MAPPING_ENABLED == 1) {
        if (!isset($ceon_uri_mapping_href_link_builder)) {
            static $ceon_uri_mapping_href_link_builder;


            require_once(DIR_FS_CATALOG . DIR_WS_CLASSES . 'class.CeonURIMappingHREFLinkBuilder.php');


            $ceon_uri_mapping_href_link_builder = new CeonURIMappingHREFLinkBuilder();
        }


        if ($ceon_uri_mapping_href_link_builder->buildHREFLink($link, $page, $parameters, $connection, false)) {//steve changed first parameter from null to link or it loses the base server address
            return $ceon_uri_mapping_href_link_builder->getHREFLink();
        }
    }
    // END CEON URI MAPPING 1 of 1
  if ($parameters == '') {
    $link .= 'index.php?main_page='. $page;
  } else {
    $link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
  }


  while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);


  return $link;
}

But then again, I might be missing something...!!

15 Dec 2016, 10:19 AM
#2070
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Ceon URI Mapping v4.x

...continuing my monologue...the above code is not correct.

I decided to get into 2016 and used the available notifier instead

$zco_notifier->notify('NOTIFY_SEFU_INTERCEPT_ADMCATHREF', array(), $link, $page, $parameters, $connection);

https://www.zen-cart.com/showthread.php?221560-use-of-NOTIFY_SEFU_INTERCEPT_ADMCATHREF-in-function-zen_catalog_href_link

So now no modifications are necessary to html_output (catalog/admin).

These changes have been added to my Github.

19 Dec 2016, 11:28 AM
#2071
richmandoo avatar

richmandoo

New Zenner

Join Date:
Jul 2011
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hi, I am hoping some one would be able to help me.
I'm not aware of any changes to my site, but all of a sudden I was getting 404 errors on all of my product pages.
I ran the Ceon URI Mapping Installation check it came back with an error:

A file requires 2 modifications to be made for it but none of the modifications have been made.

The file it is talking about is includes/functions/general.php, but all it says it make the modifications and doesn't tell me what is wrong or what the modifications are.
Does anyone have any idea?

Thanks!

19 Dec 2016, 12:04 PM
#2072
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

Download the original mod zip file and go through the readme/install instructions.
Has your PHP version been updated perhaps?

19 Dec 2016, 12:48 PM
#2073
richmandoo avatar

richmandoo

New Zenner

Join Date:
Jul 2011
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

picandnix:

Download the original mod zip file and go through the readme/install instructions.
Has your PHP version been updated perhaps?

Hi Thanks, for your help.
I did this and updated the general.php file, ran the installation check again and it came back saying everything was now fine.
I then thought I would test what happens if I create a new page.
If I create a new category page then it adds this to my navigation, the URI mapping creates a URI for the page, but going to it on the website provides a 404.
I tried to do the same with an EZ-page and it creates the page, with some content on it, but if I try to enable a header or footer or specify an URI for that page it doesn't save the changes.
Does this sound like a wider issue?

I don't think my PHP has been updated, I checked and I am running version 5.3.29

Thanks

19 Dec 2016, 2:26 PM
#2074
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

richmandoo:

Hi Thanks, for your help.
I did this and updated the general.php file, ran the installation check again and it came back saying everything was now fine.
I then thought I would test what happens if I create a new page.
If I create a new category page then it adds this to my navigation, the URI mapping creates a URI for the page, but going to it on the website provides a 404.
I tried to do the same with an EZ-page and it creates the page, with some content on it, but if I try to enable a header or footer or specify an URI for that page it doesn't save the changes.
Does this sound like a wider issue?

I don't think my PHP has been updated, I checked and I am running version 5.3.29

Thanks

Did you follow the instructions to create .htaccess file?

19 Dec 2016, 2:29 PM
#2075
richmandoo avatar

richmandoo

New Zenner

Join Date:
Jul 2011
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

picandnix:

Did you follow the instructions to create .htaccess file?

I did, yes and tried adding a / before index.php, but didn't make any difference

19 Dec 2016, 4:02 PM
#2076
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

What content is in your htaccess file? (obscure the reference to your admin directory) and be sure to include all of the content of the htaccess file not just what needs to be added to support this plugin.

20 Dec 2016, 9:17 AM
#2077
richmandoo avatar

richmandoo

New Zenner

Join Date:
Jul 2011
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

mc12345678:

What content is in your htaccess file? (obscure the reference to your admin directory) and be sure to include all of the content of the htaccess file not just what needs to be added to support this plugin.

Hi Thanks,

AddHandler php-stable .php

## BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

# Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])
RewriteCond %{REQUEST_URI} !\.[a-z]{2,5}$ [NC]
# Don't rewrite any URIs for some, popular specific file format extensions,
#   which are not covered by main file extension condition above
RewriteCond %{REQUEST_URI} !\.(mp3|mp4|h264)$ [NC]
# Don't rewrite any URIs for some specific file format extensions,
#   which are not covered by main file extension condition above
#   Uncomment the following line to apply this condition! (Remove the # at the start of the next line)
#RewriteCond %{REQUEST_URI} !\.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/XXX [NC]
# Don't rewrite editors directory
RewriteCond %{REQUEST_URI} !^/editors/ [NC]
# Don't rewrite admin directory
RewriteCond %{REQUEST_URI} !^/admin/ [NC]
# Handle all other URIs using Zen Cart (its index.php)
RewriteRule .* index.php [QSA,L]

## END CEON URI MAPPING REWRITE RULE
22 Dec 2016, 3:30 PM
#2078
richmandoo avatar

richmandoo

New Zenner

Join Date:
Jul 2011
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hi, I'm still not getting anywhere with this.
I have noticed that the Ceon site is down for maintenance, I'd like to think it wouldn't have any impact on the functionality, but can I just rule this out?

Any other help would be greatly appreciated too.

Thanks

22 Dec 2016, 6:44 PM
#2079
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

richmandoo:

Hi, I'm still not getting anywhere with this.
I have noticed that the Ceon site is down for maintenance, I'd like to think it wouldn't have any impact on the functionality, but can I just rule this out?

Any other help would be greatly appreciated too.

Thanks
It has no impact on functionality of this plugin as provided on this forum and was only provided to potentially identify an updated version being available through a sort of one way pull, get the current information data from the site, analyze locally what needs to be done if anything and take appropriate action.

As to your issues, it's concerning that it had been "installed", but that one file had not been edited or if it had it may have been replaced without the necessary edits. While the install test is supposed to identify if all of the files have been edited properly, that doesn't necessarily mean that there isn't something extra done... Or something else that has gotten modified away from the default/standard install.

Is the site in a web-facing sub-directory of any kind? (ie. htt p : / / my site . com / zencart)

This is what I use as the RewriteRule portion of the htaccess modifications that works on the site its needed:

RewriteRule ^(.*)$ /index.php [QSA,L]

I have omitted all of the RewriteCond lines from the above as in principle they are the same as what is provided previously.

8 Jan 2017, 9:46 PM
#2080
f7dem avatar

f7dem

New Zenner

Join Date:
Sep 2012
Posts:
6
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

When I added the following code to the .htaccess file in my zencart directory, it worked for me.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /zencart directory/index.php [QSA,L]