0 ? $parsedArticleId : $builtInArticleId;
$articleController = new ShopArticleController();
$article = $articleController->GetArticleById($articleId);
$articleImages = $articleController->GetArticleImagesByArticleId($articleId);
// Varianten
$articleVariants = $articleController->GetVariantsByArticleId($articleId);
$articleVariantId = ShopArticleViewHelper::ParseVariantId(UrlHelper::GetCurrentFullUrl());
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
// if e.g. more than one promoted articles are on one page, we might receive a variant-id
// in the URL which doesn't belong to the current article and might affect price display etc.
if ( $articleVariant && $articleId != $articleVariant->ArticleId ){ // 2020-06-02, Uwe Keim: Achtung, hier NICHT "!==" vergleichen.
$articleVariant = null;
$articleVariantId = 0;
}
if ( $articleVariantId<=0 && !empty($articleVariants) ){
$articleVariantId = $articleVariants[ 0]->Id;
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
}
$articleOptions = $articleController->GetArticleOptionsByArticleId($articleId);
$articleFullJson = $articleController->GetArticleFullJson($articleId, $pathToRoot, 373);
$vc = new ShopOptionValueController();
$imagePlaceholder = $pathToRoot . $vc->Value('image-placeholder');
$lec = new ShopLegalEntityController();
$le = $lec->GetLegalEntityById(ZPS_LEGAL_ENTITY_ID);
$shipmentCostsPageOid = $le->ShipmentCostsPageOid;
$ppc = new ShopPreparedArticleController();
$ppp = new ShopPreparedPageController();
$pp3 = $ppc->GetByOid($shipmentCostsPageOid);
if ( is_null($pp3) ) $pp3 = $ppp->GetByOid($shipmentCostsPageOid);
$shipmentCostsLink = is_null($pp3) ? '' : PathHelper::JoinPathVirtual( $pathToRoot, $pp3->RelativeUrl );
$variantsHtml = '';
$articleId = '3385';
if ( !empty($articleVariants) ){
foreach ($articleOptions as $index => $articleOption) {
$variantsHtml .= '
';
}
}
// if we have a current variant, find its image in the articleimage array
if ( $article!==null ) {
$currentPrice = $article->Price;
$currentNonReducedPrice = $article->NonReducedPrice;
$currentNumber = $article->Number;
// Grundpreis
$grundPreis = "";
if ( $article->UseGrundpreis ) {
$grundPreis = '
';
}
}
if ( !empty($articleVariant) ){
$currentPrice = $articleVariant->Price;
$currentNonReducedPrice = $articleVariant->NonReducedPrice;
$currentNumber = $articleVariant->Number;
// Grundpreis
$grundPreis = "";
if ( $articleVariant->UseGrundpreis ) {
$grundPreis = '
';
// TODO: wenn Bsiseinheit z.B. 2L sind, hier auch $GrundpreisBasiseinheitValue mit einbauen und leer lassen wenn =1
}
if ( !empty($articleVariant->ImageUnique) && !empty($articleImages) ){
$variantImagePosition = array_search($articleVariant->ImageUnique, array_column($articleImages, 'Unique'));
if ( $variantImagePosition ){
$variantImage = $articleImages[ $variantImagePosition];
}
}
}
$imgHtml = '
';
if ( $article!==null ) {
foreach ($articleImages as $index=>$articleImage) {
$tbwidth = 200;
$ccwidth = 373;
if ( (empty($variantImagePosition) && $index + 1 === 1) || (!empty($variantImagePosition) && $variantImagePosition == $index) ){
$thumbclass=' class="active"';
}
else{
$thumbclass="";
}
if ( $index + 1 === 1 ){
if ( !empty($variantImage) ){
// display variant image image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
else{
// display first article image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
$imgHtml .= '
';
if ( count($articleImages) > 1 ){
$imgHtml .= '
';
$imgHtml .= ' ';
}
} else {
//$imgHtml .= ' ';
$imgHtml .= ' ';
}
if ( count($articleImages) > 1 && $index + 1 === count($articleImages) ){
$imgHtml .= ' ';
}
}
if ( empty($articleImages) ){
$imgHtml = '
';
$imgHtml .= '
';
$imgHtml .= '
';
}
}
?>
IsActive ) { ?>
= $tc->Text('alert-article-no-preview') ?> = $tc->Text('alert-article-not-found') ?> Shop: Highlight-Artikel kann im Layout-Designer nicht angezeigt werden.
0 ? $parsedArticleId : $builtInArticleId;
$articleController = new ShopArticleController();
$article = $articleController->GetArticleById($articleId);
$articleImages = $articleController->GetArticleImagesByArticleId($articleId);
// Varianten
$articleVariants = $articleController->GetVariantsByArticleId($articleId);
$articleVariantId = ShopArticleViewHelper::ParseVariantId(UrlHelper::GetCurrentFullUrl());
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
// if e.g. more than one promoted articles are on one page, we might receive a variant-id
// in the URL which doesn't belong to the current article and might affect price display etc.
if ( $articleVariant && $articleId != $articleVariant->ArticleId ){ // 2020-06-02, Uwe Keim: Achtung, hier NICHT "!==" vergleichen.
$articleVariant = null;
$articleVariantId = 0;
}
if ( $articleVariantId<=0 && !empty($articleVariants) ){
$articleVariantId = $articleVariants[ 0]->Id;
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
}
$articleOptions = $articleController->GetArticleOptionsByArticleId($articleId);
$articleFullJson = $articleController->GetArticleFullJson($articleId, $pathToRoot, 373);
$vc = new ShopOptionValueController();
$imagePlaceholder = $pathToRoot . $vc->Value('image-placeholder');
$lec = new ShopLegalEntityController();
$le = $lec->GetLegalEntityById(ZPS_LEGAL_ENTITY_ID);
$shipmentCostsPageOid = $le->ShipmentCostsPageOid;
$ppc = new ShopPreparedArticleController();
$ppp = new ShopPreparedPageController();
$pp3 = $ppc->GetByOid($shipmentCostsPageOid);
if ( is_null($pp3) ) $pp3 = $ppp->GetByOid($shipmentCostsPageOid);
$shipmentCostsLink = is_null($pp3) ? '' : PathHelper::JoinPathVirtual( $pathToRoot, $pp3->RelativeUrl );
$variantsHtml = '';
$articleId = '3386';
if ( !empty($articleVariants) ){
foreach ($articleOptions as $index => $articleOption) {
$variantsHtml .= '
Id . '" class="variant-option">' . $articleOption->Name;
$variantsHtml .= 'Id . '" name="option-' . $articleOption->Id . '" class="variant-option-single-dropdown">';
foreach ($articleOption->Values as $articleOptionValue) {
$selectedOptionValue = empty($articleVariant) || empty($articleVariant->OptionValues) || !array_key_exists($index, $articleVariant->OptionValues) ? '' : $articleVariant->OptionValues[/* ZP-Parser: Nicht entfernen; trennt '[' vom Variablennamen. */$index];
$variantsHtml .= 'Value, $selectedOptionValue) . '>' . $articleOptionValue->Value . ' ';
}
$variantsHtml .= ' ';
$variantsHtml .= ' ';
}
}
// if we have a current variant, find its image in the articleimage array
if ( $article!==null ) {
$currentPrice = $article->Price;
$currentNonReducedPrice = $article->NonReducedPrice;
$currentNumber = $article->Number;
// Grundpreis
$grundPreis = "";
if ( $article->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($article) . ' ';
}
}
if ( !empty($articleVariant) ){
$currentPrice = $articleVariant->Price;
$currentNonReducedPrice = $articleVariant->NonReducedPrice;
$currentNumber = $articleVariant->Number;
// Grundpreis
$grundPreis = "";
if ( $articleVariant->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($articleVariant) . ' ';
// TODO: wenn Bsiseinheit z.B. 2L sind, hier auch $GrundpreisBasiseinheitValue mit einbauen und leer lassen wenn =1
}
if ( !empty($articleVariant->ImageUnique) && !empty($articleImages) ){
$variantImagePosition = array_search($articleVariant->ImageUnique, array_column($articleImages, 'Unique'));
if ( $variantImagePosition ){
$variantImage = $articleImages[ $variantImagePosition];
}
}
}
$imgHtml = '
no image found ';
if ( $article!==null ) {
foreach ($articleImages as $index=>$articleImage) {
$tbwidth = 200;
$ccwidth = 373;
if ( (empty($variantImagePosition) && $index + 1 === 1) || (!empty($variantImagePosition) && $variantImagePosition == $index) ){
$thumbclass=' class="active"';
}
else{
$thumbclass="";
}
if ( $index + 1 === 1 ){
if ( !empty($variantImage) ){
// display variant image image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
else{
// display first article image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
$imgHtml .= '
';
if ( count($articleImages) > 1 ){
$imgHtml .= '
';
$imgHtml .= ' ';
}
} else {
//$imgHtml .= ' ';
$imgHtml .= ' ';
}
if ( count($articleImages) > 1 && $index + 1 === count($articleImages) ){
$imgHtml .= ' ';
}
}
if ( empty($articleImages) ){
$imgHtml = '
';
$imgHtml .= '
';
$imgHtml .= '
';
}
}
?>
IsActive ) { ?>
= $tc->Text('alert-article-no-preview') ?> = $tc->Text('alert-article-not-found') ?> Shop: Highlight-Artikel kann im Layout-Designer nicht angezeigt werden.
0 ? $parsedArticleId : $builtInArticleId;
$articleController = new ShopArticleController();
$article = $articleController->GetArticleById($articleId);
$articleImages = $articleController->GetArticleImagesByArticleId($articleId);
// Varianten
$articleVariants = $articleController->GetVariantsByArticleId($articleId);
$articleVariantId = ShopArticleViewHelper::ParseVariantId(UrlHelper::GetCurrentFullUrl());
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
// if e.g. more than one promoted articles are on one page, we might receive a variant-id
// in the URL which doesn't belong to the current article and might affect price display etc.
if ( $articleVariant && $articleId != $articleVariant->ArticleId ){ // 2020-06-02, Uwe Keim: Achtung, hier NICHT "!==" vergleichen.
$articleVariant = null;
$articleVariantId = 0;
}
if ( $articleVariantId<=0 && !empty($articleVariants) ){
$articleVariantId = $articleVariants[ 0]->Id;
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
}
$articleOptions = $articleController->GetArticleOptionsByArticleId($articleId);
$articleFullJson = $articleController->GetArticleFullJson($articleId, $pathToRoot, 373);
$vc = new ShopOptionValueController();
$imagePlaceholder = $pathToRoot . $vc->Value('image-placeholder');
$lec = new ShopLegalEntityController();
$le = $lec->GetLegalEntityById(ZPS_LEGAL_ENTITY_ID);
$shipmentCostsPageOid = $le->ShipmentCostsPageOid;
$ppc = new ShopPreparedArticleController();
$ppp = new ShopPreparedPageController();
$pp3 = $ppc->GetByOid($shipmentCostsPageOid);
if ( is_null($pp3) ) $pp3 = $ppp->GetByOid($shipmentCostsPageOid);
$shipmentCostsLink = is_null($pp3) ? '' : PathHelper::JoinPathVirtual( $pathToRoot, $pp3->RelativeUrl );
$variantsHtml = '';
$articleId = '3392';
if ( !empty($articleVariants) ){
foreach ($articleOptions as $index => $articleOption) {
$variantsHtml .= '
Id . '" class="variant-option">' . $articleOption->Name;
$variantsHtml .= 'Id . '" name="option-' . $articleOption->Id . '" class="variant-option-single-dropdown">';
foreach ($articleOption->Values as $articleOptionValue) {
$selectedOptionValue = empty($articleVariant) || empty($articleVariant->OptionValues) || !array_key_exists($index, $articleVariant->OptionValues) ? '' : $articleVariant->OptionValues[/* ZP-Parser: Nicht entfernen; trennt '[' vom Variablennamen. */$index];
$variantsHtml .= 'Value, $selectedOptionValue) . '>' . $articleOptionValue->Value . ' ';
}
$variantsHtml .= ' ';
$variantsHtml .= ' ';
}
}
// if we have a current variant, find its image in the articleimage array
if ( $article!==null ) {
$currentPrice = $article->Price;
$currentNonReducedPrice = $article->NonReducedPrice;
$currentNumber = $article->Number;
// Grundpreis
$grundPreis = "";
if ( $article->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($article) . ' ';
}
}
if ( !empty($articleVariant) ){
$currentPrice = $articleVariant->Price;
$currentNonReducedPrice = $articleVariant->NonReducedPrice;
$currentNumber = $articleVariant->Number;
// Grundpreis
$grundPreis = "";
if ( $articleVariant->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($articleVariant) . ' ';
// TODO: wenn Bsiseinheit z.B. 2L sind, hier auch $GrundpreisBasiseinheitValue mit einbauen und leer lassen wenn =1
}
if ( !empty($articleVariant->ImageUnique) && !empty($articleImages) ){
$variantImagePosition = array_search($articleVariant->ImageUnique, array_column($articleImages, 'Unique'));
if ( $variantImagePosition ){
$variantImage = $articleImages[ $variantImagePosition];
}
}
}
$imgHtml = '
no image found ';
if ( $article!==null ) {
foreach ($articleImages as $index=>$articleImage) {
$tbwidth = 200;
$ccwidth = 373;
if ( (empty($variantImagePosition) && $index + 1 === 1) || (!empty($variantImagePosition) && $variantImagePosition == $index) ){
$thumbclass=' class="active"';
}
else{
$thumbclass="";
}
if ( $index + 1 === 1 ){
if ( !empty($variantImage) ){
// display variant image image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
else{
// display first article image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
$imgHtml .= '
';
if ( count($articleImages) > 1 ){
$imgHtml .= '
';
$imgHtml .= ' ';
}
} else {
//$imgHtml .= ' ';
$imgHtml .= ' ';
}
if ( count($articleImages) > 1 && $index + 1 === count($articleImages) ){
$imgHtml .= ' ';
}
}
if ( empty($articleImages) ){
$imgHtml = '
';
$imgHtml .= '
';
$imgHtml .= '
';
}
}
?>
IsActive ) { ?>
= $tc->Text('alert-article-no-preview') ?> = $tc->Text('alert-article-not-found') ?> Shop: Highlight-Artikel kann im Layout-Designer nicht angezeigt werden.
0 ? $parsedArticleId : $builtInArticleId;
$articleController = new ShopArticleController();
$article = $articleController->GetArticleById($articleId);
$articleImages = $articleController->GetArticleImagesByArticleId($articleId);
// Varianten
$articleVariants = $articleController->GetVariantsByArticleId($articleId);
$articleVariantId = ShopArticleViewHelper::ParseVariantId(UrlHelper::GetCurrentFullUrl());
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
// if e.g. more than one promoted articles are on one page, we might receive a variant-id
// in the URL which doesn't belong to the current article and might affect price display etc.
if ( $articleVariant && $articleId != $articleVariant->ArticleId ){ // 2020-06-02, Uwe Keim: Achtung, hier NICHT "!==" vergleichen.
$articleVariant = null;
$articleVariantId = 0;
}
if ( $articleVariantId<=0 && !empty($articleVariants) ){
$articleVariantId = $articleVariants[ 0]->Id;
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
}
$articleOptions = $articleController->GetArticleOptionsByArticleId($articleId);
$articleFullJson = $articleController->GetArticleFullJson($articleId, $pathToRoot, 373);
$vc = new ShopOptionValueController();
$imagePlaceholder = $pathToRoot . $vc->Value('image-placeholder');
$lec = new ShopLegalEntityController();
$le = $lec->GetLegalEntityById(ZPS_LEGAL_ENTITY_ID);
$shipmentCostsPageOid = $le->ShipmentCostsPageOid;
$ppc = new ShopPreparedArticleController();
$ppp = new ShopPreparedPageController();
$pp3 = $ppc->GetByOid($shipmentCostsPageOid);
if ( is_null($pp3) ) $pp3 = $ppp->GetByOid($shipmentCostsPageOid);
$shipmentCostsLink = is_null($pp3) ? '' : PathHelper::JoinPathVirtual( $pathToRoot, $pp3->RelativeUrl );
$variantsHtml = '';
$articleId = '3674';
if ( !empty($articleVariants) ){
foreach ($articleOptions as $index => $articleOption) {
$variantsHtml .= '
Id . '" class="variant-option">' . $articleOption->Name;
$variantsHtml .= 'Id . '" name="option-' . $articleOption->Id . '" class="variant-option-single-dropdown">';
foreach ($articleOption->Values as $articleOptionValue) {
$selectedOptionValue = empty($articleVariant) || empty($articleVariant->OptionValues) || !array_key_exists($index, $articleVariant->OptionValues) ? '' : $articleVariant->OptionValues[/* ZP-Parser: Nicht entfernen; trennt '[' vom Variablennamen. */$index];
$variantsHtml .= 'Value, $selectedOptionValue) . '>' . $articleOptionValue->Value . ' ';
}
$variantsHtml .= ' ';
$variantsHtml .= ' ';
}
}
// if we have a current variant, find its image in the articleimage array
if ( $article!==null ) {
$currentPrice = $article->Price;
$currentNonReducedPrice = $article->NonReducedPrice;
$currentNumber = $article->Number;
// Grundpreis
$grundPreis = "";
if ( $article->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($article) . ' ';
}
}
if ( !empty($articleVariant) ){
$currentPrice = $articleVariant->Price;
$currentNonReducedPrice = $articleVariant->NonReducedPrice;
$currentNumber = $articleVariant->Number;
// Grundpreis
$grundPreis = "";
if ( $articleVariant->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($articleVariant) . ' ';
// TODO: wenn Bsiseinheit z.B. 2L sind, hier auch $GrundpreisBasiseinheitValue mit einbauen und leer lassen wenn =1
}
if ( !empty($articleVariant->ImageUnique) && !empty($articleImages) ){
$variantImagePosition = array_search($articleVariant->ImageUnique, array_column($articleImages, 'Unique'));
if ( $variantImagePosition ){
$variantImage = $articleImages[ $variantImagePosition];
}
}
}
$imgHtml = '
no image found ';
if ( $article!==null ) {
foreach ($articleImages as $index=>$articleImage) {
$tbwidth = 200;
$ccwidth = 373;
if ( (empty($variantImagePosition) && $index + 1 === 1) || (!empty($variantImagePosition) && $variantImagePosition == $index) ){
$thumbclass=' class="active"';
}
else{
$thumbclass="";
}
if ( $index + 1 === 1 ){
if ( !empty($variantImage) ){
// display variant image image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
else{
// display first article image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
$imgHtml .= '
';
if ( count($articleImages) > 1 ){
$imgHtml .= '
';
$imgHtml .= ' ';
}
} else {
//$imgHtml .= ' ';
$imgHtml .= ' ';
}
if ( count($articleImages) > 1 && $index + 1 === count($articleImages) ){
$imgHtml .= ' ';
}
}
if ( empty($articleImages) ){
$imgHtml = '
';
$imgHtml .= '
';
$imgHtml .= '
';
}
}
?>
IsActive ) { ?>
= $tc->Text('alert-article-no-preview') ?> = $tc->Text('alert-article-not-found') ?> Shop: Highlight-Artikel kann im Layout-Designer nicht angezeigt werden.
0 ? $parsedArticleId : $builtInArticleId;
$articleController = new ShopArticleController();
$article = $articleController->GetArticleById($articleId);
$articleImages = $articleController->GetArticleImagesByArticleId($articleId);
// Varianten
$articleVariants = $articleController->GetVariantsByArticleId($articleId);
$articleVariantId = ShopArticleViewHelper::ParseVariantId(UrlHelper::GetCurrentFullUrl());
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
// if e.g. more than one promoted articles are on one page, we might receive a variant-id
// in the URL which doesn't belong to the current article and might affect price display etc.
if ( $articleVariant && $articleId != $articleVariant->ArticleId ){ // 2020-06-02, Uwe Keim: Achtung, hier NICHT "!==" vergleichen.
$articleVariant = null;
$articleVariantId = 0;
}
if ( $articleVariantId<=0 && !empty($articleVariants) ){
$articleVariantId = $articleVariants[ 0]->Id;
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
}
$articleOptions = $articleController->GetArticleOptionsByArticleId($articleId);
$articleFullJson = $articleController->GetArticleFullJson($articleId, $pathToRoot, 373);
$vc = new ShopOptionValueController();
$imagePlaceholder = $pathToRoot . $vc->Value('image-placeholder');
$lec = new ShopLegalEntityController();
$le = $lec->GetLegalEntityById(ZPS_LEGAL_ENTITY_ID);
$shipmentCostsPageOid = $le->ShipmentCostsPageOid;
$ppc = new ShopPreparedArticleController();
$ppp = new ShopPreparedPageController();
$pp3 = $ppc->GetByOid($shipmentCostsPageOid);
if ( is_null($pp3) ) $pp3 = $ppp->GetByOid($shipmentCostsPageOid);
$shipmentCostsLink = is_null($pp3) ? '' : PathHelper::JoinPathVirtual( $pathToRoot, $pp3->RelativeUrl );
$variantsHtml = '';
$articleId = '3675';
if ( !empty($articleVariants) ){
foreach ($articleOptions as $index => $articleOption) {
$variantsHtml .= '
Id . '" class="variant-option">' . $articleOption->Name;
$variantsHtml .= 'Id . '" name="option-' . $articleOption->Id . '" class="variant-option-single-dropdown">';
foreach ($articleOption->Values as $articleOptionValue) {
$selectedOptionValue = empty($articleVariant) || empty($articleVariant->OptionValues) || !array_key_exists($index, $articleVariant->OptionValues) ? '' : $articleVariant->OptionValues[/* ZP-Parser: Nicht entfernen; trennt '[' vom Variablennamen. */$index];
$variantsHtml .= 'Value, $selectedOptionValue) . '>' . $articleOptionValue->Value . ' ';
}
$variantsHtml .= ' ';
$variantsHtml .= ' ';
}
}
// if we have a current variant, find its image in the articleimage array
if ( $article!==null ) {
$currentPrice = $article->Price;
$currentNonReducedPrice = $article->NonReducedPrice;
$currentNumber = $article->Number;
// Grundpreis
$grundPreis = "";
if ( $article->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($article) . ' ';
}
}
if ( !empty($articleVariant) ){
$currentPrice = $articleVariant->Price;
$currentNonReducedPrice = $articleVariant->NonReducedPrice;
$currentNumber = $articleVariant->Number;
// Grundpreis
$grundPreis = "";
if ( $articleVariant->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($articleVariant) . ' ';
// TODO: wenn Bsiseinheit z.B. 2L sind, hier auch $GrundpreisBasiseinheitValue mit einbauen und leer lassen wenn =1
}
if ( !empty($articleVariant->ImageUnique) && !empty($articleImages) ){
$variantImagePosition = array_search($articleVariant->ImageUnique, array_column($articleImages, 'Unique'));
if ( $variantImagePosition ){
$variantImage = $articleImages[ $variantImagePosition];
}
}
}
$imgHtml = '
no image found ';
if ( $article!==null ) {
foreach ($articleImages as $index=>$articleImage) {
$tbwidth = 200;
$ccwidth = 373;
if ( (empty($variantImagePosition) && $index + 1 === 1) || (!empty($variantImagePosition) && $variantImagePosition == $index) ){
$thumbclass=' class="active"';
}
else{
$thumbclass="";
}
if ( $index + 1 === 1 ){
if ( !empty($variantImage) ){
// display variant image image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
else{
// display first article image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
$imgHtml .= '
';
if ( count($articleImages) > 1 ){
$imgHtml .= '
';
$imgHtml .= ' ';
}
} else {
//$imgHtml .= ' ';
$imgHtml .= ' ';
}
if ( count($articleImages) > 1 && $index + 1 === count($articleImages) ){
$imgHtml .= ' ';
}
}
if ( empty($articleImages) ){
$imgHtml = '
';
$imgHtml .= '
';
$imgHtml .= '
';
}
}
?>
IsActive ) { ?>
= $tc->Text('alert-article-no-preview') ?> = $tc->Text('alert-article-not-found') ?> Shop: Highlight-Artikel kann im Layout-Designer nicht angezeigt werden.
0 ? $parsedArticleId : $builtInArticleId;
$articleController = new ShopArticleController();
$article = $articleController->GetArticleById($articleId);
$articleImages = $articleController->GetArticleImagesByArticleId($articleId);
// Varianten
$articleVariants = $articleController->GetVariantsByArticleId($articleId);
$articleVariantId = ShopArticleViewHelper::ParseVariantId(UrlHelper::GetCurrentFullUrl());
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
// if e.g. more than one promoted articles are on one page, we might receive a variant-id
// in the URL which doesn't belong to the current article and might affect price display etc.
if ( $articleVariant && $articleId != $articleVariant->ArticleId ){ // 2020-06-02, Uwe Keim: Achtung, hier NICHT "!==" vergleichen.
$articleVariant = null;
$articleVariantId = 0;
}
if ( $articleVariantId<=0 && !empty($articleVariants) ){
$articleVariantId = $articleVariants[ 0]->Id;
$articleVariant = $articleController->GetArticleVariantById($articleVariantId, $pathToRoot, 373);
}
$articleOptions = $articleController->GetArticleOptionsByArticleId($articleId);
$articleFullJson = $articleController->GetArticleFullJson($articleId, $pathToRoot, 373);
$vc = new ShopOptionValueController();
$imagePlaceholder = $pathToRoot . $vc->Value('image-placeholder');
$lec = new ShopLegalEntityController();
$le = $lec->GetLegalEntityById(ZPS_LEGAL_ENTITY_ID);
$shipmentCostsPageOid = $le->ShipmentCostsPageOid;
$ppc = new ShopPreparedArticleController();
$ppp = new ShopPreparedPageController();
$pp3 = $ppc->GetByOid($shipmentCostsPageOid);
if ( is_null($pp3) ) $pp3 = $ppp->GetByOid($shipmentCostsPageOid);
$shipmentCostsLink = is_null($pp3) ? '' : PathHelper::JoinPathVirtual( $pathToRoot, $pp3->RelativeUrl );
$variantsHtml = '';
$articleId = '3678';
if ( !empty($articleVariants) ){
foreach ($articleOptions as $index => $articleOption) {
$variantsHtml .= '
Id . '" class="variant-option">' . $articleOption->Name;
$variantsHtml .= 'Id . '" name="option-' . $articleOption->Id . '" class="variant-option-single-dropdown">';
foreach ($articleOption->Values as $articleOptionValue) {
$selectedOptionValue = empty($articleVariant) || empty($articleVariant->OptionValues) || !array_key_exists($index, $articleVariant->OptionValues) ? '' : $articleVariant->OptionValues[/* ZP-Parser: Nicht entfernen; trennt '[' vom Variablennamen. */$index];
$variantsHtml .= 'Value, $selectedOptionValue) . '>' . $articleOptionValue->Value . ' ';
}
$variantsHtml .= ' ';
$variantsHtml .= ' ';
}
}
// if we have a current variant, find its image in the articleimage array
if ( $article!==null ) {
$currentPrice = $article->Price;
$currentNonReducedPrice = $article->NonReducedPrice;
$currentNumber = $article->Number;
// Grundpreis
$grundPreis = "";
if ( $article->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($article) . ' ';
}
}
if ( !empty($articleVariant) ){
$currentPrice = $articleVariant->Price;
$currentNonReducedPrice = $articleVariant->NonReducedPrice;
$currentNumber = $articleVariant->Number;
// Grundpreis
$grundPreis = "";
if ( $articleVariant->UseGrundpreis ) {
$grundPreis = '
' . ShopGrundpreisHelper::FormatGrundpreis($articleVariant) . ' ';
// TODO: wenn Bsiseinheit z.B. 2L sind, hier auch $GrundpreisBasiseinheitValue mit einbauen und leer lassen wenn =1
}
if ( !empty($articleVariant->ImageUnique) && !empty($articleImages) ){
$variantImagePosition = array_search($articleVariant->ImageUnique, array_column($articleImages, 'Unique'));
if ( $variantImagePosition ){
$variantImage = $articleImages[ $variantImagePosition];
}
}
}
$imgHtml = '
no image found ';
if ( $article!==null ) {
foreach ($articleImages as $index=>$articleImage) {
$tbwidth = 200;
$ccwidth = 373;
if ( (empty($variantImagePosition) && $index + 1 === 1) || (!empty($variantImagePosition) && $variantImagePosition == $index) ){
$thumbclass=' class="active"';
}
else{
$thumbclass="";
}
if ( $index + 1 === 1 ){
if ( !empty($variantImage) ){
// display variant image image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
else{
// display first article image as large, initially displayed image
$imgHtml = '
';
$imgHtml .= '
';
}
$imgHtml .= '
';
if ( count($articleImages) > 1 ){
$imgHtml .= '
';
$imgHtml .= ' ';
}
} else {
//$imgHtml .= ' ';
$imgHtml .= ' ';
}
if ( count($articleImages) > 1 && $index + 1 === count($articleImages) ){
$imgHtml .= ' ';
}
}
if ( empty($articleImages) ){
$imgHtml = '
';
$imgHtml .= '
';
$imgHtml .= '
';
}
}
?>
IsActive ) { ?>
= $tc->Text('alert-article-no-preview') ?> = $tc->Text('alert-article-not-found') ?>