Post by stf » Sat Jun 08, 2013 3:44 pm

O simpla dezactivare nu cred ca este solutia cea mai buna. Daca ai dezactivat cateva sute de produse vor fi generate prea multe pagini 404...ceea ce dauneaza dpdv seo...

301 spre categoria din care faceau parte ? Stim toti ca 301 inseamna permanent redirect ... si daca reactivam cateva produse dupa un timp .. tot nu e bine dpdv seo...zic eu ..

Le ascundem din front end si dezactivam butonul de adaugat in cos..eventual si imaginile produsului? Acestea vor fi accesibile in motoarele de cautare... deci ar trebui sa fie 200...dar din experienta mea, vizitatorii sunt frustrati cand vad un produs pe site care nu mai exista....si poate le placea/erau interesati/etc... cred ca dauneaza imaginii magazinului..

Care este cea mai buna solutie?

S.

stf
New member

Posts

Joined
Mon Apr 02, 2012 4:10 pm

Post by robertiulianstoica » Wed Jun 12, 2013 2:04 am

Schimbi model-urile, astfel incat produsele inactive inca sa se afiseze, insa faci in asa fel incat sa nu se afiseze in categorii catre.

robertiulianstoica[at]gmail.com


New member

Posts

Joined
Tue May 07, 2013 8:42 pm

Post by hopsieu » Thu Jun 13, 2013 2:01 am

Si asa cum faci?
Da-ne un exemplu....

Image
http://fans-shop.ro - "Magazinul suporterilor"


New member

Posts

Joined
Wed Aug 15, 2012 5:00 pm

Post by robertiulianstoica » Thu Jun 13, 2013 7:21 pm

in catalog/model/catalog/product.php

modificati functia getProduct astfel incat inceputul ei sa arate asa:

Code: Select all

public function getProduct($product_id,$ignore_status=FALSE) {
		if ($this->customer->isLogged()) {
			$customer_group_id = $this->customer->getCustomerGroupId();
		} else {
			$customer_group_id = $this->config->get('config_customer_group_id');
		}	
				
		$sql = "SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM " . DB_PREFIX . "product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '" . (int)$customer_group_id . "' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM " . DB_PREFIX . "product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '" . (int)$customer_group_id . "' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, (SELECT points FROM " . DB_PREFIX . "product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '" . (int)$customer_group_id . "') AS reward, (SELECT ss.name FROM " . DB_PREFIX . "stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '" . (int)$this->config->get('config_language_id') . "') AS stock_status, (SELECT wcd.unit FROM " . DB_PREFIX . "weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS weight_class, (SELECT lcd.unit FROM " . DB_PREFIX . "length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '" . (int)$this->config->get('config_language_id') . "') AS length_class, (SELECT AVG(rating) AS total FROM " . DB_PREFIX . "review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM " . DB_PREFIX . "review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_description pd ON (p.product_id = pd.product_id) LEFT JOIN " . DB_PREFIX . "product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN " . DB_PREFIX . "manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '" . (int)$product_id . "' AND pd.language_id = '" . (int)$this->config->get('config_language_id') . "'";
		
		if ($ignore_status == FALSE) {
			$sql .= " AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'";			
		} else {
			$sql .= " AND p.date_available <= NOW() AND p2s.store_id = '" . (int)$this->config->get('config_store_id') . "'";
		}
	
		$query = $this->db->query($sql);
		
apoi in catalog/controller/product/product.php modificati:

Code: Select all

$product_info = $this->model_catalog_product->getProduct($product_id);
in

Code: Select all

$product_info = $this->model_catalog_product->getProduct($product_id,TRUE);
Astfel, va afisa produsul dezactivat in pagina de produs, dar nu in categorie. ;D

robertiulianstoica[at]gmail.com


New member

Posts

Joined
Tue May 07, 2013 8:42 pm

Post by m1t » Tue Jul 23, 2013 4:19 am

Parse error: syntax error, unexpected T_ELSE, expecting T_FUNCTION in /home/etigarer/public_html/xxxxx.ro/catalog/model/catalog/product.php on line 25

Incercat si din pact nu a mers , eventuat imi poti spune de la care lini pana la care sa dau paste la codul tau

Image

[/highlight]


m1t
New member

Posts

Joined
Sun Nov 14, 2010 7:18 am

Post by robertiulianstoica » Tue Jul 23, 2013 6:15 pm

Sigur ai gresit ceva la inserare, urmeaza pasii inca odata cu atentie, iar daca nu ti-a mers da-mi un pm.

robertiulianstoica[at]gmail.com


New member

Posts

Joined
Tue May 07, 2013 8:42 pm

Post by m1t » Sun Aug 18, 2013 12:39 am

din pacate solutia cu pm nu a mers , cam greu sa oferi unui necunoscut parolele la site , oricat de bine intentionat ar fi el ,
era perfect daca mi ai fi spus de unde pana unde sa inlocuiesc eu codul :)

Image

[/highlight]


m1t
New member

Posts

Joined
Sun Nov 14, 2010 7:18 am

Post by robertiulianstoica » Sun Aug 18, 2013 12:46 am

Ar fi fost mai scurt ca si timp, atata tot. Am sa reiau codul cand am timp si iti explic linie cu linie.

robertiulianstoica[at]gmail.com


New member

Posts

Joined
Tue May 07, 2013 8:42 pm

Post by m1t » Mon Aug 19, 2013 9:25 pm

mersi de amabilitate , astept atunci
ps.nu e era a mea decizia in legatura cu parole.

Image

[/highlight]


m1t
New member

Posts

Joined
Sun Nov 14, 2010 7:18 am

Post by florinsith » Mon Aug 19, 2013 11:42 pm

robertiulianstoica wrote:Schimbi model-urile, astfel incat produsele inactive inca sa se afiseze, insa faci in asa fel incat sa nu se afiseze in categorii catre.
Am observat ca emag foloseste aceasta metoda. E cam frustrant cand ma bucur ca in sfarsit am gasit un anumit produs doar ca ulterior sa aflu ca nu mai este in oferta lor.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by mikell » Sun Sep 01, 2013 4:41 pm

dar ce fac cu produsele dupa siteul vechi daca de curand am modificat site-ul pe platforma openCart ?Sunt peste 300 de pagini...Cu redirect 301 nu da bine pt. optmizare! :choke:

Active Member

Posts

Joined
Sun Sep 01, 2013 4:37 pm

Post by florinsith » Fri Sep 06, 2013 10:12 am

Dc nu da bine? Daca pe vechiul site foloseai seo urluri, foloseste in noul site aceleasi seo urluri si redirectioneaza toate linkurile din site pre noul site. Altfel redirectioneaza-le spre "Pagina Nu a fost gasita".

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Who is online

Users browsing this forum: No registered users and 13 guests