Skip to content

Commit

Permalink
Show the view/preview url when isSingleStoreMode() is true. Refs #4167.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeykalenyuk committed Sep 25, 2014
1 parent 9947b57 commit 5cf2cb2
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ public function getHeader()
return $header;
}

// Do not add view/preview link at the default scope
if ( ! Mage::app()->isSingleStoreMode() && $this->getProduct()->getStore()->isAdmin()) {
return $header;
}

// Do not add view/preview link if the product is not assigned to the current store
if ( ! in_array($this->getProduct()->getStoreId(), $this->getProduct()->getStoreIds())) {
return $header;
if ( ! Mage::app()->isSingleStoreMode()) {
// Do not add view/preview link at the default scope
if ($this->getProduct()->getStore()->isAdmin()) {
return $header;
}
// Do not add view/preview link if the product is not assigned to the current store
if ( ! in_array($this->getProduct()->getStoreId(), $this->getProduct()->getStoreIds())) {
return $header;
}
}

// Add preview link only if the product is available on frontend
Expand Down

0 comments on commit 5cf2cb2

Please sign in to comment.