WebSite X5Help Center

 
Stiac Engineering
Stiac Engineering
User

Redirect 404 sezione /product/ verso /cartsearch/  it

Author: Stiac Engineering
Visited 496, Followers 1, Shared 0  

Salve ragazzi,

vorrei proporre come miglioria la modifica del redirect presente quando il link di un prodotto è errato/non presente (es. https://www.gebher.com/product/?test) dalla sezione /product/ verso /cartsearch/.

Allo stato attuale, se il link di un prodotto gestito tramite la "pagina scheda prodotto" non è presente, l'utente viene dirottato alla index/home page.

Potrebbe essere più utile indirizzare l'utente verso la sezione /cartsearch/ per riprendere la ricerca del prodotto.

Posted on the
7 ANSWERS - 1 USEFUL
Mauro B.
Mauro B.
User

+1000

Read more
Posted on the from Mauro B.
Giuseppe Puzzolo
Giuseppe Puzzolo
User

+1

Read more
Posted on the from Giuseppe Puzzolo
Roberto N.
Roberto N.
User

+1

Read more
Posted on the from Roberto N.
Luca E.
Luca E.
User

Ciao Gabriele, una soluzione ci sarebbe, finchè Incomedia non prenda in esame la tua richiesta.

Se hai server linux nel file htaccess fai puntare la index su un'altra pagina.php, poi fai un copia/incolla della index e la rinomini come altra pagina.php

Infine nella nuova pagina modifichi la seguente stringa che trovi alla riga 2:

<?php $cart = Configuration::getCart(); $id = isset($_GET['id']) ? $_GET['id'] : $cart->getProductIdBySlug(array_keys($_GET)[0]); if ($id == null || $id == '') { header('Location: ' . $imSettings['general']['homepage_url']); } $product = $cart->getProductsData($id)[$id]; if ($product == null || !isset($product['productPageLinkType']) || $product['productPageLinkType'] != 'productpage') { header('Location: ' . $imSettings['general']['homepage_url']); } ?>

con:

<?php $cart = Configuration::getCart(); $id = isset($_GET['id']) ? $_GET['id'] : $cart->getProductIdBySlug(array_keys($_GET)[0]); if ($id == null || $id == '') { header('Location: ../cartsearch/'); } $product = $cart->getProductsData($id)[$id]; if ($product == null || !isset($product['productPageLinkType']) || $product['productPageLinkType'] != 'productpage') { header('Location: ../cartsearch/'); } ?>

La stringa x il file htaccess:

RewriteRule ^product/index.php(.*)$ /product/xxxxxx.php$1 [NC,L]

Read more
Posted on the from Luca E.
Stiac Engineering
Stiac Engineering
User
Author

Buongiorno a tutti! Luca sei straordinario, Incomedia dovrebbe assumerti.

Ho preso il codice gentilmente postato da te e l'ho inserito in Step 3 > E-commerce: Product Page > Proprietà > Esperto > Prima dell'apertura del tag HTML. Non ho ancora modificato il file .htaccess ma sembra funzionare.

Grazie Luca!

Link Codice: https://codepen.io/stiac/pen/zYZxoMd

Read more
Posted on the from Stiac Engineering
Luca E.
Luca E.
User

Grazie, troppo buono :)

Se guardi il mio sito ti renderai conto che se pur creato con wsx5, non è proprio standardizzato. cool

Soprattutto il dettaglio prodotti 

Read more
Posted on the from Luca E.
Stiac Engineering
Stiac Engineering
User
Author

Figurati! Anche io, infatti se non posso personalizzare un qualcosa come desidero mi sento male. Devo per forza fare la pecorella nera.

Sono in costante ricerca di grafiche fresche e il più possibili efficienti in termini di UX. Non amo quei siti dove si comprende a prima vista con cosa sono stati creati.

Read more
Posted on the from Stiac Engineering