Page 1 of 1

Siteye üye olmayanlar bazı kategorileri göremesin.

Posted: Thu Jun 07, 2018 11:54 pm
by ekremhuseyinhancer
Merhaba arkadaşlar, Benim bir sorunum var localhostta sorunsuz çalışan kodum Web ortamında çalışmıyor. Bir arkadaşıma ödevi için yardımcı olmaya çalışıyorum. Ticari vb bir amacım yok.
Kod: <?php
if(!$logged){

if(
$_SERVER['REQUEST_URI'] <> "/"&&
$_SERVER['REQUEST_URI'] <> "/index.php?route=common/home"&&
$_SERVER['REQUEST_URI'] <> "/index.php?route=information/contact"&&
$_SERVER['REQUEST_URI'] <> "/index.php?route=information/information&information_id=10"&&
$_SERVER['REQUEST_URI'] <> "/index.php?route=account/login" &&
$_SERVER['REQUEST_URI'] <> "/index.php?route=account/register"
)

{
header('Location: index.php?route=account/login');

}
}

?>


Aldığım Hata ise :
Warning: Cannot modify header information - headers already sent by (output started at /home/pfnyazilim/public_html/toptanci/catalog/model/custom/general.php:569) in /home/pfnyazilim/public_html/toptanci/catalog/view/theme/yourstore/template/common/header.tpl on line 251

Re: Siteye üye olmayanlar bazı kategorileri göremesin.

Posted: Fri Jun 08, 2018 4:48 am
by eka7a
Merhaba,
controller->product->category.php dosyasına $this->customer->isLogged() ile kontrol edip istediğiniz bir sayfaya yönlendirebilirsiniz.

Re: Siteye üye olmayanlar bazı kategorileri göremesin.

Posted: Fri Jun 08, 2018 2:45 pm
by ekremhuseyinhancer
Onu denediğimde hep Hesabım sayfasına atıyordu, nasıl bir kod yazacapım pek PHP bilgim yok,