This is a list with a serial of different examples for a quite more uncommon situations.

1 How to use show attribute

All the endPoints allows to hide themselves from the menu. In a first sight this may seem useless, but the functionality of this is to allow the creation of endPoints which are only accessible from a link in other endPoints, not through the menu Navigation bar.

In this example the cart EndPoint is hidden, and a link is created in a List endPoint which will redirect the user to the cart applying a certain filtering:

Copy

appConfiguration.xml

<endPoints>
    <endPoint type="CART" title="REPLENORDER_ITEM" path="test" show="false">
        <cartConfiguration autoLoad="true">
            <pkCols>
                <pkCol>codart</pkCol>
                <pkCol nullable="true">codalm</pkCol>
            </pkCols>
            <cartItemSelectors>
                <cartItemSelector title="CINFA">
                    <dataSQL>frontend_cart_item_selector2</dataSQL>
                </cartItemSelector>
            </cartItemSelectors>
            <cartView>frontend_getCartFull2</cartView> <!-- Select for the cart -->
            <cartSmallView>frontend_getCartCompleted</cartSmallView> <!-- Select for the small cart -->
            <getExistingCartSerial>frontend_getCartSerial</getExistingCartSerial><!-- get the serial of the open cart-->
            <findItemInCart>frontend_searchSerialLineCart</findItemInCart><!--search the line of an item in the open cart-->
            <checkoutTransaction>frontend_cart_doch</checkoutTransaction> <!-- Transaction of the cart-->
            <lineTransaction>frontend_cart_docl</lineTransaction> <!-- transaction for the lines-->
            <shippingInfo>frontend_getShippingInfo</shippingInfo><!-- Select to obtain the shipping info-->
            <countDistinctItems>frontend_countDistintItemCart</countDistinctItems> <!-- count the amount of lines in the open cart-->
        </cartConfiguration>
    </endPoint>
    <endPoint path="ffplantranshcodsoc" title="OFFERORDER_ITEM" type="LIST">
        <dataSQL>frontend_sql_carts</dataSQL>
        <links>
            <link column="marca" href="/cart/test/0/productList?marca={marca}"/>
        </links>
    </endPoint>
</endPoints>

The SQL Query of the List EndPoint is:

Copy

frontend_sql_carts

<select>
    <columns>
        DISTINCT marca, modelo
    </columns>
    <from table="garticul">
    </from>
</select>

The result will be something like:

Where each line has a link to the cart with a certain filter

2 Form with default values, but without constraints

When any page with a Form is being loaded, you can define a set of constraints through the appConfiguration.xml ( notEditable and default constraints). However, in some occasions the form page must display a default value, but this one might be allowed to be edited by the user.

To do that, the only thing that needs to be done is to create a link to the form sending this default values in the path as path params:

Below three forms are displayed with they URL path each time.

form/orders/258/edit form/orders/258/edit?email=TestDefault form/orders/258/edit?codpos=TestDefault
Any change applied email with a default value constrained inputs prevail over this path default inputs

3 Top used Box

A small box with links to the top used endPoints is possible to implement.

Requirements

The fast-links added at the top used box can only be links to endPoints of type = LIST

Copy

appConfiguration.xml

<configuration>
    <user>
        <catalogExistsUser>frontend_exists_user</catalogExistsUser>
        <catalogEditUserTrx>frontend_cterdire</catalogEditUserTrx>
        <catalogGetUserData>frontend_user_data</catalogGetUserData>
        <catalogGetExistsUserDir>frontend_exists_user_dir</catalogGetExistsUserDir>
        <catalogGetUserSessionData>frontend_get_user_session_data</catalogGetUserSessionData>
        <catalogGetTopQueries>frontend_top_queries</catalogGetTopQueries>
    </user>
    <endPoints>
        <endPoint type="LIST" title="TITLE_ORDERS" titleSingular="TITLE_ORDER" path="orders">
            <dataSQL>frontend_newOrder</dataSQL>
        </endPoint>
        <endPoint type="LIST" title="TITLE_CLIENT" titleSingular="TITLE_CLIENTS" path="customers">
            <dataSQL>frontend_customers</dataSQL>
        </endPoint>
        <endPoint type="LIST" path="deliveryNotes" title="TITLE_DELIVERYNOTE">
            <dataSQL>frontend_deliveryNotes</dataSQL>
        </endPoint>
    </endPoints>
</configuration>

This is the SQL query used to get the Top Used list:

Copy

frontend_top_queries

<union>
    <select-one>'orders' dest,           'Pedidos' descr</select-one>
    <select-one>'deliveryNotes' dest,    'Albarans' descr</select-one>
</union>

This will create a box with two links that will appear at the left of the page