Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Breadcrumb catalog link breaks page when clicked


memzz

Recommended Posts

Hi I have a problem hope someone can help me...

 

When i Click on The breadcrumbs catalog link 'http://example.co.uk/oscommerce/index.php?cPath=0' the page that shows is completely broken!!

 

This is the header code for the broken page....

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Pennywise Furniture</title>

<base href="http://example.co.uk/oscommerce_memzz/" />

<link rel="stylesheet" type="text/css" href="ext/jquery/ui/mem_theme/jquery-ui-1.8.11.custom.css" />

<script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>

 

 

<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>

<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />

<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

<link rel="stylesheet" type="text/css" href="ext/960gs/960_24_col.css" />

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

 

 

</head>

<body>

 

 

Thanks in advance

 

Memzz

Link to comment
Share on other sites

I understand what your saying but feel we don't have enough information to help you.

 

Are you saying that if you're on a product page, and you click the breadcrumb "catalog" from that page it doesn't return you to the main catalog page? If so what happens when you click the Catalog link from the Catalog page?

Link to comment
Share on other sites

I understand what your saying but feel we don't have enough information to help you.

 

Are you saying that if you're on a product page, and you click the breadcrumb "catalog" from that page it doesn't return you to the main catalog page? If so what happens when you click the Catalog link from the Catalog page?

 

Hey thanks for reply... no whats happening is when i click on the breadcrumbs 'catalog' link on say the product page... it loads the catalog page 'http://example.co.uk/oscommerce_memzz/index.php?cPath=0' the page loads but is displayed broken ie everything on it is sort of in place but all styles and everything very messed up.... Also i created a horizontal menu bar in the header with a 'browse by type' button that calls 'index.php?cPath=0' this does the same thing..

 

Again thanks for your help

 

Memzz

Link to comment
Share on other sites

Seems the Catalog button should take you to http://example.co.uk/oscommerce_memzz/index.php with the session id but, without the ?cPath=0' selected. Since it isn't needed.

 

I'd have to see the site to say much more.

 

Hey thanks for your reply...

 

The website address is http://pennywisefurniture.co.uk/oscommerce_memzz/index.php (still in development)

 

Ive removed the breadcrumbs link but if you click on 'shop by type' in the top menu bar you'll see the problem.....

 

Many thanks

 

Memzz

Link to comment
Share on other sites

In your Admin >> Configuration >> My Store, find Use Search-Engine Safe URLs and set it to false and save.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

In your Admin >> Configuration >> My Store, find Use Search-Engine Safe URLs and set it to false and save.

 

Regards

Jim

 

Hi Jim thanks once again for your advice.. your everywhere on here lol

 

I tried what you suggested and it still hasn't made a difference... also i notice that whether i toggle 'use search engine safe urls' it makes no difference to my url output??

 

Oh and another thing i've literally just noticed that i haven't given any of my categories a sort order? ie there all on '0'?

Could that be the cause of the funny page load problem?? or is that how their meant to be?? sorry if thats a basic question but i'm a complete newbie to php and finding answers for oscommerce is sometimes harder than using it :'(

 

Thanks

 

Mem

Link to comment
Share on other sites

You were using some kind of URL rewriter, since some of your site URLs were different from the standard. Leave the Use Search-Engine Safe URLs in the admin turned off; it doesn't work.

 

Category sort order shouldn't cause the problem you were seeing, but it's a bad idea to leave all of them set to zero. Give them a real numeric order.

 

Back to the original problem: ?cPath=0 should never show as a part of the URL. Your "Shop by Type" button is generating this, so you need to remove that from the URL in that button. That should fix the problem.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

You were using some kind of URL rewriter, since some of your site URLs were different from the standard. Leave the Use Search-Engine Safe URLs in the admin turned off; it doesn't work.

 

Category sort order shouldn't cause the problem you were seeing, but it's a bad idea to leave all of them set to zero. Give them a real numeric order.

 

Back to the original problem: ?cPath=0 should never show as a part of the URL. Your "Shop by Type" button is generating this, so you need to remove that from the URL in that button. That should fix the problem.

 

Regards

Jim

 

Thanks Jim i've disabled the button for now and i'm adding unique sort numbers to my categories... Not sure what you mean by 'url rewriter' though? I haven't used anything like that...

Do you know how i would actually go about creating a 'shop by type' button that calls up all of the categories? i originally got '?cPath=0' thats generated when you use the 'breadcrumb catalog link' and thought i could just use it in a hardcoded link...

 

Jumping to another problem i'm having i've installed a new box in the right column (using your instructions from a previous post)... its working fine on the page and in the admin area im able to place in in either the right or left column also after an hour of headache the title is showing up correctly but i'm unable to set a sort order for it...

 

Code 1 here

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

class bm_right_img_box {

var $code = 'bm_right_img_box';

var $group = 'boxes';

var $title;

var $description;

var $sort_order;

var $enabled = false;

 

function bm_right_img_box() {

$this->title = MODULE_BOXES_RIGHT_IMG_BOX_TITLE;

$this->description = MODULE_BOXES_RIGHT_IMG_BOX_DESCRIPTION;

 

if ( defined('MODULE_BOXES_RIGHT_IMG_BOX_STATUS') ) {

$this->sort_order = MODULE_BOXES_RIGHT_IMG_BOX_SORT_ORDER;

$this->enabled = (MODULE_BOXES_RIGHT_IMG_BOX_STATUS == 'True');

 

$this->group = ((MODULE_BOXES_RIGHT_IMG_BOX_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');

}

}

 

function execute() {

global $oscTemplate;

 

// $data = '<div class="ui-widget infoBoxContainer">' .

// ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_RIGHT_IMG_BOX_BOX_TITLE . '</div>' .

// ' <div class="ui-widget-content infoBoxContents">' .

// ' <a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . MODULE_BOXES_RIGHT_IMG_BOX_PRIVACY . '</a><br />' .

 

 

$data = '<div class="ui-widget infoBoxContainer">' .

' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_RIGHT_IMG_BOX_BOX_TITLE .'</div>' .

' <div class="ui-widget-content infoBoxContents">' .

' <div class="img"><center>' .

tep_image( DIR_WS_IMAGES . 'over_250.png', 'free delivery on all orders over £250', '135', '309' ) .

'</center></div>' .

 

' </div>' .

'</div>';

 

 

 

$oscTemplate->addBlock($data, $this->group);

}

 

function isEnabled() {

return $this->enabled;

}

 

function check() {

return defined('MODULE_BOXES_RIGHT_IMG_BOX_STATUS');

}

 

function install() {

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable right img box Module', 'MODULE_BOXES_RIGHT_IMG_BOX_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_RIGHT_IMG_BOX_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())");

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_RIGHT_IMG_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");

}

 

function remove() {

tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");

}

 

function keys() {

return array('MODULE_BOXES_RIGHT_IMG_BOX_STATUS', 'MODULE_BOXES_RIGHT_IMG_BOX_CONTENT_PLACEMENT', 'MODULE_BOXES_RIGHT_IMG_BOX_SORT_ORDER');

}

}

?>

 

code 2 here

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

define('MODULE_BOXES_RIGHT_IMG_BOX_TITLE', 'right img box');

define('MODULE_BOXES_RIGHT_IMG_BOX_DESCRIPTION', 'right image box');

define('MODULE_BOXES_RIGHT_IMG_BOX_BOX_TITLE', '<center>Free Delivery over £250</center>');

?>

 

Thanks in advance mate

 

Memzz

Link to comment
Share on other sites

A URL rewriter changes the URL from the dynamic .php form to a static .html form. They're an obsolete response to the search engines bing unable to understand dynamic URLs -- a problem that no longer exists. The "Use search engine safe URLs" setting in your admin is a URL rewriter.

 

I don't know what you want a 'shop by type' button to do. Link to another page listing all of the categories?

 

The code that you posted looks right. You may have a corrupted database. Try uninstalling and reinstalling the box. If that doesn't work, search the configuration table in your database for a key with the value MODULE_BOXES_RIGHT_IMG_SORT_ORDER. If there are two of them, delete one.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...