Hallo, vlt kann jemand helfen. Ich möchte das der Herstellername im Artikel angezeigt wird. Ggf. zusätzlich auch in der Grid bzw. List Ansicht. Jedoch bekomme ich diesen nicht ausgegeben, ich habe sämtliche Anleitung hier aus dem Forum probiert Fehlanzeige. Es erfolgt keinerlei Ausgabe des Herstellernamens. Jemand evtl. eine Idee? Shop Version ist 3.4.0.0 Danke im Voraus.
Hi. um den Namen des Herstellers in der Liste ausgeben zu können, muss dieser erst zur Verfügung gestellt werden. Dazu sind einige Programmierkenntnisse erforderlich. Erstelle dazu den Ordner "product" im Ordner "GXUserComponents/overloads" und darin eine Datei mit dem Namen: "ProductListingManufactureNameProduct.inc.php" und folgendem Inhalt: PHP: <?phpclass ProductListingManufactureNameProduct extends ProductListingManufactureNameProduct_parent{ function buildDataArray(&$array, $image = 'thumbnail') { $t_data_array = parent::buildDataArray($array,$image); $manufacturer_data = $this->get_manufacturer_data($array['products_id'],$_SESSION['language_id']); $t_data_array['MANUFACTURE_NAME'] = $manufacturer_data['manufacturers_name']; return $t_data_array; } function get_manufacturer_data($products_id,$language_id) { $t_query = 'SELECT m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url FROM ' . TABLE_MANUFACTURERS . ' m LEFT JOIN ' . TABLE_MANUFACTURERS_INFO . ' mi ON (m.manufacturers_id = mi.manufacturers_id AND mi.languages_id = "' . $language_id . '"), ' . TABLE_PRODUCTS . ' p WHERE p.products_id = "' . (int)$products_id . '" AND p.manufacturers_id = m.manufacturers_id'; $t_result = xtc_db_query($t_query); if(xtc_db_num_rows($t_result) > 0) { return xtc_db_fetch_array($t_result); } }} Dann kann man eine USERMOD der Datei templates/Honeygrid/snippets/product_listing/product_grid_only.html erstellen mit dem Namen product_grid_only-USERMOD.html und an gewünschter Stelle in der Datei folgende Variable einfügen: {$PRODUCT.MANUFACTURE_NAME}
Hallo, habe es ausprobiert, auf der Startseite in den Swipern zeigt er den Herstellernamen an aber wenn ich in eine Kategorie gehe in der Ansicht ?view_mode=Default noch ?view_mode=tiled kommt es nicht..... hmm....
Für die Ausgabe in der Kategorie muss man ein anderes Template mit USERMOD hinterlegen. Zu beachten sind auch die vergebenen CSS-Klassen "hidden-grid" und "hidden-list". Je nach Anzeige muss man evtl. eine passende Klasse angeben. Sonst kann es zu einer Spaghetti-Ausgabe werden
Die Ausgabe für die Startseite ist die "products_grid_only.html" zuständig, dies hast du bereits umgesetzt. Für die Ausgabe in den Kategorien sollte dir folgendes weiterhelfen: templates/Honeygrid/module/product_listing/product_listing_v1.html inkludiert HTML: {include file="get_usermod:{$tpl_path}snippets/product_listing/product_listing_main.html"} templates/Honeygrid/snippets/product_listing/product_listing_main.html inkludiert und übergibt die Variablen an templates/Honeygrid/snippets/product_listing/product.html HTML: {include file="get_usermod:{$tpl_path}snippets/product_listing/product.html" is_swiper="false" showRating=$showRating p_image={($module_data.PRODUCTS_IMAGE && $module_data.PRODUCTS_IMAGE != '') ? $module_data.PRODUCTS_IMAGE : "" } p_url=$module_data.PRODUCTS_LINK p_img_title=$module_data.PRODUCTS_IMAGE_ALT|default:$module_data.PRODUCTS_NAME p_img_alt=$module_data.PRODUCTS_IMAGE_ALT|default:$module_data.PRODUCTS_NAME p_meta=$p_meta p_name_full=$module_data.PRODUCTS_NAME p_headline=$module_data.PRODUCTS_NAME p_short_desc=$p_short_desc p_price=$module_data.PRODUCTS_PRICE p_vpe={($module_data.PRODUCTS_VPE && $module_data.PRODUCTS_VPE != '') ? $module_data.PRODUCTS_VPE : "" } p_imgs=$imagetest p_fsk18=$module_data.PRODUCTS_FSK18 tpl_path=($tpl_path && $tpl_path != "") ? $tpl_path : "" p_attributes=$module_data.GM_ATTRIBUTES p_graduated_prices=($module_data.GM_GRADUATED_PRICES && $module_data.GM_GRADUATED_PRICES != "") ? $module_data.GM_GRADUATED_PRICES : "" p_shipping_name=$module_data.PRODUCTS_SHIPPING_NAME p_qty=$module_data.PRODUCTS_QUANTITY p_weight=($module_data.SHOW_PRODUCTS_WEIGHT && $module_data.PRODUCTS_WEIGHT && $module_data.PRODUCTS_WEIGHT != "") ? $module_data.PRODUCTS_WEIGHT : "" p_shipping_img=$module_data.PRODUCTS_SHIPPING_IMAGE p_shipping_img_alt=$module_data.PRODUCTS_SHIPPING_NAME p_shipping_img_title=$module_data.PRODUCTS_SHIPPING_NAME p_shipping_name=$module_data.PRODUCTS_SHIPPING_NAME p_shipping_link_active=$module_data.PRODUCTS_SHIPPING_LINK_ACTIVE co_id=$smarty.const.SHIPPING_INFOS show_qty_info=$GM_SHOW_QTY_INFO p_stock=$module_data.GM_PRODUCTS_STOCK p_unit=$module_data.UNIT p_by_now=($module_data.GM_PRODUCTS_BUTTON_BUY_NOW && $module_data.GM_PRODUCTS_BUTTON_BUY_NOW != "") ? $module_data.GM_PRODUCTS_BUTTON_BUY_NOW : "" p_qty_gm=$module_data.GM_PRODUCTS_QTY p_deactivate_btn=$DEACTIVATE_BUTTON p_id=$module_data.PRODUCTS_ID qty_value=$module_data.QTY_DATA.VALUE input_hidden=$HIDDEN_QTY_NAME show_qty=$GM_SHOW_QTY has_attributes=$module_data.GM_HAS_ATTRIBUTES has_properties=$module_data.GM_HAS_PROPERTIES qty_id=$module_data.QTY_DATA.ID qty_type=$module_data.QTY_DATA.TYPE qty_name=$module_data.QTY_DATA.NAME qty_cls=$module_data.QTY_DATA.CLASS data_index="productlist_"|cat:$module_data.PRODUCTS_ID hover="true" img_start_widget="true" } nun füge deine übergebene Variable im templates/Honeygrid/snippets/product_listing/product.html an der gewünschten Stelle ein und nicht die CSS-Klassen "hidden-list" und "hidden-grid" vergessen Selbstverständlich alles als USERMODS Viel Spaß beim austoben
Danke ich probier's dann gleich mal aus bin leider noch kein Profi darin Hatte vorher XT Commerce war einfacher als Gambio finde ich