Sonderpreise Kundengruppen Spezifisch

  • Die Sonderpreis Functiokn sollte erweitert werden um Kundengruppen. Wenn ein Shopbetreiber auch viel mit Wiederverkäufer arbeitet, kann es nicht sien das der Endkunde den glleichen Sonderpreis hat wie der Händler.

    Diese ist relativ einfach gelöst.

    Hier meine Änderung die ich verwende:

    PHP
    function xtcCheckSpecial($pID) {
    		$product = xtc_db_fetch_array(xtDBquery("SELECT specials_price_". $this->actualGroup ." AS specials_new_products_price FROM " . TABLE_SPECIALS . " WHERE products_id = '" . $pID . "' AND status = '1';"));
            return $product['specials_new_products_price'];
    }


    Lediglich erweitern um specials_price_". $this->actualGroup ." AS und die Tabelle Specials um die einzelnen Gruppen specials_price_0, specials_price_1, specials_price_2 usw. ( je nach Menge der Gruppen die im SHOP angelegt sind fertig ).

    Natrülich muss auch der Adminbereich usw. angepasst werden um die Sonderpreise eingeben zu können. Ich fülle diese über eine WAWI deshalb bei mir nicht notwendig gewesen bis heute, ist aber auc h kein Hexenwerk.
    Wenn dies für die CATENO Schnittstelle Kompatibel sein soll, dann bitte vom Admin eine PM an mich. Diese Änderung können wir dann gerne besprechen und auch verwenden. Sieht etwas anders aus als bei mir.

    Würde mich freuen wenn Ihr das mit einbaut.

    Danke

    Einmal editiert, zuletzt von mbdesign (2. Juli 2014 um 10:01)

  • Finde ich gut, da wir auch Händler haben und die Preise von der WAWI hochladen lassen.

  • Kleinigkeit als Verschönerung beim Kaufen und Merkzettelbutton. Es werden jetzt die passenden Icons angezeigt. Könnte man ja im nächsten update einfließen lassen.

    Erweitert um '<span class="glyphicon glyphicon-shopping-cart"> und '<span class="glyphicon glyphicon-star">

    Änderung in der class.product.php

    function getBuyNowButton($id, $name) {
    global $PHP_SELF, $current_category_id;
    if (MODULE_COMMERCE_SEO_INDEX_STATUS == 'True') {
    if (PRODUCT_ID > 0) {
    return '<a title="' . TEXT_BUY . TEXT_NOW . '" rel ="nofollow" href="' . xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->data['products_id'] . '&action=buy_now&BUYproducts_id=' . $id . '&' . xtc_get_all_get_params(array('action')), 'NONSSL') . '">' . cseo_wk_image_button('button_buy_now.gif', ((CSS_BUTTON_ACTIVE == 'true' || CSS_BUTTON_ACTIVE == 'css') ? '<span class="glyphicon glyphicon-shopping-cart"></span> '.TEXT_BUTTON_BUY_NOW : TEXT_BUY . $name . TEXT_NOW)) . '</a>';
    } else {
    return '<a title="' . TEXT_BUY . TEXT_NOW . '" rel ="nofollow" href="' . xtc_href_link(FILENAME_DEFAULT, 'cPath=' . $current_category_id . '&action=buy_now&BUYproducts_id=' . $id . '&' . xtc_get_all_get_params(array('action', 'cat', 'cPath')), 'NONSSL') . '">' . cseo_wk_image_button('button_buy_now.gif', ((CSS_BUTTON_ACTIVE == 'true' || CSS_BUTTON_ACTIVE == 'css') ? '<span class="glyphicon glyphicon-shopping-cart"></span> '.TEXT_BUTTON_BUY_NOW : TEXT_BUY . $name . TEXT_NOW)) . '</a>';
    }
    } else {
    return '<a title="' . TEXT_BUY . TEXT_NOW . '" rel ="nofollow" href="' . xtc_href_link(basename($_SERVER['SCRIPT_NAME']), 'action=buy_now&BUYproducts_id=' . $id . '&' . xtc_get_all_get_params(array('action')), 'NONSSL') . '">' . cseo_wk_image_button('button_buy_now.gif', ((CSS_BUTTON_ACTIVE == 'true' || CSS_BUTTON_ACTIVE == 'css') ? '<span class="glyphicon glyphicon-shopping-cart"></span> '.TEXT_BUTTON_BUY_NOW : TEXT_BUY . $name . TEXT_NOW)) . '</a>';
    }
    }

    function getWishlistButton($id, $name) {
    global $PHP_SELF, $current_category_id;
    if (MODULE_COMMERCE_SEO_INDEX_STATUS == 'True') {
    if (PRODUCT_ID > 0) {
    return '<a title="' . $name . TEXT_NOW_TO_WISHLIST . '" rel ="nofollow" href="' . xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->data['products_id'] . 'cPath=' . $current_category_id . '&action=wishlist&products_id=' . $id . '&' . xtc_get_all_get_params(array('action')), 'NONSSL') . '">' . xtc_image_button('button_to_wish_list.gif', ((CSS_BUTTON_ACTIVE == 'true' || CSS_BUTTON_ACTIVE == 'css') ? '<span class="glyphicon glyphicon-star"></span> '.TEXT_TO_WISHLIST : $name . TEXT_NOW_TO_WISHLIST)) . '</a>';
    } else {
    return '<a title="' . $name . TEXT_NOW_TO_WISHLIST . '" rel ="nofollow" href="' . xtc_href_link(FILENAME_DEFAULT, 'cPath=' . $current_category_id . '&action=wishlist&products_id=' . $id . '&' . xtc_get_all_get_params(array('action')), 'NONSSL') . '">' . xtc_image_button('button_to_wish_list.gif', ((CSS_BUTTON_ACTIVE == 'true' || CSS_BUTTON_ACTIVE == 'css') ? '<span class="glyphicon glyphicon-star"></span> '.TEXT_TO_WISHLIST : $name . TEXT_NOW_TO_WISHLIST)) . '</a>';
    }
    } else {
    return '<a title="' . $name . TEXT_NOW_TO_WISHLIST . '" rel ="nofollow" href="' . xtc_href_link(basename($_SERVER['SCRIPT_NAME']), 'action=wishlist&products_id=' . $id . '&' . xtc_get_all_get_params(array('action')), 'NONSSL') . '">' . xtc_image_button('button_to_wish_list.gif', ((CSS_BUTTON_ACTIVE == 'true' || CSS_BUTTON_ACTIVE == 'css') ? '<span class="glyphicon glyphicon-star"></span> '.TEXT_TO_WISHLIST : $name . TEXT_NOW_TO_WISHLIST)) . '</a>';
    }
    }

  • In dem Zug würde ich auch den Text "zum Merkzettel ändern auf "Merken". Ist völlig ausreichend und nimmt nicht so viel Platz weg.

    d.h. TEXT_TO_WISHLIST in dem SQL Insert anpassen bei Neuinstallation.


    [ATTACH=CONFIG]686[/ATTACH]


    [ATTACH=CONFIG]687[/ATTACH]

  • Yep aber dan sehet man nicht die icons wen copy paste von hier.

    Auch nicht wen cache leer, und den settings in shopadmin auf buttons mit css oder was auch immer, in sourcecode seht man es auch nicht

  • yep, und den icones to sehe auch hier, also vielleicht doch ein fehler in den code die hier ins forum steht? ( copy paste falsch oder ein ' . } falsch... weil habe es mehermals versucht in 2 tests
    Weil wen ich es auf ein andere stelle mache kommt den icon aber dan eben nur vor oder nach die buttun selbe, also nicht in button, aber damit weiss ich in jedenfall das die icons laufen sollen

    http://plussupport.commerce-seo.de/showthread.php…ull=1#post13915

    und hier wegen prob mit html editor und den empty spans http://plussupport.commerce-seo.de/showthread.php?t=2229

    leerzeichen oder was auch ... php 5.3.x ??

    Einmal editiert, zuletzt von jotest (20. Juli 2014 um 17:10)

  • Die Sonderpreis Kundengruppenpreise sind im QF8 drin. Die Sprachen kannst Du doch im Admin anpassen > Einstellungen > Button Sprache :)

    <p>Wir geben nur Anregungen und Hilfestellung auf Basis unserer Erfahrung, keine Rechtshilfe!<br>\m/('_')\m/</p>