Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Links in special.php mit cPath - modified shop 1.06

    udoersam

    • Neu im Forum
    • Beiträge: 13
    Guten Morgen in die Runde,

    ich hatte das Problem in meinem Shop, dass die Sonderangebote immer ohne cPath aufgerufen wurden. Was leider mein Layout zum Teil etwas "unvorteilhaft" veränderte.

    Um das zu korrigieren, habe ich folgende Änderungen vorgenommen:

    1. /inc/xtc_product_link.inc.php (Änderung direkt vor return):

    Code: PHP  [Auswählen]
            if (!isset($_GET['cPath'])) {
            // Abfrage des cPaths eines Produktes
                    $cPath = xtc_get_product_path(xtc_get_prid($pID));
            } else {
                    $cPath = $_GET['cPath'];
            }
           
            return 'products_id='.$pID.'&cPath='.$cPath;

    2. Da das Ganze dann jedoch nur mit Nicht-SEO-Urls funktionierte gab es noch eine ähnliche Änderung in der /inc/shop_stat_functions.inc.php

    Code: PHP  [Auswählen]
    /*
     * FUNCTION shopstat_hrefLink
     */

    function shopstat_hrefLink($cat_desc, $product_name, $product_id) {
      $link = "";
      if (shopstat_hrefSmallmask($cat_desc)) {
        $link .= shopstat_hrefSmallmask($cat_desc)."/";
      }
            if (!isset($_GET['cPath'])) {
            // Abfrage des cPaths eines Produktes
                    $cPath = xtc_get_product_path(xtc_get_prid($product_id));
            } else {
                    $cPath = $_GET['cPath'];
            }
            // Auskommentiert, da ein Fehler beim Übersetzung passiert / Link wird mit 3 ::: und danach der 1. : in %3A übersetzt!
            // $link .= shopstat_hrefMask($product_name).ART_DIVIDER.$product_id.SEO_SEPARATOR.$_GET['cPath'].".html";
            $link .= shopstat_hrefMask($product_name).ART_DIVIDER.$product_id.SEO_SEPARATOR.$cPath.".html";
            return($link);
    }

    Vielleicht bringt es dem ein oder anderen was.

    Viel Spaß damit.

    Für Rückfragen stehe ich Ihnen gerne zur Verfügung.

    Beste Grüße

    + werk-statt +

    Linkback: https://www.modified-shop.org/forum/index.php?topic=37573.0

    web28

    • modified Team
    • Beiträge: 9.404
    Re: Links in special.php mit cPath - modified shop 1.06
    Antwort #1 am: 06. August 2017, 23:42:09
    Ich kann das Problem bei einem 1.06 nicht nachvollziehen.

    Gruss Web28

    udoersam

    • Neu im Forum
    • Beiträge: 13
    Re: Links in special.php mit cPath - modified shop 1.06
    Antwort #2 am: 07. August 2017, 11:31:09
    Servus,

    mein Problem war, dass die Kategoriebox nur auftaucht, wenn auch der cPath in der $_GET Variable entsprechend gesetzt ist. Die Verlinkung in der specials.php erfolgte jedoch bei mir ohne cPath Variable.

    Aus diesem Grund erfolgte der Umbau, denn jetzt wird in der specials.php auch der cPath gebildet.

    Beste Grüße
    8 Antworten
    3482 Aufrufe
    22. Mai 2017, 13:47:38 von rayban
    2 Antworten
    3463 Aufrufe
    07. September 2012, 15:19:19 von eddyexp
    4 Antworten
    3289 Aufrufe
    15. Juni 2013, 15:28:41 von noRiddle (revilonetz)
               
    anything