Jump to content
xt:Commerce Community Forum

[Gelöst] Artikelzustand wird nicht angezeigt


NilsK
 Share

Recommended Posts

Hallo liebes Forum,

in der aktuellen 6er Version kann man einen Artikelzustand angeben - wo oder wie wird dieser Zustand (z.B. für einen gebrauchten Artikel) angezeigt?

Im Template tut sich nix und das Handbuch ist leider veraltet. ;)

Danke.

Herzliche Grüße
Nils

Link to comment
Share on other sites

naja, einfach ausgeben

in der product.html oder im Listing ( natürlich vorher anpassen ),

z.B. mit

                {if $products_condition}
                <p class="product-url name">
                    <span class="text-small">
                       <p>{$products_condition}</p>
                    </span>
                {/if}

Grüsse

 

Link to comment
Share on other sites

Hallo oldbear,

herzlichen Dank für die Osterarbeit.

Funktioniert super, bis auf eine Kleinigkeit:

Es wird immer nur die englische Bezeichnung ausgegeben und ein "condition" angefügt, z.B.: "UsedCondition" anstatt gebraucht.

D/EN ist dabei egal.

Wenn der Artikel dann im BE wieder aufgerufen wird, ist dort ebenfalls der selbe Ausdruck zu sehen, anstatt der dt. Wert.

Sprachtexte stimmen alle und sind 2-sprachig angelegt.

Hast Du noch eine Idee oder ist es ein xtc-Fehler?

 

Herzliche Grüße
Nils

Link to comment
Share on other sites

ist wohl so,

in den Dropdown-Definitionen steht:

    function getProductsConditions()
    {
        $data =  [
            ['id' => '','name' => __define('TEXT_EMPTY_SELECTION')],
            ['id' => 'NewCondition','name' => __define('TEXT_PRODUCTS_CONDITION_NEW')],
            ['id' => 'UsedCondition','name' => __define('TEXT_PRODUCTS_CONDITION_USED')],
            ['id' => 'RefurbishedCondition','name' => __define('TEXT_PRODUCTS_CONDITION_REFURBISHED')],
            ['id' => 'DamagedCondition','name' => __define('TEXT_PRODUCTS_CONDITION_DAMAGED')],
        ];

also ist "UsedCondition" der Index, der wie alle anderen Dropdowns korrekt gepspeichert.

In der class.product.php wird aber keine entsprechende Auswahl des Sprachtextes vorgenommen.

Also z.B. am Hookpoint class.product.php:BuildData_bottom einfügen bzw. entsprechenden Hookpoint in einem Plugin anlegen ( Quick & dirty )

        // PATCH
        if ($this->data['products_condition'] == 'NewCondition') {
            $this->data['products_condition'] = TEXT_PRODUCTS_CONDITION_NEW;
        } elseif ($this->data['products_condition'] == 'UsedCondition') {
            $this->data['products_condition'] = TEXT_PRODUCTS_CONDITION_USED;
        } elseif ($this->data['products_condition'] == 'RefurbishedCondition') {
            $this->data['products_condition'] = TEXT_PRODUCTS_CONDITION_REFURBISHED;
        } elseif ($this->data['products_condition'] == 'DamagedCondition') {
            $this->data['products_condition'] = TEXT_PRODUCTS_CONDITION_DAMAGED;
        }

 

Link to comment
Share on other sites

Hallo Oldbear,

tausend Dank - hat super funktioniert (habe es direkt in die Datei eingebunden). 

Lt. xtc ist "Condition" nur für Exporte (Schema.org) vorgesehen - ich habe es mal als Wunsch geäußert, daß es zukünftig mit in die Frontend-Ausgabe sollte (als Nicht-Programmierer irritiert es, wenn eine schöne und brauchbare Eigenschaft plötzlich nicht funktioniert).

Herzliche Grüße
Nils

Link to comment
Share on other sites

  • NilsK changed the title to [Gelöst] Artikelzustand wird nicht angezeigt

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
  • Create New...