Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- global $USER;
- $arGroups = CUser::GetUserGroup($USER->GetID());
- $who_access = in_array('7', $arGroups);
- ?>
- <?$numProps = count($arResult["SKU_PROPERTIES"]);
- foreach ($arResult["SKU_ELEMENTS"] as $key => $arSKU) {
- if($arSKU[0] == $who_access){
- //whosales
- $arResult["SKUEL"] = $arResult["SKU_ELEMENTS"][$key-1];
- }else{
- $arResult["SKUEL"] = $arResult["SKU_ELEMENTS"][$key];
- }
- }
- ?>
- <?if($who_access == 1):?>
- <?if (intval($arResult["SKUEL"]["DISCOUNT_PRICE"]) > 0 && $arResult["SKUEL"]["PRICE"] > 0):?>
- <p class="price"><?=$arResult["SKUEL"]["DISCOUNT_PRICE"]?></p><span class="old-price"><?=$arResult["SKUEL"]["PRICE"]?></span>
- <?else:?>
- <p class="price"><?=$arResult["SKUEL"]["PRICE"]?></p>
- <?endif?>
- <p class="retail-price">Розничная цена: <strong><?=$arResult["PRICES"]["BASE"]["VALUE"]?> руб</strong>
- <p class="detail-text"><?=strip_tags($arResult["~PREVIEW_TEXT"])?></p>
- <select id="colors" name="COLOR">
- <?
- $aRcolors = explode("/",$arResult["SKUEL"]["3"]);
- foreach ($aRcolors as $key => $color) {
- echo "<option>".$color."</option>";
- }
- ?>
- </select>
- <p>Размеры в упаковке: <?=$arResult["SKUEL"]["1"]?></p>
- <a href="<?=$arResult["SKUEL"]["ADD_URL"]?>" onclick="return addToCart(this, 'detail', '<?=GetMessage("CATALOG_IN_CART")?>', 'noButton');" id="catalog_add2cart_link_ofrs_<?=$arResult["SKUEL"]["ID"]?>"><?=GetMessage("CATALOG_BUY")?></a>
- <?else:?>
- <?if (intval($arResult["SKUEL"]["DISCOUNT_PRICE"]) > 0 && $arResult["SKUEL"]["PRICE"] > 0):?>
- <p class="price"><?=$arResult["SKUEL"]["DISCOUNT_PRICE"]?></p><span class="old-price"><?=$arResult["SKUEL"]["PRICE"]?></span>
- <?else:?>
- <p class="price"><?=$arResult["SKUEL"]["PRICE"]?></p>
- <?endif?>
- <p class="detail-text"><?=strip_tags($arResult["~PREVIEW_TEXT"])?></p>
- <select id="colors">
- <?
- $aRcolors = explode("/",$arResult["SKUEL"]["3"]);
- foreach ($aRcolors as $key => $color) {
- echo "<option>".$color."</option>";
- }
- ?>
- </select>
- <select id="size">
- <?
- $aRsizes = explode("/",$arResult["SKUEL"]["2"]);
- foreach ($aRsizes as $key => $size) {
- echo "<option>".$size."</option>";
- }
- ?>
- </select>
- <a href="<?=$arResult["SKUEL"]["ADD_URL"]?>" onclick="return addToCart(this, 'detail', '<?=GetMessage("CATALOG_IN_CART")?>', 'noButton');" id="catalog_add2cart_link_ofrs_<?=$arResult["SKUEL"]["ID"]?>"><?=GetMessage("CATALOG_BUY")?></a>
- <?endif?>
Advertisement
Add Comment
Please, Sign In to add comment