Re: 404 email, but no sitemap shown..with URI mapping
I'm stuck in a loop when trying to checkout with version 4.4.1. Everything was working great, the friendly URLs were coming through. Navigating round the site has been good but when I go to Checkout I just get stuck in a loop at the login page. It looks like a redirect is forcing me back to login. I tried with and without the / on the rewrite rule, but have I missed something obvious?
Here are the log entries:
Code:
127.0.0.1 - - [05/Nov/2012:13:58:31 +1100] "GET /op-shop/index.php?main_page=login HTTP/1.1" 200 38435 "http://localhost/op-shop/index.php?main_page=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
127.0.0.1 - - [05/Nov/2012:13:58:37 +1100] "POST /op-shop/index.php?main_page=login&action=process HTTP/1.1" 302 - "http://localhost/op-shop/index.php?main_page=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
127.0.0.1 - - [05/Nov/2012:13:58:37 +1100] "GET /op-shop/index.php?main_page=checkout_shipping HTTP/1.1" 302 - "http://localhost/op-shop/index.php?main_page=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
127.0.0.1 - - [05/Nov/2012:13:58:37 +1100] "GET /op-shop/index.php?main_page=login HTTP/1.1" 200 38419 "http://localhost/op-shop/index.php?main_page=login" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4"
Re: 404 email, but no sitemap shown..with URI mapping
So I deleted the files started over and still get the same issues. Rewrites the urls which I love but when I click on them they just loop back to the home page. I dont think it is the template,but I'm no expert. I'm usre this is somthing simple, just bugs the heck out of me that I cannot figure it out.
Re: 404 email, but no sitemap shown..with URI mapping
Hi,
Quote:
Originally Posted by
kanine
It looks like a redirect is forcing me back to login. I tried with and without the / on the rewrite rule, but have I missed something obvious?
It looks like something is indeed redirecting back but it's not Ceon URI Mapping.. none of those URIs are static URIs.. I think this is a conflict with something else you have put on the site.
All the best..
Conor
ceon
Re: Ceon URI Mapping v4.x
Hi,
Quote:
Originally Posted by
Newbie76
I had this installed for a while and all was well on zc v1.5.0 (link in my sig), but a while ago (not sure how long), it suddenly stopped working on internet explorer and wouldn't show 2nd or third level categories or any products (it showed but lost all formatting), so I have now turned it off, I am currently on CEON URI Mapping v4.0.7 but I have a message to say that 4.4.1 is available, would this fix this issue? It's just that I have to merge some admin files as I have this installed alongside numinix product fields so I don't really want to mess around unless I have to and if it will make a difference? or do you think the problem could be completely unrelated? if so, any ideas as to what it may be and how to fix would be appreciated.
Thanks in advance!
I would suggest upgrading, it won't actually take you that long.. however, things don't just suddenly stop working. So you must have installed software that messed something up, or added something to your .htaccess file which has broken things.
All the best..
Conor
ceon
Re: Ceon URI Mapping v4.x
Conor,
Sent you an email. I know its getting late in the UK, thank you for your help and your great mods.
Re: Ceon URI Mapping v4.x
Hi,
Quote:
Originally Posted by
PullingOutMyHair
Sent you an email. I know its getting late in the UK, thank you for your help and your great mods.
Yes, you just got me before I stopped for the day, you should have received my response by now.. if not then a spam filter may be to blame!
Thanks for the nice comments, I'm really glad the software's useful to you! :)
All the best..
Conor
ceon
Re: Ceon URI Mapping v4.x
Quote:
Originally Posted by
conor
Hi,
Yes, you just got me before I stopped for the day, you should have received my response by now.. if not then a spam filter may be to blame!
Thanks for the nice comments, I'm really glad the software's useful to you! :)
All the best..
Conor
ceon
Got is and thanks. I want to make everyone clear, that the script works as advertised and the main issue was my htaccess file. Something, I honestly didnt know enough about.
I purchased the URI Mappings (Static URLs/URIs). https://ceon.net/software/business/z...ppings-manager and it is worth every penny, once installed thanks to Conor, it took seconds to change every product and category.
Thanks Again!
Re: Ceon URI Mapping v4.x
Assuming I know nothing about php:
Having uri-mapped categories called:
united-states/blue (category id is 1234)
united-kingdom/blue (category id is 5678)
.....
If i want to display my product_filter sidebox only on the above sub-category pages I can use this:
if ($cPath == '1234' or $cPath == '5678'){
$show_product_filter = true;
} else {
$show_product_filter = false;
}
But I have a LOT of sub-categories, with the same name to specify so I thought if I show the sidebox only when the URI Mapping is a certain value that it would be less work, by doing this:
$hide_filter = "select uri
from " . TABLE_CEON_URI_MAPPINGS . " cm
where current_uri = '1'
and cm.associated_db_id = '" . (int)$_GET['cPath'] . "'";
$hide = $db->Execute($hide_filter);
if ($hide == 'blue'){
$show_product_filter = true;
} else {
$show_product_filter = false;
}
The trouble is the uri's are actually /united-states/blue ...etc.
so using the == isn't correct. I'm just not sure what to use instead
Re: Ceon URI Mapping v4.x
Hi,
Quote:
Originally Posted by
simon1066
if ($hide == 'blue'){
$show_product_filter = true;
} else {
$show_product_filter = false;
}
The trouble is the uri's are actually /united-states/blue ...etc.
so using the == isn't correct. I'm just not sure what to use instead
This is a PHP programming question, it's nothing to do with this thread really.
To answer your question specifically, you could simply check against the last part of the URI that you have identified as wanting to match.
You'd just extract the last part. Here's how to extract it from a string stored in "$uri"
PHP Code:
$last_slash_pos = strrpos($uri, '/');
$last_uri_part = substr($uri, $last_slash_pos + 1, strlen($uri) - ($last_slash_pos + 1));
if ($last_uri_part == 'blue') {
However, your code is wrong, it will match Category URIs, Product URIs or EZ-Page URIs as you haven't limited the range of the page "types" that can use an associated_db_id.. the first one in the database with the ID of whatever the cPath is will match:
PHP Code:
$hide_filter = "select uri
from " . TABLE_CEON_URI_MAPPINGS . " cm
where current_uri = '1'
and cm.associated_db_id = '" . (int)$_GET['cPath'] . "'";
You'd be better off building the URI using the Ceon URI Mapping functionality, which can be easily instigated through a call to zen_href_link():
PHP Code:
$parameters = 'cPath=' . $cPath;
$uri = zen_href_link(FILENAME_DEFAULT, $parameters);
As this is a very specific/personal programming question, it wouldn't be appropriate to reply here, please instead start a new thread.
All the best...
Conor
ceon
Re: Ceon URI Mapping v4.x
Thank you taking the time to reply Conor
I was in two minds whether to post in Zen pub or here - chose here as I thought this thread might better recognise the ceon_mapping database references.
I've taken on board what you've said and have managed to get it working satisfactorily.
Looks like I now know a bit of php - amazing what a nights sleep can do.