customer_gallerysimple.phtml
2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php // $NcImages = Mage::helper('anc_image/ncmodel')->getNcImagesForCustomer(); ?>
<?php
$params=Mage::app()->getRequest()->getParams();
if(!$ncalbum_id = $this->getNcalbumId()) {
$ncalbum_id = Mage::app()->getRequest()->getParam('ncalbum_id');
}
if(!$ncalbum_id) {
$customer = Mage::getSingleton('customer/session')->getCustomer();
$ncalbum_id = Mage::getModel('anc_album/ncalbum')->load($customer->getId(), 'customer_id')->getId();
}
if($ncalbum_id) {
if($params['ncobject_album_id']&&$params['ncobjectsingle']){
$NcImages = Mage::helper('anc_image/ncmodel')->getNcImagesForAlbum($params['ncobject_album_id']);
}else{
$NcImages = Mage::helper('anc_image/ncmodel')->getNcImagesForAlbum($ncalbum_id);
}
} else {
D::li('getNcImagesForCustomer() - nix mit album aber anscheinend wohl trotzdem keine bilder in der gallerie');
$NcImages = Mage::helper('anc_image/ncmodel')->getNcImagesForCustomer();
}
?>
<ul class="gallery AncGalleryImages">
<?php foreach($NcImages as $ncimage ): ?>
<?php $NcImagePath = Mage::helper('anc_image/ncimage')->getNcImagePath($ncimage['entity_id'], 'relative', 'thumbnail'); ?>
<?php $NcImagePath_original = Mage::helper('anc_image/ncimage')->getNcImagePath($ncimage['entity_id'], 'relative', 'original'); ?>
<?php $ncimage_title = Mage::helper('anc_image/ncimage')->getNcImageMetaDataAsHtml($ncimage['entity_id']); ?>
<a data-site="<?php echo $this->getUrl('ancimage/customer/showNcImageForm', array('id'=>$ncimage['entity_id'])) ?>"
class="ancimage-showNcImageForm"
rel="prettyPhoto[pp_gal2]"
href="<?php echo DS.$NcImagePath_original ?>"
>
<div class="anc_image_wrapper">
<a class="anc_image_choose"
href="#"
data-anc_image_id="<?php echo $ncimage['entity_id'] ?>"
data-anc_image_url="<?php echo DS.$NcImagePath_original ?>"
data-site="<?php echo $this->getUrl('ancimage/customer/showNcImageForm', array('id'=>$ncimage['entity_id'])) ?>"
title='<?php if($ncimage['name']):?><span class="header"><?php echo $ncimage['name']; ?></span><?php endif; ?><span class="content"><?php if($ncimage['comment']): echo $ncimage['comment'].'<br/><br/>'; endif; ?><?php echo $ncimage_title; ?></span>'
>
<img src="<?php echo DS.$NcImagePath ?>" class="anc-image-draggable" id="<?php echo $ncimage['entity_id'] ?>" />
</a>
</div>
</a>
<?php endforeach; ?>
</ul>