Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cart.gif in breadcrumbs?


j_may80

Recommended Posts

Posted

Anyone have an example or link to a thread on putting a little cart.gif in the breadcrumb trail next to the word 'checkout'? I've searched with no luck.

 

I'm fascinated by all this.

 

:thumbsup:

Posted
Anyone have an example or link to a thread on putting a little cart.gif in the breadcrumb trail next to the word 'checkout'? I've searched with no luck.

 

I'm fascinated by all this.

 

:thumbsup:

 

Here is a modified version of the trail function in classes/breadcrumb.php that I wrote to place an "active" .gif at the end of the last crumb on every page and to remove the link that is associated with it.:

function trail($separator = ' - ') {
  $trail_string = '';

  for ($i=0, $n=sizeof($this->_trail); $i<($n-1); $i++) {
	if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {
	  $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="breadcrumb">' . $this->_trail[$i]['title'] . '</a>';
	} else {
	  $trail_string .= $this->_trail[$i]['title'];
	}

	if (($i+1) < $n) $trail_string .= $separator;
  }
  $trail_string .= $this->_trail[$i]['title'].'<img src="images/active.gif" border="0" alt="*">';
  return $trail_string;

}

 

Maybe you could play around with it to try your cart.gif idea.

 

Sheri

Posted

Thank you sheri! :)

 

Here is a modified version of the trail function in classes/breadcrumb.php that I wrote to place an "active" .gif at the end of the last crumb on every page and to remove the link that is associated with it.:

function trail($separator = ' - ') {
  $trail_string = '';

  for ($i=0, $n=sizeof($this->_trail); $i<($n-1); $i++) {
	if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {
	  $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="breadcrumb">' . $this->_trail[$i]['title'] . '</a>';
	} else {
	  $trail_string .= $this->_trail[$i]['title'];
	}

	if (($i+1) < $n) $trail_string .= $separator;
  }
  $trail_string .= $this->_trail[$i]['title'].'<img src="images/active.gif" border="0" alt="*">';
  return $trail_string;

}

 

Maybe you could play around with it to try your cart.gif idea.

 

Sheri

Archived

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

×
×
  • Create New...