Wunsch für weitere Smarty-Blöcke

Thema wurde von barbara, 12. Mai 2018 erstellt.

  1. barbara
    barbara G-WARD 2014-2020
    Registriert seit:
    14. August 2011
    Beiträge:
    35.657
    Danke erhalten:
    11.371
    Danke vergeben:
    1.616
    Ich wollte mir zwar erst die 3.9.x genauer ansehen, ob das da eventuell anders ist....
    aber ich fange das einfach schon einmal an.
    Vielleicht haben ja andere auch noch Dateien, die ein paar mehr Blöcke vertragen könnten :)

    Mein Shop ist ein 3.8.0.1
    In diesen beiden Dateien könnten ein paar Blöcke mehr:
    templates/ Honeygrid/ module/ checkout_confirmation_products.html
    HTML:
    {block name="module_checkout_confirmation_products_tbody"}
                        <tbody>
                            {foreach name=products_data item=products_item_array from=$content_data.products_data}
                           
                                {assign var="STR_attributes" value=""}
                                {foreach item=attribute from=$products_item_array.attributes}
                                    {if isset($attribute.option) && $attribute.option != ''}
                                        {assign var="STR_attributes" value=$STR_attributes|cat:$attribute.option|cat:": "|cat:$attribute.value|cat:"<br />"}
                                    {/if}
                                {/foreach}
                           
                                {assign var="STR_properties" value=""}
                                {foreach item=property from=$products_item_array.properties_array}
                                    {assign var="STR_properties" value=$STR_properties|cat:$property.properties_name|cat:": "|cat:$property.values_name|cat:"<br />"}
                                {/foreach}
                           
                                {assign var="p_shipping_time" value=""}
                                {if $products_item_array.shipping_time && $products_item_array.shipping_time != ''}
                                    {assign var="p_shipping_time" value=$info.text_shipping_time|cat:": "|cat:$products_item_array.shipping_time}
                                {/if}
                               
                                {assign var="p_model" value=""}
                                {if $products_item_array.products_model && $products_item_array.products_model != ''}
                                    {assign var="p_model" value=$info.text_model|cat:": "|cat:$products_item_array.products_model}
                                {/if}
    
                                {assign var="p_weight" value=""}
                                {if $products_item_array.products_weight && $products_item_array.products_weight != ''}
                                    {assign var="p_weight" value=$info.text_weight|cat:": "|cat:$products_item_array.products_weight|cat:" "|cat:$info.text_weight_unit}
                                {/if}
               
                                {include file="get_usermod:{$tpl_path}snippets/order/order_item.html"
                                    is_wishlist=false
                                    is_confirmation=true
                                    is_checkout=true
                                    show_p_model="true"
                                    p_attributes=$STR_attributes
                                    p_properties=$STR_properties
                                    p_name=$products_item_array.products_name
                                    p_checkout_info=$products_item_array.checkout_information
                                    p_details_url=$products_item_array.products_url
                                    p_details_text=$info.text_detail_information
                                    p_price_single=$products_item_array.price
                                    p_price_final=$products_item_array.final_price
                                    last=($smarty.foreach.products_data.last) ? "true" : "false"
                                    image_src={($products_item_array.products_image && $products_item_array.products_image != "") ? $products_item_array.products_image : ""}
                                    image_alt={($products_item_array.products_alt && $products_item_array.products_alt != "") ? $products_item_array.products_alt : $products_item_array.products_name}
                                    image_title={($products_item_array.products_alt && $products_item_array.products_alt != "") ? $products_item_array.products_alt : $products_item_array.products_name}
                                    p_price_vpe={($products_item_array.products_vpe_array.vpe_text && $products_item_array.products_vpe_array.vpe_text != '') ? $products_item_array.products_vpe_array.vpe_text : ""}
                                    p_unit={($products_item_array.unit && $products_item_array.unit != '') ? $products_item_array.unit : ""}
                                    p_qty={($products_item_array.quantity && $products_item_array.quantity != '') ? $products_item_array.quantity : ""}
                                    p_shipping_time=$p_shipping_time
                                    p_model=$p_model
                        p_inhalt=$p_inhalt
                        p_size=$p_size
                                    p_weight=$p_weight
                                }
                            {/foreach}
                        </tbody>
                    {/block}
    und die zweite ist
    templates/ Honeygrid/ module/ order_details.html
    HTML:
    {block name="module_order_details_item"}
                                    {assign var="p_model" value=""}
                                    {if $module_data.PRODUCTS_MODEL && $module_data.PRODUCTS_MODEL != ''}
                                        {assign var="p_model" value=$txt.text_model|cat:" "|cat:$module_data.PRODUCTS_MODEL}
                                    {/if}
                                   
                                    {assign var="p_weight" value=""}
                                    {if $module_data.GM_WEIGHT && $module_data.GM_WEIGHT != '' && $module_data.GM_WEIGHT != '0'}
                                        {assign var="p_weight" value=$txt.text_weight|cat:" "|cat:$module_data.GM_WEIGHT|cat:" "|cat:$txt.text_weight_unit}
                                    {/if}
                                   
                                    {assign var="p_shipping_time" value=""}
                                    {if $module_data.PRODUCTS_SHIPPING_TIME && $module_data.PRODUCTS_SHIPPING_TIME != ''}
                                        {assign var="p_shipping_time" value=$txt.text_shippingtime|cat:" "|cat:$module_data.PRODUCTS_SHIPPING_TIME}
                                    {/if}
                                   
                                    {assign var="STR_attributes" value=""}
                                    {if $module_data.ATTRIBUTES && $module_data.ATTRIBUTES != ''}
                                        {foreach key=key_data item=item_data from=$module_data.ATTRIBUTES}
                                            {assign var="STR_attributes" value=$STR_attributes|cat:$item_data.NAME|cat:": "|cat:$item_data.VALUE_NAME|cat:"<br />"}
                                        {/foreach}
                                    {/if}
                                   
                                    {include file="get_usermod:{$tpl_path}snippets/order/order_item.html"
                                    is_wishlist=false
                                    is_confirmation=false
                                   
                                    last=($smarty.foreach.cart.last) ? true : false
                                    p_url=$module_data.PRODUCTS_LINK
                                    p_name=$module_data.PRODUCTS_NAME
                                    image_src={($module_data.PRODUCTS_IMAGE && $module_data.PRODUCTS_IMAGE != "") ? $module_data.PRODUCTS_IMAGE : ""}
                                    image_alt={($module_data.IMAGE_ALT && $module_data.IMAGE_ALT != "") ? $module_data.IMAGE_ALT : $module_data.PRODUCTS_NAME}
                                    image_title={($module_data.IMAGE_ALT && $module_data.IMAGE_ALT != "") ? $module_data.IMAGE_ALT : $module_data.PRODUCTS_NAME}
                                    p_model=$p_model
                                    show_p_model=$module_data.SHOW_PRODUCTS_MODEL
                                    p_weight=$p_weight
                                    p_shipping_time=$p_shipping_time
                                    p_attributes=$STR_attributes
                                    p_price_single=$module_data.PRODUCTS_SINGLE_PRICE
                                    p_price_vpe={($module_data.PRODUCTS_VPE_ARRAY.vpe_text && $module_data.PRODUCTS_VPE_ARRAY.vpe_text != '') ? $module_data.PRODUCTS_VPE_ARRAY.vpe_text : ""}
                                    p_shipping_info=$module_data.TAX_SHIPPING_INFO
                                    p_unit={($module_data.UNIT && $module_data.UNIT != '') ? $module_data.UNIT : ""}
                               
                                    p_qty_name=$module_data.PRODUCTS_QTY_INPUT_NAME
                                    p_qty_value=$module_data.PRODUCTS_QTY_VALUE
                                    p_price_final=$module_data.PRODUCTS_PRICE
                               
                                    p_hidden_name=$module_data.PRODUCTS_ID_INPUT_NAME
                                    p_hidden_value=$module_data.PRODUCTS_ID_EXTENDED
                                    p_hidden_qty_name=$module_data.PRODUCTS_OLDQTY_INPUT_NAME
                                    p_hidden_qty_value=$module_data.PRODUCTS_QTY_VALUE
                                    p_error_id=$module_data.PRODUCTS_ID
                                    tpl_properties=$module_data.PROPERTIES
                                    }
                                {/block}
     
  2. Torben Wark
    Torben Wark Gambio GmbH
    Registriert seit:
    15. Juli 2014
    Beiträge:
    2.581
    Danke erhalten:
    1.178
    Danke vergeben:
    399
    Danke für die Hinweise, da fehlen in der Tat noch Blöcke. Schau ich mir bei Gelegenheit mal an, was man da noch einbauen kann: https://tracker.gambio-server.net/issues/57183. Wenn du noch mehr Stellen findest, an denen Blöcke fehlen, dann immer raus damit ;)