{* *}{strip} {* *} {if !empty($items) || !empty($cart_products)} {$ids = []} {$cids = []} {$bids = []} {foreach $items|default:$cart_products as $item} {if !empty($item->enabled)} {if empty($item->non_usable)} {$id = $item->product_id|default:''} {if !empty($id)} {$ids[$id] = $id} {/if} {$id = $item->category_id|default:''} {if !empty($id)} {$cids[$id] = $id} {/if} {$id = $item->brand_id|default:''} {if !empty($id)} {$bids[$id] = $id} {/if} {/if} {/if} {/foreach} {* *} {if !empty($ids)} {if !empty($ids) && empty($items)} {idProducts ids = $ids var = items} {/if} {if !empty($items)} {* *} {$aids = []} {foreach $items as $item} {if !empty($item->enabled)} {if empty($item->non_usable)} {if !empty($item->accessory_products)} {foreach $item->accessory_products as $r} {if !empty($r->enabled)} {if empty($r->non_usable)} {$id = $r->product_id|default:''} {if !empty($id) && !isset($ids[$id])} {$aids[$id] = $id} {/if} {/if} {/if} {/foreach} {/if} {/if} {/if} {/foreach} {* *} {if !empty($aids)} {$used = []} {$number = 0} {foreach $items as $item} {if !empty($item->enabled)} {if empty($item->non_usable)} {if !empty($item->accessory_products)} {foreach $item->accessory_products as $r} {if !empty($r->enabled)} {if empty($r->non_usable)} {$id = $r->product_id|default:''} {if isset($aids[$id])} {if !isset($used[$id])} {$used[$id] = $id} {if empty($number)} {/if} {/if} {* *} {$rids = []} {foreach $items as $item} {if !empty($item->enabled)} {if empty($item->non_usable)} {if !empty($item->related_products)} {foreach $item->related_products as $r} {if !empty($r->enabled)} {if empty($r->non_usable)} {$id = $r->product_id|default:''} {if !empty($id) && !isset($ids[$id]) && !isset($aids[$id])} {$rids[$id] = $id} {/if} {/if} {/if} {/foreach} {/if} {/if} {/if} {/foreach} {* *} {if !empty($rids)} {$used = []} {$number = 0} {foreach $items as $item} {if !empty($item->enabled)} {if empty($item->non_usable)} {if !empty($item->related_products)} {foreach $item->related_products as $r} {if !empty($r->enabled)} {if empty($r->non_usable)} {$id = $r->product_id|default:''} {if isset($rids[$id])} {if !isset($used[$id])} {$used[$id] = $id} {if empty($number)} {/if} {/if} {* *} {if !empty($categories)} {$rids = []} {foreach $items as $item} {if !empty($item->related_cids)} {foreach $item->related_cids as $id} {if !empty($id) && !isset($cids[$id])} {$rids[$id] = $id} {/if} {/foreach} {/if} {/foreach} {* *} {if !empty($rids)} {include file = 'common/ownblocks.htm' title = $title3|default:'Другие разделы' ids = $rids maxcount = 4 empty_body = 'Все
разделы
'} {/if} {/if} {* *} {if !empty($all_brands)} {$rids = []} {foreach $items as $item} {if !empty($item->related_bids)} {foreach $item->related_bids as $id} {if !empty($id) && !isset($bids[$id])} {$rids[$id] = $id} {/if} {/foreach} {/if} {/foreach} {* *} {if !empty($rids)} {include file = 'common/ownblocks.htm' title = $title4|default:'Другие производители' categories = $all_brands ids = $rids maxcount = 4 empty_body = 'Все
производители
'} {/if} {/if} {/if} {/if} {/if} {/strip}