1.5.3.1 versiyonda Hemen Al butonu eklemek..

osdem66

OpenCart-TR
Katılım
19 Ağu 2010
Mesajlar
882
Tepkime puanı
0
Puanları
0
Yaş
57
Web sitesi
opencart-themes.org
Merhaba;
arkadaşlar bildiginiz gibi 1.5.x versiyonlarda ana sayfa yada ürün detayındaki sepete ekle butonuna tıkladıgınızda ürünü önce ucarak sepete atıyor daha sonrada sepetten alışverişi tamamla dediginizde kasaya gidiyordu aşağıdaki madifikasyon bu olayı bir adım kısaltacak.. yani sepete ekle butonu yanına bir tane de Hemen al butonu ekleyecegiz ve bu butona tıkladıgımızda ürün hem sepete eklenecek hemde direk kasaya gidecek..
bu işlemleri yapmadan önce dosyalarınızın yedegini alını ben yeni ürünler için anlatacagım siz isterseniz diger modüller ve ürün detay sayfası içinde aynı mantıkla uygulayabilirsiniz..
DEMO
açın catalog-controller-module-latest.php
ve bu kodu bulun:
PHP:
if ($this->config->get('config_review_status')) {
				$rating = $result['rating'];
			} else {
				$rating = false;
			}

Altına ekle

PHP:
$options = $this->model_catalog_product->getProductOptions($result['product_id']);

			if ($options) {
				$add = $this->model_tool_seo_url->rewrite($this->url->link('product/product', 'product_id=' . $result['product_id']));
			} else {
				$add = $this->url->link('checkout/cart', 'product_id=' . $result['product_id']);
			}

bul aynı sayfada:
PHP:
'href'    	 => $this->url->link('product/product', 'product_id=' . $result['product_id']),

Altına ekle:
PHP:
'add'    		=> $add

acatalog/controller/cehckout/cart.php acın
bul bu kodu:

PHP:
public function index() {
$this->language->load('checkout/cart');

Altına Ekle:
PHP:
			if ($this->request->server['REQUEST_METHOD'] == 'GET' && isset($this->request->get['product_id'])) {
		
			if (isset($this->request->get['option'])) {
				$option = $this->request->get['option'];
			} else {
				$option = array();	
			}
			
			if (isset($this->request->get['quantity'])) {
				$quantity = $this->request->get['quantity'];
			} else {
				$quantity = 1;
			}
			
			unset($this->session->data['shipping_methods']);
			unset($this->session->data['shipping_method']);
			unset($this->session->data['payment_methods']);
			unset($this->session->data['payment_method']);
			
			$this->cart->add($this->request->get['product_id'], $quantity, $option);
			
			$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/cart');
			
		} else

Açın catalog/view/theme/sizintemanız/template/module/latest.tpl
Bul Bu kodu:
PHP:
<div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a></div>

Bununla değiştir:
PHP:
<div class="cart"><a  style="text-decoration:none;  padding-bottom:0px;"  href="<?php echo $product['add']; ?>" class="button" title="" ><span>Hemen Al</span></a><a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a></div>
soru ve sorunlarını bu başlıkta yazabilirsiniz selametle..




Bu modifikasyonu 1.5.3.1. versiyonda denedim, 1.5.x. diğer versiyolarda denemedim ama onlar da da calışacagını düşünüyorum..
 

osdem66

OpenCart-TR
Katılım
19 Ağu 2010
Mesajlar
882
Tepkime puanı
0
Puanları
0
Yaş
57
Web sitesi
opencart-themes.org
Söz konusu hatanın eklenti ile alkası yok checkout klsöörü içindeki cart.tpl yi default kalsöründeki ile degiştirin.. sorn düzelir..
 

hagul

OpenCart-TR
Katılım
22 Nis 2011
Mesajlar
46
Tepkime puanı
0
Puanları
0
s.a. üstad dediklerinin aynılarını uyguladım ama aldığım hata aşağıda:


Fatal error: Call to a member function rewrite() on a non-object in /home/*******/public_html/catalog/controller/module/latest.php on line 52

acaba neden kaynaklandı
 

kemo83

OpenCart-TR
Katılım
29 Tem 2011
Mesajlar
22
Tepkime puanı
0
Puanları
0
Yaş
40
Konum
İstanbul
Web sitesi
www.e-medikalci.com
selam
v.1.5.1 kullanıyorum aynı hatayı bende aldım.
sitenin çalışması için şimdilik latest.php yi yedekten geri yükledim.
fakat hemen al butonumuz gelmedi tabi :s
hataak.jpg


çözüm için ne yapmamızı önerirsiniz.
teşekkürler.
 

osdem66

OpenCart-TR
Katılım
19 Ağu 2010
Mesajlar
882
Tepkime puanı
0
Puanları
0
Yaş
57
Web sitesi
opencart-themes.org
Merhabai....1.5.3.1. versiyonda denedim demşim adınıda 1.5.3.1. diger versiyonlarda deneemdim...söz konusu satırda ne var? buaya kopyalarsanız bakarız caresine..
 

expero

OpenCart-TR
Katılım
28 Kas 2011
Mesajlar
15
Tepkime puanı
0
Puanları
0
merhabalar. öncelikle bu uygulama için çok teşekkür ederim. peki bu uygulamayı kategoriler ve ürün sayfasındaki sepete ekle butonun yanınada uyarlama şansımız varmı?

featured php de hata veriyor.

Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50
 

kemo83

OpenCart-TR
Katılım
29 Tem 2011
Mesajlar
22
Tepkime puanı
0
Puanları
0
Yaş
40
Konum
İstanbul
Web sitesi
www.e-medikalci.com
merhaba,
latest.php nin içeriği aşağıda yer alıyor.
verdiğiniz kodları girdiğimde yukarıdaki hatayı alıyorum.
ilginize teşekkürler.

PHP:
<?php
class ControllerModuleLatest extends Controller {
	protected function index($setting) {
		$this->language->load('module/latest');
		
      	$this->data['heading_title'] = $this->language->get('heading_title');
		
		$this->data['button_cart'] = $this->language->get('button_cart');
				
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image');
		
		$this->data['products'] = array();
		
		$data = array(
			'sort'  => 'p.date_added',
			'order' => 'DESC',
			'start' => 0,
			'limit' => $setting['limit']
		);

		$results = $this->model_catalog_product->getProducts($data);

		foreach ($results as $result) {
			if ($result['image']) {
				$image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']);
			} else {
				$image = false;
			}
						
			if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
				$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
			} else {
				$price = false;
			}
					
			if ((float)$result['special']) {
				$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
			} else {
				$special = false;
			}
			
			if ($this->config->get('config_review_status')) {
				$rating = $result['rating'];
			} else {
				$rating = false;
			}

			$this->data['products'][] = array(
				'product_id' => $result['product_id'],
				'thumb'   	 => $image,
				'name'    	 => $result['name'],
				'price'   	 => $price,
				'special' 	 => $special,
				'rating'     => $rating,
				'reviews'    => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
				'href'    	 => $this->url->link('product/product', 'product_id=' . $result['product_id']),
			);
		}

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/latest.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/latest.tpl';
		} else {
			$this->template = 'default/template/module/latest.tpl';
		}

		$this->render();
	}
}
?>
 

by_exploit

OpenCart-TR
Katılım
21 Tem 2011
Mesajlar
16
Tepkime puanı
0
Puanları
0
merhabalar bende 1.5.1.3.1 sürümü kullanıyorum tüm kodları sorunsuz ekledim. Siteye girdiğimde anasayfaya girdiğimde beyaz bir sayfa çıkıyor sorun nedir acaba
 

expero

OpenCart-TR
Katılım
28 Kas 2011
Mesajlar
15
Tepkime puanı
0
Puanları
0
LATEST.PHP KOD EKLENMİŞ HALİ EKLEYİP DENEYİN İSTERSENİZ. SORUNSUZ ÇALIŞIYOR.

<?php
class ControllerModuleLatest extends Controller {
protected function index($setting) {
$this->language->load('module/latest');

$this->data['heading_title'] = $this->language->get('heading_title');

$this->data['button_cart'] = $this->language->get('button_cart');

$this->load->model('catalog/product');

$this->load->model('tool/image');

$this->data['products'] = array();

$data = array(
'sort' => 'p.date_added',
'order' => 'DESC',
'start' => 0,
'limit' => $setting['limit']
);

$results = $this->model_catalog_product->getProducts($data);

foreach ($results as $result) {
if ($result['image']) {
$image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']);
} else {
$image = false;
}

if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
} else {
$price = false;
}

if ((float)$result['special']) {
$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
} else {
$special = false;
}

if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}
$options = $this->model_catalog_product->getProductOptions($result['product_id']);

if ($options) {
$add = $this->model_tool_seo_url->rewrite($this->url->link('product/product', 'product_id=' . $result['product_id']));
} else {
$add = $this->url->link('checkout/cart', 'product_id=' . $result['product_id']);
}
$this->data['products'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'name' => $result['name'],
'price' => $price,
'special' => $special,
'rating' => $rating,
'reviews' => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
'href' => $this->url->link('product/product', 'product_id=' . $result['product_id']),
'add' => $add
);
}

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/latest.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/latest.tpl';
} else {
$this->template = 'default/template/module/latest.tpl';
}

$this->render();
}
}
?>
 

osdem66

OpenCart-TR
Katılım
19 Ağu 2010
Mesajlar
882
Tepkime puanı
0
Puanları
0
Yaş
57
Web sitesi
opencart-themes.org
kemo83' Alıntı:
merhaba,
latest.php nin içeriği aşağıda yer alıyor.
verdiğiniz kodları girdiğimde yukarıdaki hatayı alıyorum.
ilginize teşekkürler.

PHP:
<?php
class ControllerModuleLatest extends Controller {
	protected function index($setting) {
		$this->language->load('module/latest');
		
      	$this->data['heading_title'] = $this->language->get('heading_title');
		
		$this->data['button_cart'] = $this->language->get('button_cart');
				
		$this->load->model('catalog/product');
		
		$this->load->model('tool/image');
		
		$this->data['products'] = array();
		
		$data = array(
			'sort'  => 'p.date_added',
			'order' => 'DESC',
			'start' => 0,
			'limit' => $setting['limit']
		);

		$results = $this->model_catalog_product->getProducts($data);

		foreach ($results as $result) {
			if ($result['image']) {
				$image = $this->model_tool_image->resize($result['image'], $setting['image_width'], $setting['image_height']);
			} else {
				$image = false;
			}
						
			if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
				$price = $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax')));
			} else {
				$price = false;
			}
					
			if ((float)$result['special']) {
				$special = $this->currency->format($this->tax->calculate($result['special'], $result['tax_class_id'], $this->config->get('config_tax')));
			} else {
				$special = false;
			}
			
			if ($this->config->get('config_review_status')) {
				$rating = $result['rating'];
			} else {
				$rating = false;
			}

			$this->data['products'][] = array(
				'product_id' => $result['product_id'],
				'thumb'   	 => $image,
				'name'    	 => $result['name'],
				'price'   	 => $price,
				'special' 	 => $special,
				'rating'     => $rating,
				'reviews'    => sprintf($this->language->get('text_reviews'), (int)$result['reviews']),
				'href'    	 => $this->url->link('product/product', 'product_id=' . $result['product_id']),
			);
		}

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/latest.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/module/latest.tpl';
		} else {
			$this->template = 'default/template/module/latest.tpl';
		}

		$this->render();
	}
}
?>
Merhaba o kodları eklediginizde aldıgınız hata satırında ne yazıyor onu gönderin latest.php yi degil.büyük olasılıkla eklemede hata yapıyorsunuz..tekrar kontrol edin


expero' Alıntı:
merhabalar. öncelikle bu uygulama için çok teşekkür ederim. peki bu uygulamayı kategoriler ve ürün sayfasındaki sepete ekle butonun yanınada uyarlama şansımız varmı?

featured php de hata veriyor.

Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 45Notice: Undefined variable: result in /home/kampanya/public_html/catalog/controller/module/featured.php on line 50


Latest.php eklediginiz kod grubu çindeki
PHP:
$result
yazan yerleri
PHP:
$product_info
olarak degiştirin ayrıca kategorilerde ve ürün detay sayfasındada aynı eklemeleri yaparak çalıştıabilirsiniz
 

expero

OpenCart-TR
Katılım
28 Kas 2011
Mesajlar
15
Tepkime puanı
0
Puanları
0
featured.ph de söylediğiniz düzenlemeyi yapınca sorun çözüldü teşekkür ederim. fakat categori.php de
bu alan yok nereye ekleyecez kodları

if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}
 

kemo83

OpenCart-TR
Katılım
29 Tem 2011
Mesajlar
22
Tepkime puanı
0
Puanları
0
Yaş
40
Konum
İstanbul
Web sitesi
www.e-medikalci.com
1.sayfada gelen hatayı resimli olarak eklemiştim. latest.php yi değiştirince aldığım hata bu şekilde. v1.5.1
teşekkürler.
Kod:
Fatal error: Call to a member function rewrite() on a non-object in /home/emedikal/public_html/catalog/controller/module/latest.php on line 52
 

osdem66

OpenCart-TR
Katılım
19 Ağu 2010
Mesajlar
882
Tepkime puanı
0
Puanları
0
Yaş
57
Web sitesi
opencart-themes.org
expero' Alıntı:
featured.ph de söylediğiniz düzenlemeyi yapınca sorun çözüldü teşekkür ederim. fakat categori.php de
bu alan yok nereye ekleyecez kodları

if ($this->config->get('config_review_status')) {
$rating = $result['rating'];
} else {
$rating = false;
}

Kategori ve ürün detay bölümü için bir ara düzenlerim anacak şu sıralar çok yoğunum ve buna zamanım yok hafta sonu gibi hallederim umarım..

kemo83' Alıntı:
1.sayfada gelen hatayı resimli olarak eklemiştim. latest.php yi değiştirince aldığım hata bu şekilde. v1.5.1
teşekkürler.
Kod:
Fatal error: Call to a member function rewrite() on a non-object in /home/emedikal/public_html/catalog/controller/module/latest.php on line 52
Değerli kardeşim ben sanırım anlatamadım siz latest.php içine o kodu eklediginizde hatayı alıyorsunuz ya o hata aldıgınız satırda ne var latest.php içinde o satırı buraya yazarmısınız.. yani 52 nci satırda ne var o kodlar ekli iken..
selametle..
 

kemo83

OpenCart-TR
Katılım
29 Tem 2011
Mesajlar
22
Tepkime puanı
0
Puanları
0
Yaş
40
Konum
İstanbul
Web sitesi
www.e-medikalci.com
şuan hatalı şekilde siteyi bırakıyorum.

52. satırda yer alan ibare aşağıdadır. Bu arada seo urlde kullanıyorum.

Kod:
$add = $this->model_tool_seo_url->rewrite($this->url->link('product/product', 'product_id=' . $result['product_id']));
 

expero

OpenCart-TR
Katılım
28 Kas 2011
Mesajlar
15
Tepkime puanı
0
Puanları
0
hafta sonunu bekleyecez artık. çok teşekkürler
 

kadir34

OpenCart-TR
Katılım
29 Eki 2010
Mesajlar
54
Tepkime puanı
0
Puanları
0
Yaş
41
Konum
Türkiye / istanbul
arkadaş bendede aynı hatayı verdi düzenleme yaptığım dosyaların orjinallerini geri yükledim düzeldi anlatılan ayarları aynen yapıyorum
Fatal error: Call to a member function rewrite() on a non-object in /home/*******/public_html/catalog/controller/module/latest.php on line 52
bu hatayı veriyor birde bunların yanına incele buttonu eklemek istiyorum benim sepete at buttonum mavi bunun rengini nasıl değiştirebilirim son olarak birde arkadaşlar ben denee amaçlı sipariş veriyorum siparişi tamamlayıp siparişi onayla buttununa bastığımda sanki çalışmıyormuş gibi admin panelde onaylıyor ama müşteri olarak onaylandığını anlıyamıyorsunuz sepeti onayla dediğimde işleminiz tamamlanmıştır en kısa sürede size geri döüş yapılacaktır gibi benim istediğim bir şekilde bir yazı yazıp ana sayfaya otomatik yönlendirmesi için ne yapabiliriz bilen arkadaşlar yardım ederse çok memnun olurum
 

lordd

OpenCart-TR
Katılım
14 Nis 2011
Mesajlar
60
Tepkime puanı
0
Puanları
0
Konum
Ant ~ İst
Web sitesi
ipekyolulokmanhekimler.com
Hocam çok güzel bir çalışma bunun için öncelikle teşekkür ederim. ama ben ufak tefek düzenlemeler yapmak istiyorum mesala:

/index.php?route=checkout/cart  yerine buraya;
/index.php?route=checkout/checkout 'a
yönlendirmemiz mümkün mü acaba? Alışverişi Tamamla butonuna tıklamasına gerek kalmadan, doğrudan kasaya yönlendirmek ?
 
Üst