Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement #4

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix product preview for the admin domain that is different than the f…
…rontend domain.
  • Loading branch information
sergeykalenyuk committed Oct 3, 2014
commit 299b2a101b7b258b40a02ffd04199c0f1eb24d1e
Original file line number Diff line number Diff line change
@@ -31,9 +31,8 @@ public function getHeader()
}
// Preview link
else {
$previewUrl = $this->getUrl('tadic_avp/product/preview', array(
'id' => $this->getProductId(),
'store_id' => $this->getProduct()->getStoreId(),
$previewUrl = Mage::getModel('core/url')->setStore($this->getProduct()->getStore())->getUrl('tadic_avp/product/preview', array(
'id' => $this->getProductId()
));
$header .= '&nbsp&nbsp<a href="'.$previewUrl.'" target="_blank">'.$this->__('preview').'</a>';
}
Original file line number Diff line number Diff line change
@@ -45,8 +45,7 @@ public function preDispatch()
public function previewAction()
{
// Get initial data from request
$defaultStoreViewId = ($storeView = Mage::app()->getDefaultStoreView()) ? $storeView->getId() : null;
$storeId = (int) $this->getRequest()->getParam('store_id', $defaultStoreViewId);
$storeId = (int) $this->getRequest()->getParam('store_id', Mage::app()->getStore()->getId());
$categoryId = (int) $this->getRequest()->getParam('category', false);
$productId = (int) $this->getRequest()->getParam('id');
$specifyOptions = $this->getRequest()->getParam('options');