<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omi Kabira on Medium]]></title>
        <description><![CDATA[Stories by Omi Kabira on Medium]]></description>
        <link>https://medium.com/@om.panth?source=rss-6862a3e281------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*B3UQOh7awtJsR-gAvkyfbQ.png</url>
            <title>Stories by Omi Kabira on Medium</title>
            <link>https://medium.com/@om.panth?source=rss-6862a3e281------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 15:20:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@om.panth/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Customizing the Asset Share Commons UI: A Practical Guide to Extending Cart and Download Modals]]></title>
            <link>https://medium.com/@om.panth/customizing-the-asset-share-commons-ui-a-practical-guide-to-extending-cart-and-download-modals-6ced5e3cd2ec?source=rss-6862a3e281------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ced5e3cd2ec</guid>
            <category><![CDATA[asset-share-commons]]></category>
            <category><![CDATA[adobe-experience-manager]]></category>
            <category><![CDATA[aem]]></category>
            <dc:creator><![CDATA[Omi Kabira]]></dc:creator>
            <pubDate>Fri, 11 Jul 2025 12:18:57 GMT</pubDate>
            <atom:updated>2025-07-11T12:20:07.315Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHv-CG5gcZzShiMcj_Xi8Q.png" /></figure><p>💡 <em>If you’re working on Adobe Experience Manager (AEM) and using Asset Share Commons (ASC), you’ve likely encountered limitations in the default UI. This blog will walk you through how to customize the cart and download modals in ASC with ease.</em></p><h3>What is Asset Share Commons (ASC)?</h3><p><a href="https://opensource.adobe.com/asset-share-commons/">Asset Share Commons</a> is an open-source reference implementation built on top of Adobe Experience Manager (AEM). It allows non-technical users to search, discover, and download assets quickly without needing full access to the AEM author instance.</p><p>ASC comes with powerful OOTB components like:</p><ul><li>Search bar and filters</li><li>Results view (list/grid)</li><li>Asset details page</li><li>Cart and download features</li></ul><p>While it’s robust, the out-of-the-box UI might not always fit your custom business needs. Luckily, it’s extendable.</p><h3>Where to Start with UI Customization</h3><h4>Tech Stack to Know:</h4><ul><li>AEM Sites (Author/Publisher)</li><li>Vanilla JavaScript / jQuery (for UI)</li><li>Sightly (HTL) and Sling Models (for backend logic)</li><li>LESS / CSS</li></ul><p>All the UI components in ASC are modular and can be overridden via client libraries (clientlibs) and custom Sling models.</p><h3>🛒 Scenario 1: Customizing the Cart Modal in Asset Share Commons</h3><p>The cart modal is triggered when you add an asset using the “Add to Cart” action. ASC provides a default cart modal (HTML + JS), which can be extended.</p><h3>🛠 Steps to Customize Cart Modal</h3><h4>Step 1: Locate the Default Cart Component</h4><p>Path:</p><pre>plaintextCopyEdit/apps/asset-share-commons/components/modals/cart</pre><p>You can overlay this component in your project:</p><pre>/apps/&lt;your-project&gt;/components/modals/cart</pre><h4>Step 2: Update the Cart Markup</h4><p>Edit cart.html to add your custom fields, UI enhancements, or layout changes.</p><p>For example:</p><pre>&lt;!-- Add custom text field --&gt;<br>&lt;div class=&quot;custom-notes&quot;&gt;<br>    &lt;label for=&quot;notes&quot;&gt;Add Notes:&lt;/label&gt;<br>    &lt;textarea id=&quot;notes&quot; name=&quot;notes&quot;&gt;&lt;/textarea&gt;<br>&lt;/div&gt;</pre><h4>Step 3: Extend the JS Logic</h4><p>Extend the JS logic in your custom clientlib-cart:</p><pre>$(document).on(&#39;click&#39;, &#39;.add-to-cart&#39;, function () {<br>    // existing logic<br>    // add your custom code here<br>    console.log(&quot;Custom cart logic triggered!&quot;);<br>});</pre><p>Make sure your custom clientlib category overrides the default:</p><pre>&quot;categories&quot;: [&quot;asset-share-commons.cart&quot;],<br>&quot;dependencies&quot;: [],</pre><h3>Scenario 2: Enhancing the Download Modal</h3><p>The download modal lets users select download options (renditions, original, etc.). Let’s say you want to add a watermark toggle or download terms.</p><h3>🛠 Steps to Customize Download Modal</h3><h4>Step 1: Overlay the Download Component</h4><p>Copy the component:</p><pre>/apps/asset-share-commons/components/modals/download</pre><p>To:</p><pre>/apps/&lt;your-project&gt;/components/modals/download</pre><h4>Step 2: Add Your Custom Logic</h4><p>Edit download.html:</p><pre>&lt;!-- Add watermark checkbox --&gt;<br>&lt;label&gt;<br>    &lt;input type=&quot;checkbox&quot; id=&quot;add-watermark&quot; /&gt;<br>    Add watermark to download<br>&lt;/label&gt;</pre><h4>Step 3: Hook Into Download Submission</h4><p>In your custom JS:</p><pre>$(document).on(&quot;click&quot;, &quot;#download-button&quot;, function () {<br>    const addWatermark = $(&quot;#add-watermark&quot;).is(&quot;:checked&quot;);</pre><pre>    if (addWatermark) {<br>        console.log(&quot;Watermark requested&quot;);<br>        // You can send this flag via POST or adapt backend logic<br>    }<br>});</pre><h3>Pro Tips: Keeping Customizations Upgrade-Friendly</h3><ul><li><strong>Use overlays</strong>, don’t directly edit /apps/asset-share-commons</li><li><strong>Modularize your JS/CSS</strong> using clientlib-site or feature-specific libs</li><li><strong>Use HTL inheritance</strong> and include only the parts you want to override</li><li><strong>Keep Sling Models separate</strong> if you’re modifying backend logic</li><li><strong>Test on both Author and Publish</strong> environments for consistent behavior</li></ul><h3>🧪 Bonus: Add Analytics to Modal Interactions</h3><p>Want to track how often users interact with your cart or download modals?</p><pre>$(document).on(&quot;click&quot;, &quot;#download-button&quot;, function () {<br>    adobeDataLayer.push({<br>        event: &quot;assetDownload&quot;,<br>        assetCount: $(&quot;.asset-tile&quot;).length<br>    });<br>});</pre><h3>🧩 Conclusion</h3><p>Asset Share Commons is a powerful base, but real business value often lies in <em>customization</em>. With a little UI extension and clientlib magic, you can make the user experience much more aligned with your business or client requirements.</p><p>If you found this useful or have a question, feel free to leave a comment. I’ll be happy to share example code or repo links in future blogs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ced5e3cd2ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>