ACC SHELL
<?php
/*
* view wishlist.default
*/
?>
<div <?php echo CLASS_OBSAH; ?>>
<h2>Wishlist</h2>
<br />
<?php
if (isset($_SESSION['user']) && $_SESSION['user'] != false) {
?>
<table class="wishlist" width="100%">
<?php
$Wishlist = new Wishlist();
$wishlist = $Wishlist->fetchByUserId($_SESSION['user']['id']);
//NDebugger::dump($wishlist);
if ($wishlist) {
$arr['id_variant'] = $wishlist;
$Katalog = new Katalog();
$wishItems = $Katalog->fetchAll($arr);
//NDebugger::dump($wishItems);
$Parametry = new Parametry();
foreach ($wishItems as $wishItem) {
$velikost = dibi::query('SELECT * FROM katalog_parametry WHERE id_parametru = 1 AND id_katalog=%i', $wishItem->id)->fetch();
$par = $Parametry->getHodnotaParametru($velikost->id_hodnoty_parametru);
//NDebugger::dump($velikost);NDebugger::dump($par);
$odkaz = '/' . $wishItem->url_kategorie . '/' . $wishItem->url . '.html';
echo '<tr>';
echo '<td><a href="' . $odkaz . '" title=""><img src="' . KATALOG_F_S_PATH . $wishItem->obrazek . '" alt="Product1" class="wishimg" /></a></td>';
echo '<td><h3><a href="' . $odkaz . '" title="">' . html_entity_decode($wishItem->nazev);
if (isset($par->nazev)) {
echo ' (vel. ' . $par->nazev . ')';
}
echo '</a></h3></td>';
echo '<td><h3>' . money($wishItem->cena, 0) . ' Kč</h3></td>';
//echo '<td><a href="#" title="#" class="wishnakup">Vložit do košíku</a>';
echo '<td>';
echo '<form method="post" action="" class="jcart">';
echo '<input type="hidden" name="my-item-qty" id="pocet" value="1" />';
echo '<input type="hidden" name="my-item-id" value="' . $wishItem->id . '" />';
echo '<input type="hidden" name="my-item-name" value="' . html_entity_decode($wishItem->nazev) . ' - ' . $par->nazev . '" />';
echo '<input type="hidden" name="my-item-price" value="' . $wishItem->cena . '" />';
echo '<input type="hidden" name="my-item-img" value="' . KATALOG_F_S_PATH . $wishItem->obrazek . '" />';
echo '<input type="hidden" name="my-item-url" value="' . '/' . $wishItem->url_kategorie . '/' . $wishItem->url . '.html' . '" />';
echo '<input type="submit" value="Vložit do košíku" class="wishnakup" name="my-add-button" class="wishnakup" />';
//echo '<input type="submit" value="Odeslat mailem" class="wishnakup" name="wishmail" class="wishmail" />';
echo '<a href="#dialog-sendWishlist" rel="' . $wishItem->id . '" title="Odeslat mailem" class="modal wishmail">Odeslat mailem</a></td>';
echo '</form>';
echo '<td><a href="?wishlistdel=' . $wishItem->id . '" title="Smazat" class="wishsmazat">Smazat</a></td>';
echo '</tr>';
}
} else {
echo '<tr><td colspan="4">Zatím není uložen žádný produkt</td></tr>';
}
?>
</table><br />
<?php
if ($wishlist) {
echo '<a href="#dialog-sendWishlist" title="Odeslat mailem" class="modal wishcely">Odeslat celý seznam</a>';
}
?>
<div class="clear"></div><br />
<?php
} else {
include(ROOT . '/template/formulare/registracni_formular.php');
}
?>
</div>
ACC SHELL 2018