public function SetPanelSettings() { $GLOBALS['SNIPPETS']['SimilarProductsByCustomerViews'] = ''; if (!ISC_PRODUCT_VIEWS::isEnabled() || !ISC_PRODUCT_VIEWS::getNumberOfProductsToShow()) { $this->DontDisplay = true; return; } /** @var ISC_PRODUCT*/ $product = $GLOBALS['ISC_CLASS_PRODUCT']; $productId = $product->GetProductId(); $related = ISC_PRODUCT_VIEWS::getRelatedProducts($productId, ISC_PRODUCT_VIEWS::getNumberOfProductsToShow()); if (empty($related)) { $this->DontDisplay = true; return; } $GLOBALS['AlternateClass'] = ''; foreach ($related as $row) { $this->setProductGlobals($row); $GLOBALS['SNIPPETS']['SimilarProductsByCustomerViews'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("SimilarProductsByCustomerViewsItem"); } }
protected function _OnSessionEnd($sessionHash) { ISC_PRODUCT_VIEWS::onSessionEnd($sessionHash); }
public function ShowPage() { if ($this->_prodid > 0) { // Check that the customer has permission to view this product $canView = false; $productCategories = explode(',', $this->_product['prodcatids']); foreach($productCategories as $categoryId) { // Do we have permission to access this category? if(CustomerGroupHasAccessToCategory($categoryId)) { $canView = true; } } if($canView == false) { $noPermissionsPage = GetClass('ISC_403'); $noPermissionsPage->HandlePage(); exit; } if ($this->_prodmetakeywords != "") { $GLOBALS['ISC_CLASS_TEMPLATE']->SetMetaKeywords(isc_html_escape($this->_prodmetakeywords)); } if ($this->_prodmetadesc != "") { $GLOBALS['ISC_CLASS_TEMPLATE']->SetMetaDescription(isc_html_escape($this->_prodmetadesc)); } $GLOBALS['ISC_CLASS_TEMPLATE']->SetCanonicalLink(ProdLink($this->_prodname)); $GLOBALS['CompareLink'] = CompareLink(); // If we're showing images as a lightbox, we need to load up the URLs for the other images for this product if(GetConfig('ProductImageMode') == 'lightbox') { $GLOBALS['AdditionalStylesheets'][] = GetConfig('ShopPath').'/javascript/jquery/plugins/lightbox/lightbox.css'; } $GLOBALS['AdditionalMetaTags'] = ISC_OPENGRAPH::getMetaTags($this->_opengraph_type, $this->_opengraph_title, $this->_opengraph_description, $this->_opengraph_image, ProdLink($this->_prodname)); ISC_PRODUCT_VIEWS::logView($this->_prodid); $GLOBALS['ISC_CLASS_TEMPLATE']->SetPageTitle($this->BuildTitle()); $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate($this->getLayoutFile()); $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate(); } // Visiting an invalid product, show a lovely error message else { $GLOBALS['ISC_CLASS_404'] = GetClass('ISC_404'); $GLOBALS['ISC_CLASS_404']->HandlePage(); exit; } }
public function deletePosthook($productId, $node) { ISC_PRODUCT_IMAGE::deleteOrphanedProductImages(); ISC_PRODUCT_VIEWS::onProductDelete($productId); return true; }