Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ecwid product browser code generator.
<style>.codegen-widget {
padding: 1em;
background-color: #eaf3fa;
font: normal 16px tahoma, geneva, verdana, sans-serif;
}
.codegen-widget small {
font-size: 75%;
}
.codegen-widget input {
font: normal 16px tahoma, geneva, verdana, sans-serif;
color: #000;
}
.codegen-widget input.ng-invalid {
color: #f00;
}
.codegen-widget textarea {
width: 100%;
font-size: 14px;
font-family: Consolas, Menlo, Monaco, Lucida Console, monospace, serif;
}</style>
<div ng-app class="codegen-widget">
<p><label>Your store ID:<input type="text" ng-model="storeid" ng-pattern="/\d{4,}/" required placeholder="1003"></label><br>
<small><a href="http://kb.ecwid.com/w/page/15853282/How%20to%20get%20your%20Store%20ID">Where to get your store ID?</a></small>
</p>
<p><textarea readonly rows="8" cols="80">
&lt;div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://app.ecwid.com/script.js?{{storeid}}&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt; xProductBrowser(&quot;categoriesPerRow=3&quot;,&quot;views=grid(3,3) list(10) table(20)&quot;,&quot;categoryView=grid&quot;,&quot;searchView=list&quot;,&quot;style=&quot;); &lt;/script&gt;
&lt;noscript&gt;Your browser does not support JavaScript. Please proceed to &lt;a href=&quot;https://app.ecwid.com/jsp/{{storeid}}/catalog&quot;&gt;HTML version of this store&lt;/a&gt;&lt;/noscript&gt;
&lt;/div&gt;
</textarea></p>
</div></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment