"Neue Artikel"-Swiper auf Artikeldetailseite

Thema wurde von RM-MAG, 15. Juli 2017 erstellt.

  1. RM-MAG

    RM-MAG Mitglied

    Registriert seit:
    11. Dezember 2014
    Beiträge:
    11
    Danke erhalten:
    1
    Danke vergeben:
    2
    Wir versuchen gerade unter den Artikelbeschreibungen (ähnlich wie die Cross-Sellingleiste) den "neue Artikel"-Swiper (der normalerweise auf der Titelseite engeblendet werden kann) zu platzieren.
    In der Datei "standard.html", die ja die Artikeldetailseite beschreibt, haben wir bereits einen entsprechenden Code eingefügt und vieles ausprobiert - jedoch leider ohne den gewünschten Erfolg (Überschrift wird angezeigt, aber keine Artikel). Wir vermuten, dass wir noch andere Dateien modifizieren müssen, kennen uns jedoch nicht so gut aus, wenn es tiefer in die Programmierung geht ;-)

    Gibt es hierfür im Forum evtl. eine Anleitung bzw. jemanden, der ähnliches geschafft hat, und uns die zu ändernden Dateien mitteilt?

    Vielen Dank schon mal im Voraus.
     
  2. Torben Wark

    Torben Wark Gambio GmbH

    Registriert seit:
    15. Juli 2014
    Beiträge:
    2.581
    Danke erhalten:
    1.178
    Danke vergeben:
    399
    Dafür müsste ich einmal sehen, was ihr schon gemacht habt. Kannst du mal ein paar Codeschnipsel zeigen?
     
  3. RM-MAG

    RM-MAG Mitglied

    Registriert seit:
    11. Dezember 2014
    Beiträge:
    11
    Danke erhalten:
    1
    Danke vergeben:
    2
    Hallo, und Danke für deine Hilfe. Wie oben schon beschrieben, haben wir versucht die templates/Honeygrid/module/product_info/standard.html (Artikeldetailseite) zu modifizieren, indem wir Teile aus den Dateien templates/Honeygrid/module/new_products.html und new_products_overview.html in die standard.html eingefügt haben, so dass unter der Artikelbeschreibung zumindest mal das Gerüst aufgetaucht war. Leider konnten keine Artikel geladen werden.

    Wir haben vieles probiert und dann irgendwie den Überblick verloren. Momentan sieht die modifizierte standard.html so aus:

    HTML:
    {load_language_text section="product_info"}
    {load_language_text section="buttons" name="button"}
    {load_language_text section="customers_status" name="customer"}
    
    {load_language_text section="new_products"}
    {load_language_text section="index" name="index"}
    {load_language_text section="product_listing" name="listing"}
    
    {$PRODUCT_NAVIGATOR}
    
    {include file="get_usermod:{$tpl_path}snippets/product_info/images/product_images_modal.html"}
    
    <div class="product-info product-info-default row"{$RICH_SNIPPET_ARRAY.product_itemscope}>
    
        <div class="product-info-content col-xs-12">
    
            <div class="row">
    
                <div class="product-info-title-mobile col-xs-12 visible-xs-block visible-sm-block">
                    <h2>{$PRODUCTS_NAME}</h2>
                    {if $showRating && $AGGREGATE_REVIEW_DATA.averageRating && $AGGREGATE_REVIEW_DATA.averageRating != 0}
                        {include file="get_usermod:{$tpl_path}snippets/rating_stars.html" rating_rounded=$AGGREGATE_REVIEW_DATA.averageRating rating_count=$AGGREGATE_REVIEW_DATA.count }
                    {/if}
                </div>
    
                {product_ribbons
                showManufacturerImages=$showManufacturerImages
                showProductRibbons=$showProductRibbons
                product_id=$PRODUCTS_ID
                out=arr_ribbons
                }
    
                {if $images}
                    <div class="product-info-stage col-xs-12 col-md-8{if $images|count lt 2} centered{/if}">
    
                        {include file="get_usermod:{$tpl_path}snippets/product_info/images/product_images.html"}
    
                        {if $arr_ribbons.manufacturer|count > 0}
                            {include file="get_usermod:{$tpl_path}snippets/ribbon/ribbon_manufacturer.html"
                            ribbon="manufacturer"
                            id=$arr_ribbons.manufacturer.0.ID
                            text=$arr_ribbons.manufacturer.0.IMAGE_ALT
                            img=$arr_ribbons.manufacturer.0.IMAGE
                            url=$arr_ribbons.manufacturer.0.URL
                            }
                        {/if}
    
                    </div>
                {/if}
    
                {assign var="stickybox" value={template_setting name="gx-product-info-details-sticky"}}
                <div class="product-info-details col-xs-12 col-md-4" data-gambio-widget="{if $stickybox}stickybox {/if}cart_handler product_min_height_fix">
    
                    <div class="loading-overlay"></div>
                    <div class="magnifier-overlay"></div>
                    <div class="magnifier-target">
                        <div class="preloader"></div>
                    </div>
    
                    {if $arr_ribbons.ribbons}
                        {include file="get_usermod:{$tpl_path}snippets/ribbon/ribbon.html" ribbons=$arr_ribbons}
                    {/if}
    
                    {$TS_PRODUCT_RATING}
                    <form action="{$FORM_ACTION_URL}" class="form-horizontal js-product-form{if $GM_GPRINT} customizer{/if}">
    
                        <div class="hidden-xs hidden-sm">
                        {if $showRating && $AGGREGATE_REVIEW_DATA.averageRating && $AGGREGATE_REVIEW_DATA.averageRating != 0}
                            <span {$RICH_SNIPPET_ARRAY.product_itemprop_aggregate_rating}{$RICH_SNIPPET_ARRAY.aggregate_rating_itemscope}>
                                <span style="display: none"{$RICH_SNIPPET_ARRAY.aggregate_rating_itemprop_ratingValue}>{$AGGREGATE_REVIEW_DATA.averageRating}</span>
                                <span style="display: none"{$RICH_SNIPPET_ARRAY.aggregate_rating_itemprop_ratingCount}>{$AGGREGATE_REVIEW_DATA.count}</span>
                            </span>
                            <a href="#product-ratings">
                                {include file="get_usermod:{$tpl_path}snippets/rating_stars.html" rating_rounded=$AGGREGATE_REVIEW_DATA.averageRating rating_count=$AGGREGATE_REVIEW_DATA.count }
                            </a>
                        {/if}
                        </div>
                        <h1 class="product-info-title-desktop hidden-xs hidden-sm">{$RICH_SNIPPET_ARRAY.product_itemprop_name_start}{$PRODUCTS_NAME}{$RICH_SNIPPET_ARRAY.product_itemprop_name_end}</h1>
    
                        {if $PRODUCTS_MODEL !='' || $SHOW_PRODUCTS_MODEL || $SHIPPING_NAME || $SHOW_SHIPPING_TIME || $PRODUCTS_QUANTITY || $SHOW_PRODUCTS_QUANTITY || $additional_fields}
                            <dl class="dl-horizontal">
                                {include file="get_usermod:{$tpl_path}snippets/product_info/model.html"}
                                {include file="get_usermod:{$tpl_path}snippets/product_info/shipping_time.html"}
                                {include file="get_usermod:{$tpl_path}snippets/product_info/stock.html"}
    
                                {$additional_fields}
    
                                {if $SHOW_PRODUCTS_WEIGHT}
                                    <dt>{$txt.text_weight}</dt>
                                    <dd class="products-details-weight-container"><span>{$PRODUCTS_WEIGHT}</span> {$txt.text_weight_unit} {if $PRODUCTS_QUANTITY_UNIT}{$PRODUCTS_QUANTITY_UNIT}{else}{$txt.text_weight_qty_unit}{/if}<dd>
                                {/if}
                                {if $GM_MIN_ORDER}
                                    <dt class="product-details-order-min">{$txt.text_min_order}</dt>
                                    <dd class="product-details-order-min">{$GM_MIN_ORDER}</dd>
                                {/if}
                            </dl>
                        {/if}
    
                        {$properties_selection_form}
    
                        {$MODULE_product_options}
    
                        <div class="attribute-images"></div>
    
                        {include file="get_usermod:{$tpl_path}snippets/product_info/customizer.html" position=3}
    
                        {* @todo: styles and testing *}
                        {include file="get_usermod:{$tpl_path}snippets/product_info/legal_age.html"}
    
                        {* @todo: styles and testing *}
                        {if $MODULE_graduated_price != ''}
                            {$MODULE_graduated_price}
                        {/if}
    
                        <div class="cart-error-msg alert alert-danger" role="alert"></div>
    
                        <div class="price-container" {$RICH_SNIPPET_ARRAY.product_itemprop_offers}{$RICH_SNIPPET_ARRAY.offer_itemscope}>
                            <div class="price-calc-container" id="attributes-calc-price">
                                {include file="get_usermod:{$tpl_path}snippets/product_info/price.html"}
    
                                {if $QUANTITY}
                                    {if $PRODUCTS_QUANTITY_UNIT}
                                        {$PRODUCTS_QUANTITY_UNIT}:
                                    {/if}
    
                                    {include file="get_usermod:{$tpl_path}snippets/product_info/product_box_bottom.html"}
                                {else}
                                    <input type="hidden" name="products_id" id="products-id" value="{$PRODUCTS_ID}" />
                                    {$RICH_SNIPPET_ARRAY.offer_itemprop_out_of_stock}
                                {/if}
    
                            </div>
                        </div>
    
                        {* @todo: styles and testing *}
                        {$KLARNA_WIDGET}
    
                    </form>
    
                    {if $QUANTITY}
                        {paypal_ec_button page='product'}
                    {/if}
                </div>
    
                <div class="product-info-description col-md-8" data-gambio-widget="tabs">
                    {include file="get_usermod:{$tpl_path}snippets/product_info/product_description.html"}
                </div>
    
                {if $PRODUCTS_DATE_AVIABLE != ''}
                <div class="products_info_available col-md-8">
                    {$PRODUCTS_DATE_AVIABLE}
                </div>
                {/if}
    
                <div class="product-info-share col-md-8">
                    {include file="get_usermod:{$tpl_path}snippets/product_info/social_share.html"}
                </div>
    
                {if $showRating}
                    {if $MODULE_products_reviews != ''}
                        <div id="product-ratings" class="product-info-rating col-md-8">
                            {$MODULE_products_reviews}
                        </div>
                    {/if}
                {/if}
    
            </div><!-- // .row -->
    
        </div><!-- // .product-info-content -->
    
      
    <!-- TEST -->
      
      
        <div id="product_listing"> <!-- new_products.html, new products in categories -->
    
        <div class="categories_heading_title">
            {$txt.heading_text}
        </div>
    
        {foreach name=aussen item=module_data from=$module_content}
        <div class="product_box">
          
            <div class="image_cell">
                    {if $module_data.PRODUCTS_IMAGE!=''}
                        <a href="{$module_data.PRODUCTS_LINK}">
                            <img src="{$module_data.PRODUCTS_IMAGE}" alt="{$module_data.PRODUCTS_IMAGE_ALT|default:$module_data.PRODUCTS_NAME}" title="{$module_data.PRODUCTS_IMAGE_ALT|default:$module_data.PRODUCTS_NAME}"/>
                        </a>
                        <br />
                    {/if}
                    {if $module_data.PRODUCTS_FSK18=='true'}
                        <img src="{$tpl_path}assets/images/ab18.png" alt="ab18.png" title="ab18.png" />
                        <br />
                    {/if}
            </div>
          
            <div class="header_cell">
                <span class="details_button">[ <a href="{$module_data.PRODUCTS_LINK}" class="product_link">{$txt.text_details}</a> ]</span>
                <a href="{$module_data.PRODUCTS_LINK}" class="product_link">{$module_data.PRODUCTS_NAME}</a>          
            </div>
          
            <div class="content_cell">
                    {$module_data.PRODUCTS_SHORT_DESCRIPTION}<br />
    
                    <div align="right">
                    <strong>{$module_data.PRODUCTS_PRICE}</strong><br />
                    {if $module_data.PRODUCTS_TAX_INFO neq '' || $module_data.PRODUCTS_SHIPPING_LINK neq ''}
                        ({$module_data.PRODUCTS_TAX_INFO}{$module_data.PRODUCTS_SHIPPING_LINK})<br />
                    {/if}  
                          
                    {if $module_data.PRODUCTS_VPE}
                        {$module_data.PRODUCTS_VPE}<br />
                    {/if}
    
                    {$module_data.PRODUCTS_BUTTON_BUY_NOW}
                    </div>
            </div>
          
        </div>  
        {/foreach}
    </div>
    
    <!-- TEST -->
      
      
        <div class="product-info-listings col-xs-12 clearfix" data-gambio-widget="product_hover">
            {include file="get_usermod:{$tpl_path}snippets/product_info/product_lists.html"}
        </div>
    
    </div><!-- // .product-info -->
    
    

    Wobei hier nur in den ersten Zeilen einige Loads hinzugefügt wurden und der Bereich zwischen den beiden <!-- TEST --> wurde aus der Datei "new_products.html" herauskopiert. Der einzige Effekt, der hierbei erzielt wurde, ist, dass unter der Artikelbeschreibung der Text "Neue Artikel" auftaucht. Dafür ist der Einkaufen-Button beschädigt und weitere Fehler auf der Seite.
    Ich denke, man muss hier ganz neu ansetzen, weil durch das Reinkopieren von weiteren Codeschnipseln zwar leichte Veränderungen sichtbar wurden, jedoch nicht der gewünschte Erfolg eingetreten ist...

    Ich denke, es wäre den Aufwand wert, hierfür eine funktionierende Vorlage zu haben, weil manche Shops wahrscheinlich den Aufwand der Cross-Selling-Einstellungen scheuen (womit man Ähnliches erzielen würde) und einfach nur eine zufällige Anordnung von weiteren oder neuen Artikeln haben möchten. Bei unserem Kunden kommt noch speziell hinzu, dass er nur Einzelteile in seinem Shop führt (Antiquitäten), die beim Verkauf dann auch aus dem Cross-Selling fallen würden. Der Aufwand der Pflege ist also mit einer "Artikel-Automatik" ungleich kleiner um immer auch Kaufempfehlungen auf den Detailseiten zu haben.

    Wir freuen uns über jegliche Hilfe.
     
  4. Torben Wark

    Torben Wark Gambio GmbH

    Registriert seit:
    15. Juli 2014
    Beiträge:
    2.581
    Danke erhalten:
    1.178
    Danke vergeben:
    399
    Mit einer Anpassung des HTML ist es da leider nicht getan, da die nötigen Informationen für die Anzeige der neuen Produkte dort nicht zur Verfügung stehen. Deshalb seht ihr dort auch nur die Überschrift und keine Artikel.

    Ihr müsstet hierfür die Methode prepare_data() des ProductInfoContentView überladen und dort die benötigten Informationen besorgen und an das Template übergeben.