This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(get_page_slug(false) == 'index') { | |
$catalog->renderSection('FrontendItemList', array('routeid' => 25)); | |
echo $catalog->content; | |
} | |
echo $catalog->pagination; | |
$catalog->renderSection('FrontendCategoryList'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->categoryRow = | |
<<<EOD | |
<section class="sc-element-wrapper"> | |
<figure> | |
<a href="[[href]]"><img src="[[image]]" alt="[[image_title]]"></a> | |
</figure> | |
<header><h3>[[name]]</h3></header> | |
<div class="sc-element-infos"> | |
[[description]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$counter->increment(); | |
$counter->increment($slug); | |
$counter->decrement(); | |
$counter->decrement($slug); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$counter = new Counter(1); | |
class Counter | |
{ | |
private $imanager; | |
private $slug; | |
private $catId; | |
private $itemMapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load all SimpleItem objects into the memory | |
$itemMapper->alloc($catid); | |
// create SimpleItem's from multiple items | |
$itemMapper->simplifyBunch($items); | |
// save SimpleItem objects to the buffer | |
$itemMapper->save(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// load all SimpleItem objects into the memory | |
$itemMapper->alloc($catid); | |
// create a SimpleItem object from an item | |
$itemMapper->simplify($item); | |
// save SimpleItem object to the buffer | |
$itemMapper->save(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$simpleItems = $itemMapper->filterSimpleItems('position', 'DESC', $next, $perpage, $simpleItems); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$simpleItems = $itemMapper->getSimpleItems('active=1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$itemMapper->alloc($catid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$catid = 9; | |
$imanager = imanager(); | |
$itemMapper = $imanager->getItemMapper(); | |
$limit = 10; | |
$start = !empty($_GET['page']) ? (((int)$_GET['page'] -1) * $limit +1) : 1; | |
$itemMapper->alloc($catid); | |
$simpleItems = $itemMapper->getSimpleItems('active=1'); |