JTL Shop (5): OnPage Composer (OPC)

Because i had some pain when starting development with JTL Shops new OPC, I start to collect some stuff and things here to help others.

Add new OPC-Mount Point / Region to the Template

This is pretty simple, but i think it’s currently undocumented, just add this:

{opcMountPoint id='opc_before_filter' inContainer=false}

Perform emtpy check for OPC-Mount Points

As of now, there seems to be no function to check if a OPC-Mount Point is empty. So we need to use Smarty instead:

{* Add further OPC region *}
{capture "opc_category_top"}
    {opcMountPoint id='opc_category_top'}
{/capture}

{if $smarty.capture.opc_category_top|strip|replace:' ':'' != ""}
    <div class="result-wrapper-top">
        {$smarty.capture.opc_category_top}
    </div>
{/if}

This is only required if have an extra wrapper surrounding the mount point.

… more to come.

    Schreibe einen Kommentar

    Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.