Gibt es hier tatsächlich keine Ideen oder Lösungsvorschläge? Möchte bei einem Sonderangebot den Preisnachlass anzeigen und entsprechend formatieren.
Sehr gute Frage, hier suche ich mich auch schon dumm und dusslig ob es hier eine Lösung gibt, offenbar nicht.
Wäre mal eine guter Ansatz. Wird wohl sehr schwierig sein umzusetzen Sonst hätte sich ja vieleicht schon mal jemand von den "Experten" zu Wort gemeldet... Gruß
Guten Morgen und frohe Ostern, schaut mal hier: http://www.ehtio.de/gambio-gx2-sonderangebote-preis-rot-darstellen-3025/ Kann sein das evtl. noch was angepasst werden müßte.
So ich habe das mal angepasst und getestet. In der Datei "includes/classes/xtcPrice.php" ab ca. Zeile 761 die "public function xtcFormatSpecial" mit folgender ersetzen: PHP: ... public function xtcFormatSpecial($p_products_id, $p_special_price, $p_old_price, $p_format, $p_return_array = 0) { if($p_format) { $t_price_html = ''; if(gm_get_conf('SHOW_OLD_SPECIAL_PRICE') == '1') //Alter Preis { $t_price_html .= '<span class="productOldPrice">' . $this->v_coo_language_text_manager->get_text('old_special_price') . $this->xtcFormat($p_old_price, $p_format) . '</span><br />'; } //Neuer Preis $t_price_html .= $this->checkAttributes($p_products_id, true) . $this->xtcFormat($p_special_price, $p_format) .'<br />';// Anfang Anpassung Prozente/Betrag bei Sonderpreis if(gm_get_conf('SHOW_OLD_SPECIAL_PRICE') == '1') //Prozente/Betrag unter neuem Preis { $t_price_html .= '<span style="color: white;background-color: red; font-size:70%; font-weight: normal; padding: 2px 5px 2px 5px;">Jetzt ' . round((1 - $p_old_price/$p_special_price)*100, 0) . '% / ' . $this->xtcFormat(round($p_old_price-$p_special_price, 2) , $p_format) .' sparen !</span>'; }// Ende Anpassung Prozente/Betrag bei Sonderpreis if($p_return_array == 0) { return $t_price_html; } else { $t_price_array = array(); $t_price_array['formated'] = $t_price_html; $t_price_array['plain'] = $p_special_price; return $t_price_array; } } else { $t_price = round($p_special_price, $this->currencies[$this->actualCurr]['decimal_places']); return $t_price; } }... Die Formatierung für Hintergrund, Schriftgröße, Schriftfarbe etc. nach eigenen Geschmack anpassen. Man kann das sicherlich auch Update sicher einbauen Muss dann noch mal entsprechend in den Overloads eingebaut werden... Gruß Michael
also Avenger hat mir gerade sowas eingebaut. Habe das noch geändert von % auf Summe. Einfach mal anfragen. sieht so aus: (Link nur für registrierte Nutzer sichtbar.)
Updatesichere (und leicht geänderte) Version für (2.4.0.0): Ordner = /user_classes/overloads/xtcPrice DateiName = specials_xtcPrice.php PHP: <?php /* -------------------------------------------------------------- xtcPrice.php 2015-01-20 gm Gambio GmbH http://www.gambio.de Copyright (c) 2015 Gambio GmbH Released under the GNU General Public License (Version 2) [http://www.gnu.org/licenses/gpl-2.0.html] -------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(currencies.php,v 1.15 2003/03/17); www.oscommerce.com (c) 2003 nextcommerce (currencies.php,v 1.9 2003/08/17); www.nextcommerce.org (c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: xtcPrice.php 1316 2005-10-21 15:30:58Z mz $) Released under the GNU General Public License --------------------------------------------------------------------------------------- */ class specials_xtcPrice extends specials_xtcPrice_parent { public function xtcFormatSpecial($p_products_id, $p_special_price, $p_old_price, $p_format, $p_return_array = 0) { if($p_format) { $t_price_html = ''; // Anfang Anpassung Prozente/Betrag bei Sonderpreis if(gm_get_conf('SHOW_OLD_SPECIAL_PRICE') == '1') //Prozente/Betrag über neuem Preis { $t_price_html .= '<span style="color: white;background-color: red; font-size:60%; font-weight: normal; border-radius: 9px; padding: 1px 5px 1px 5px;">Jetzt ' . $this->xtcFormat(round($p_old_price-$p_special_price, 2) , $p_format) .' sparen | - ' . round(100-(100/$p_old_price)*$p_special_price, 0) . '% !</span><br />'; } // Ende Anpassung Prozente/Betrag bei Sonderpreis //Alter Preis if(gm_get_conf('SHOW_OLD_SPECIAL_PRICE') == '1') { $t_price_html .= '<span class="productOldPrice">' . $this->v_coo_language_text_manager->get_text('old_special_price') . $this->xtcFormat($p_old_price, $p_format) . '</span><br />'; } //Neuer Preis $t_price_html .= 'jetzt nur' .$this->checkAttributes($p_products_id, true) . $this->xtcFormat($p_special_price, $p_format); if($p_return_array == 0) { return $t_price_html; } else { $t_price_array = array(); $t_price_array['formated'] = $t_price_html; $t_price_array['plain'] = $p_special_price; return $t_price_array; } } else { $t_price = round($p_special_price, $this->currencies[$this->actualCurr]['decimal_places']); return $t_price; } } }
Hallo, ich habe die Datei gerade mal in meinen Shop Ver. 2.5.2.0 eingebunden. Anzeige klappt, man kann sich dann aber leider nicht mehr einloggen. Cache alle gellert! Muss da noch etwas angepasst werden?
Hallo, Danke an Mick, Dirk und an Barbara für die Einbindung. http://www.moringafarm-shop.de/moringa-kapseln/moringa-kapseln-120x400mg.html Sieht ganz toll aus.
Hallo zusammen, Es klingt sehr gefährliche mit der knappe Erklärung von Dirk. Bereits zwei Opfer trafen das Problem mit Einlogen. Würde die Expertin/Experte paar Hinweise über Fehlerverhütungen äußern? Es wäre ja sehr dankbar. Gleich Fehler muss ja nicht jeder erleben. Gruß