Hello,
I am having trouble editing the home link next to the breadcrumb trail. Can some one tell me where I can find the page to edit?
Example
home: product1 product 2 etc.. I want to change the url on the home link.
Thanks
Chris
Hello,
I am having trouble editing the home link next to the breadcrumb trail. Can some one tell me where I can find the page to edit?
Example
home: product1 product 2 etc.. I want to change the url on the home link.
Thanks
Chris
Its in zencart\includes\classes\breadcrumb.php
See these lines
if (isset($this->_trail[$i]['link']) && zen_not_null($this->_trail[$i]['link']) && !$skip_link ) {
// this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
$trail_string .= ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
} else {
$trail_string .= ' <a href="' . $this->_trail[$i]['link'] . '">' . $this->_trail[$i]['title'] . '</a>';
}
} else {
$trail_string .= $this->_trail[$i]['title'];
Here value of
HTTP_SERVER . DIR_WS_CATALOG
is coming from config.php
Dont change the value of HTTP_SERVER or DIR_WS_CATALOG as it might create problems
So just hard code whatever value you want your cart to use
Test it and let me know if it works
San
Thank you very much it worked great!
Question- If you change the Home link, how are your customers going to get to the store's index?
This would really depend on the website in my opinion. Our site uses Mambo for the main content and then we switch to ZenCart for the purchasing. So in our case the customer could click on sign up now and be taken back to the storefront index. Otherwise most of our content is in the Mambo. So to sumerize I think it really depends on the website.Originally Posted by Kim
I think it is mainly an SEO issue, as the default "Home" link goes to main_page.php=index while the true home page is the domain itself. Google punishes people a LOT for making two different URLs lead to the same page [esp. when it is the home page!]. My main_page.php had a 5/10 rating, but the 'normal' home page had a 0/10 [finally moving up to 1/10 after applying this change, and i am sure it will be up to 5 eventually].Originally Posted by Kim
You can see what I mean at http://abasales.com/ [which is an SEO safe 302 to http://www.abasales.com/ ].
/vjl/
From the original Post:
"Its in zencart\includes\classes\breadcrumb.php
See these lines
if (isset($this->_trail[$i]['link']) && zen_not_null($this->_trail[$i]['link']) && !$skip_link ) {
// this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
$trail_string .= ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] ."
To be clear:
Do I replace . HTTP_SERVER . DIR_WS_CATALOG . within the single quotes with a specific IP Address?
In other words, from this:
<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">
To this?
<a href="'http://***.***.***.**/index.html'"> ?
Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.
Holzheimer
Fan Odyssey
I'm looking to do the same thing as chrisp8756. We are using Wordpress to post our products and then Add to Cart takes them to the Zen Cart. But, if they hit Home, we want them to go back to the Wordpress site, which is our storefront in this case.
So, how do I edit the breadcrumb file correctly as to not break the cart?
Thanks!
You can edit the link by hard coding it in the following file:
/includes/classes/breadcrumb.php
Find this line:
And replace with something like this:PHP Code:
$trail_string .= ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
This would take the user back to the DOMAIN home page. If you have another url that you want the "home" link to go to (let's say Wordpress is in another directory other than the root) then you would replace " . HTTP_SERVER . " with your url of choice.PHP Code:
//$trail_string .= ' <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
//Custom code for new "Home Link" url
$trail_string .= ' <a href="' . HTTP_SERVER . '">' . $this->_trail[$i]['title'] . '</a>';
//End Custom code for new "Home Link"
I had to do this for one site we ran and it worked perfectly. The store ran under one directory, but the actual home page of the site was under the root.
Eric
20 Ways to Increase Sales Using Zen Cart
Zen Cart contribs: Simple Google Analytics, Export Shipping Information
Bookmarks