<?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 Yurii Tartachnyi on Medium]]></title>
        <description><![CDATA[Stories by Yurii Tartachnyi on Medium]]></description>
        <link>https://medium.com/@anemos369?source=rss-3dc417d6c998------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5ijaWEQlgyhd7UbZqA9-jg.jpeg</url>
            <title>Stories by Yurii Tartachnyi on Medium</title>
            <link>https://medium.com/@anemos369?source=rss-3dc417d6c998------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:58:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anemos369/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[BigCommerce Rebrand to Commerce]]></title>
            <link>https://medium.com/@anemos369/bigcommerce-rebrand-to-commerce-f66613ccc583?source=rss-3dc417d6c998------2</link>
            <guid isPermaLink="false">https://medium.com/p/f66613ccc583</guid>
            <dc:creator><![CDATA[Yurii Tartachnyi]]></dc:creator>
            <pubDate>Mon, 22 Sep 2025 13:14:23 GMT</pubDate>
            <atom:updated>2025-09-22T13:14:23.874Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FbWsrm-2zoy1Exn6BclIhA.jpeg" /></figure><p>BigCommerce has a new name — <strong>Commerce</strong> — let’s take a look at why that’s actually great news.</p><p>If you’re already running a store on the platform, take a deep breath — nothing breaks. Your dashboards, themes, and APIs are exactly where you left them. Orders keep coming in, your customizations still work, and those integrations you fought to set up? Safe and sound. For those of us who’ve spent years building with Stencil, making the leap to Catalyst, or experimenting with Makeswift — this isn’t a reset button.</p><p>This is more about where the company is headed next, not a sudden shift that upends your day-to-day work.</p><h3>Why the Name Change</h3><p>On July 31, 2025, BigCommerce Holdings officially became <strong>Commerce.com, Inc.</strong>, with a parent brand now simply called <strong>Commerce</strong>.</p><p>That means BigCommerce, Feedonomics, and Makeswift now all live under one roof.</p><p>The idea here isn’t just a shiny new logo — it’s a vision for the future: building a connected ecosystem for what Commerce calls the next era of <em>agentic commerce</em>. Picture a world where AI assistants help shoppers research, compare, and even complete purchases for them.</p><p>And just to show they’re serious, the company even changed its Nasdaq ticker from <strong>BIGC</strong> to <strong>CMRC</strong>.</p><h3>What Stays the Same</h3><p>It’s normal to wonder, “Does this mean I need to rebuild everything?” The short answer: no.</p><ul><li><strong>BigCommerce</strong> is still the flexible SaaS platform merchants trust to build and scale stores.</li><li><strong>Feedonomics</strong> is still making product feeds cleaner, more structured, and more discoverable.</li><li><strong>Makeswift</strong> is still the user-friendly way to build beautiful storefronts with full control.</li></ul><p>Rather than cramming everything into a single product, Commerce acts like the glue that ties these tools together — and then layers AI on top.</p><h3>A Big Bet on AI</h3><p>Here’s where things get interesting.</p><p>Commerce is leaning heavily into AI because the way people shop is changing fast. Search engines are no longer the only entry point — more and more, shoppers are turning to answer engines like ChatGPT, Perplexity, and Gemini to do the work for them.</p><p>Commerce wants merchants to be ready for this shift:</p><ul><li><strong>Feedonomics</strong> ensures your product data is ready for AI discovery.</li><li><strong>BigCommerce</strong> keeps powering smooth transactions no matter where the journey starts.</li><li><strong>Makeswift for Catalyst</strong> lets teams create storefronts designed for both humans and AI-driven traffic.</li></ul><p>The idea isn’t that this is all happening tomorrow — but that you’ll have the tools to thrive as these technologies become mainstream.</p><h3>Why Developers Should Care</h3><p>For developers, this is a green light.</p><p>Commerce is clearly investing more in its developer community — promising better support, earlier beta programs, and more freedom to play with AI features as they roll out.</p><p>Yes, we’ll still be writing code, extending APIs, and building with GraphQL. But we’ll also start doing new things like:</p><ul><li>Designing prompts for AI assistants</li><li>Structuring data so answer engines actually understand it</li><li>Building interfaces that can adjust on the fly for new shopping behaviors</li></ul><p>This won’t happen all at once — which is a good thing. It gives us space to experiment and learn as we go.</p><h3>Your Next Steps</h3><p>Depending on where you’re at, here’s what you should be thinking about:</p><ul><li><strong>Already a merchant?</strong> You don’t have to migrate. Your store runs just as it did yesterday — but keep an eye out for smarter feeds, AI merchandising, and new design flexibility.</li><li><strong>Shopping for a new platform?</strong> This is a great time to take a fresh look. Commerce isn’t just a store builder — it’s building an open, AI-ready ecosystem to help you sell smarter and scale faster.</li></ul><h3>Looking Ahead</h3><p>Commerce is betting on a future where businesses automate the repetitive stuff, deliver more personalized shopping experiences, and make faster, data-driven decisions.</p><p>If you’re planning a redesign, thinking about adding marketplaces, or just curious how AI can fit into your business, now’s the time to get ready.</p><h3>Let’s Build the Future Together</h3><p>Wondering how all of this affects you?</p><p>At <a href="https://digital-commerce.blackbit.com/en/bigcommerce-rebranding-commerce-ai-ecommerce"><strong>Blackbit</strong></a>, we’ve been working with BigCommerce for years — from classic Stencil projects to fully headless builds — and we use <strong>Feedonomics</strong> and <strong>Makeswift for Catalyst</strong> daily to deliver enterprise solutions.</p><p>If you’re thinking about migrating, improving your product feeds, or experimenting with AI-driven merchandising, let’s chat.</p><p>Together, we can build a commerce experience that’s ready for what’s next.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f66613ccc583" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BigCommerce How to Build a Bulk Order on the Listing Page]]></title>
            <link>https://medium.com/@anemos369/bigcommerce-how-to-build-a-bulk-order-on-the-listing-page-43aebabf6c57?source=rss-3dc417d6c998------2</link>
            <guid isPermaLink="false">https://medium.com/p/43aebabf6c57</guid>
            <category><![CDATA[bigcommerce-category]]></category>
            <category><![CDATA[category-listing-page]]></category>
            <category><![CDATA[bulk-order]]></category>
            <category><![CDATA[bigcommerce]]></category>
            <dc:creator><![CDATA[Yurii Tartachnyi]]></dc:creator>
            <pubDate>Tue, 28 Nov 2023 14:22:11 GMT</pubDate>
            <atom:updated>2023-11-28T14:22:11.531Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9CtDdK44esUI2vT-Zdjzfw.jpeg" /></figure><p>The ability to buy different product variants like color, and size or to order several different variants (bulk order), by listing the product catalog, is simple and fast. It’s no secret that such a function improves the user experience because it is convenient and fast, and therefore there is less chance that the buyer will close the tab. If we are talking about B2B stores, then this bulk order function becomes one of the main requirements when choosing an e-commerce platform.</p><p>In this post, I want to share my experience of how to build such functionality in an online store that works based on BigCommerce.</p><p>What you will need for this:</p><ul><li>Make sure that we have Stencil CLI installed. Installation instructions are here: <a href="https://developer.bigcommerce.com/docs/storefront/stencil/cli/install">https://developer.bigcommerce.com/docs/storefront/stencil/cli/install</a></li><li>In my example, I will use the BigCommerce base theme Cornerstone, the current version can be downloaded from the link: <a href="https://github.com/bigcommerce/cornerstone">https://github.com/bigcommerce/cornerstone</a>, or by downloading it from your control panel. In this example, I use Cornerstone Version 6.12.0</li><li>In my example, I want to use only standard tools, and therefore I not use additional packages, the tools provided by Stencil CLI will be enough, it contains all the tools we will need, I use the Cornerstone theme because it is the base theme from which all custom themes begin.</li><li>Run the project locally, let’s go!</li></ul><h3>Preparing the Project for Development</h3><p>One of the biggest problems of implementing such functionality is the transfer of product data to the listing page, in this case to the category page. The main purpose of this post is to show one method of doing this.</p><p>Let’s prepare our project before we move on to the custom code. Changes will be added to three files.</p><p><em>templates\pages\category.html</em></p><p><em>templates\components\products\card.html</em></p><p><em>assets\js\theme\category.js</em></p><p>Get data about the product, namely the list of options and other data that we will need, on the categories page I will use <strong>GraphQL</strong>, so first we need to transfer the data about the api token. For this we use Handlebars Helpers <strong>inject</strong>: <a href="https://developer.bigcommerce.com/docs/storefront/stencil/themes/context/handlebars-reference#inject">https://developer.bigcommerce.com/docs/storefront/stencil/themes/context/handlebars-reference#inject</a></p><p>The first step in templates/pages/category.html put this part after ​global attributes:</p><pre>{{inject &#39;apiToken&#39; settings.storefront_api.token }}</pre><p>after putting this line in the file must look like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*jHB9GHYsxZgH_JyBkiwL9Q.jpeg" /></figure><p>The use of attributes is a convenient tool for obtaining data for processing in custom solutions. In this case, we use the date attribute to transfer translations from the category “product”</p><pre>&lt;div class=&quot;lang-translation&quot; data-lang-translation=&quot;{{langJson &#39;products&#39;}}&quot;&gt;&lt;/div&gt;</pre><p>I create a block, and in the data attribute I add translations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*ZwDlz7ntldFi--XhQJJbvg.jpeg" /></figure><p>Second step templates\components\products\card.html we need to add a place where our variant option block will be dynamically inserted. We need the date attribute to identify the product on the category page, we use handlebars to pass the product id.</p><pre>&lt;div class=&quot;option-order-box&quot; data-product-id=&quot;{{id}}&quot;&gt;&lt;/div&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*1hhrR4Jlq6QQhYjfE5VhFw.jpeg" /></figure><p>Third step in assets\js\theme\category.js we create a new method in the category class. This method get all elements of the product cards and identifies the ids of the products and returns an array with all ids on the page.</p><pre>dataProductCollection() {<br>    const cards = document.querySelectorAll(&#39;.product .card&#39;);<br>    const dataIdArr= [];<br>    cards.forEach(card =&gt; {<br>        const id = card.dataset.test.replace(&#39;card-&#39;, &#39;&#39;);<br>        dataIdArr.push(Number(id));<br>    });<br>    return dataIdArr;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*8qA38K3bIEpRjFv2dypN0Q.jpeg" /></figure><p>So, now, we have completed the preparatory work.</p><h3>Get Product Variant Data on the Category Page.</h3><p>To get product data, in our case options, I will use Storefront GraphQL API Reference <a href="https://developer.bigcommerce.com/graphql-storefront/reference#definition-ProductOptionValue">https://developer.bigcommerce.com/graphql-storefront/reference#definition-ProductOptionValue</a>.</p><p>You can find out more about GraphQL in BigCommerce here: <a href="https://developer.bigcommerce.com/docs/graphql-storefront">https://developer.bigcommerce.com/docs/graphql-storefront</a></p><p>So, we will need to create several js files, I suggest creating a custom folder in assets\js\theme. A category folder is created in the custom folder, and our js file is created in it: optionProductData.js</p><pre>export default function (key, productIdArray) {<br>   //our code<br>}</pre><p>key, productIdArray — we will receive this parameter from assets\js\theme\category.js</p><p>Query should look like this:</p><pre>query:`query productById {<br>    site {<br>      products(entityIds: [${String(productIdArray)}]) {<br>        edges {<br>          node {<br>            name<br>            sku<br>            entityId<br>            variants {<br>              edges {<br>                node {<br>                  defaultImage {<br>                    urlOriginal<br>                  }<br>                  sku<br>                  entityId<br>                  inventory {<br>                    isInStock<br>                  }<br>                  options {<br>                    edges {<br>                      node {<br>                        displayName<br>                        entityId<br>                        values {<br>                            edges {<br>                                node {<br>                                    entityId<br>                                    label<br>                                }<br>                            }<br>                        }<br>                      }<br>                    }<br>                  }<br>                  prices {<br>                    price {<br>                        value<br>                        formatted<br>                    }<br>                    salePrice {<br>                        value<br>                        formatted<br>                    }<br>                    basePrice {<br>                        value<br>                        formatted<br>                    }<br>                  }<br>                }<br>              }<br>            }<br>          }<br>        }<br>      }<br>    }<br>  }<br>`</pre><p>The structure of the received data is quite deep and for more convenient use it will be very convenient to go through the data and record it in a more convenient form, and also, to filter a group of options by name.</p><pre>const products = response.data.site.products.edges;<br>products.forEach(product =&gt; {<br>  const indexOfInhoud = product.node.variants.edges[0].node.options.edges.findIndex(<br>    (edge) =&gt; edge.node.displayName.toLowerCase() === &#39;size&#39;,<br>  );<br>  if (indexOfInhoud &lt; 0) return;<br>  const variants = product.node.variants.edges;<br>  const mappedVariants = variants.map((variant) =&gt; {<br>    if (!variant.node) return;<br>    const label = variant.node.options.edges[indexOfInhoud].node.values.edges[0].node.label;<br>    const options = variant.node.options;<br>    return {<br>        prices: variant.node.prices,<br>        defaultImage: variant.node.defaultImage,<br>        inventory: variant.node.inventory.isInStock,<br>        label,<br>        sku: variant.node.sku,<br>        options,<br>    };<br>  });<br>  const obj = {<br>    id: product.node.entityId,<br>    productName: product.node.name,<br>    productVariant: mappedVariants<br>  }<br>  allProductVariants.push(obj);<br>})</pre><p>Now that everything is together, our file should look something like this:</p><pre>export default function (key, productIdArray) {<br>  const allProductVariants = [];<br>  fetch(&#39;/graphql&#39;, {<br>      method: &#39;POST&#39;,<br>      headers: {<br>          &#39;Content-Type&#39;: &#39;application/json&#39;,<br>          &#39;Authorization&#39;: `Bearer ${key}`<br>      },<br>      body: JSON.stringify({<br>        query:`query productById {<br>            site {<br>              products(entityIds: [${String(productIdArray)}]) {<br>                edges {<br>                  node {<br>                    name<br>                    sku<br>                    entityId<br>                    variants {<br>                      edges {<br>                        node {<br>                          defaultImage {<br>                            urlOriginal<br>                          }<br>                          sku<br>                          entityId<br>                          inventory {<br>                            isInStock<br>                          }<br>                          options {<br>                            edges {<br>                              node {<br>                                displayName<br>                                entityId<br>                                values {<br>                                    edges {<br>                                        node {<br>                                            entityId<br>                                            label<br>                                        }<br>                                    }<br>                                }<br>                              }<br>                            }<br>                          }<br>                          prices {<br>                            price {<br>                                value<br>                                formatted<br>                            }<br>                            salePrice {<br>                                value<br>                                formatted<br>                            }<br>                            basePrice {<br>                                value<br>                                formatted<br>                            }<br>                          }<br>                        }<br>                      }<br>                    }<br>                  }<br>                }<br>              }<br>            }<br>          }<br>        `<br>      }),<br>  })<br>  .then(res =&gt; res.json())<br>  .then(function(response) {<br>      if(response) {<br>        const products = response.data.site.products.edges;<br>        products.forEach(product =&gt; {<br>          const indexOfInhoud = product.node.variants.edges[0].node.options.edges.findIndex(<br>            (edge) =&gt; edge.node.displayName.toLowerCase() === &#39;size&#39;,<br>          );<br><br>          if (indexOfInhoud &lt; 0) return;<br><br>          const variants = product.node.variants.edges;<br><br>          const mappedVariants = variants.map((variant) =&gt; {<br>            if (!variant.node) return;<br>            const label = variant.node.options.edges[indexOfInhoud].node.values.edges[0].node.label;<br>            const options = variant.node.options;<br>            return {<br>                prices: variant.node.prices,<br>                defaultImage: variant.node.defaultImage,<br>                inventory: variant.node.inventory.isInStock,<br>                label,<br>                sku: variant.node.sku,<br>                options,<br>            };<br>          });<br><br>          const obj = {<br>            id: product.node.entityId,<br>            productName: product.node.name,<br>            productVariant: mappedVariants<br>          }<br><br><br>          allProductVariants.push(obj);<br>        })<br>     }<br>     return allProductVariants;<br>  })<br>  .then(data =&gt; {<br>    console.log(&#39;[data]: &#39;, data);<br>  });<br>}</pre><p>Great, now we can import this function into the category.js file and call it by passing parameters.</p><p>import optionProductData from ‘./custom/category/optionProductData’;</p><p>and call section onReady()</p><pre>optionProductData(this.context.apiToken, this.dataProductCollection());</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*W2D3g9QksLu1FV-iNnul8Q.jpeg" /></figure><p>and initFacetedSearch() — This is required to update data when using pagination or filters</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*BMomW8zz7TGlXM6qHV0u2w.png" /></figure><p>And if we have a created product, we will get the following data with the “Size” options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*s4DMIRnjnj9njSH6u1J2gQ.png" /></figure><p>As a result of the console, we should get the following data. This data is enough to build a diverse interface. Having a sku, we can create a link to add the product to the cart using BigCommerce <strong>Add to Cart URLs</strong> <a href="https://developer.bigcommerce.com/docs/storefront/cart-checkout/guide/add-to-cart-urls">https://developer.bigcommerce.com/docs/storefront/cart-checkout/guide/add-to-cart-urls</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*JyOai1BhHHLyEmT02HDJzQ.png" /></figure><h3>Creating an Interface</h3><p>For an example of how to use this data, I will create a simple interface. I won’t go into detail about exactly what I did since it’s vanilla js and creating dynamic elements. Let’s dwell only on specific points that are the features of BigCommerce.</p><p>The first point is access to translations. So that our interface is multilingual. For this we already created a block in templates/pages/category.html:</p><pre>&lt;div class=&quot;lang-translation&quot; data-lang-translation=&quot;{{langJson &#39;products&#39;}}&quot;&gt;&lt;/div&gt;</pre><p>Example:</p><pre>const getTranslations = () =&gt; {<br>    const langTranslation = document.querySelector(&#39;.lang-translation&#39;);<br>    if (!langTranslation) {<br>        return;<br>    }<br><br>    const lang = langTranslation.dataset.langTranslation || &#39;&#39;;<br>    return JSON.parse(lang).translations;<br>};<br><br>const lang = getTranslations();</pre><p>Now we have access to translations by key. To see what we have in translations or to add new ones, we can look in the folder: lang.</p><p>Learn more: <a href="https://developer.bigcommerce.com/docs/storefront/stencil/themes/localization/translation-keys">https://developer.bigcommerce.com/docs/storefront/stencil/themes/localization/translation-keys</a></p><p>Second, we need an additional function that will dynamically update the products in the preview cart. Because adding to the cart will happen without reloading the page. For this, I will use <strong>BigCommerce storefront api</strong>: <a href="https://developer.bigcommerce.com/docs/rest-storefront">https://developer.bigcommerce.com/docs/rest-storefront</a>, namely Get a Cart: <a href="https://developer.bigcommerce.com/docs/rest-storefront/carts#get-a-cart">https://developer.bigcommerce.com/docs/rest-storefront/carts#get-a-cart</a></p><p>To do this, we will create a global folder in our custom folder and create cartUpdate.js in it</p><pre>export default function () {<br>    const pricePlace = document.querySelector(&#39;[data-cart-preview] .countPill&#39;)<br>    fetch(&#39;/api/storefront/cart&#39;, {<br>        credentials: &#39;include&#39;,<br>    }).then((response) =&gt; {<br>        return response.json();<br>    }).then((myJson) =&gt; {<br>        if (myJson.length &gt; 0) { <br>            const products = myJson[0].lineItems.physicalItems;<br>            let quantProd = 0;<br>            products.forEach(element =&gt; {<br>                quantProd += element.quantity;<br>            });<br>            pricePlace.innerHTML = `${quantProd}`;<br>            pricePlace.style.display = &#39;inline-block&#39;;<br>        }<br>    });<br>};</pre><p>To do this, we will create a function that will be dynamically created based on the received data and placed in the corresponding product based on the product id. Let’s create another js file optionCard.js in our custom/category directory. Ok, now we are ready to create a simple interface for the bulk order block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*LxBwPakQdtLql0YoQTLFag.jpeg" /></figure><p>Example js:</p><pre>import cartUpdate from &#39;../global/cartUpdate&#39;;<br><br>export default function ( data ) {<br>    const getTranslations = () =&gt; {<br>        const langTranslation = document.querySelector(&#39;.lang-translation&#39;);<br>        if (!langTranslation) {<br>            return;<br>        }<br>    <br>        const lang = langTranslation.dataset.langTranslation || &#39;&#39;;<br>        return JSON.parse(lang).translations;<br>    };<br><br>    const lang = getTranslations();<br><br>    if (data.length === 0) return;<br>    const bulkOrderField = document.querySelectorAll(&#39;#product-listing-container .product .option-order-box&#39;);<br>    bulkOrderField.forEach(item =&gt; {<br>        data.forEach(elem =&gt; {<br>            if (Number(item.dataset.productId) === elem.id) {<br>                let shablon = ``;<br>                const variants = elem.productVariant;<br>                variants.forEach(variant =&gt; {<br>                    const line = `<br>                        &lt;div class=&#39;bulk-option-line&#39; data-sku=${variant.sku}&gt;<br>                            &lt;div class=&#39;bulk-option-group&#39;&gt;<br>                                &lt;input checkbox type=&#39;checkbox&#39; class=&#39;checker&#39; /&gt;<br>                                &lt;p&gt;${variant.label}&lt;/p&gt;<br>                            &lt;/div&gt;<br>                            &lt;p class=&#39;price-block&#39;&gt;<br>                                ${variant.prices.salePrice ? (&#39;&lt;span class=&quot;sell-price&quot;&gt;&#39; + variant.prices.salePrice.formatted +&#39;&lt;/span&gt;&lt;br /&gt;&#39;) : &#39;&#39;}<br>                                &lt;span class=${variant.prices.salePrice &amp;&amp; &#39;text-through&#39;}&gt;${variant.prices.basePrice.formatted}&lt;/span&gt;<br>                            &lt;/p&gt;<br>                            &lt;div class=&#39;product-marker&#39;&gt;<br>                                &lt;span aria-label=&#39;status&#39; class=&#39;status-marker ${variant.inventory ? &#39;success-marker&#39; : &#39;warning-marker&#39;}&#39;&gt;&lt;/span&gt;<br>                            &lt;/div&gt;<br>                            &lt;input class=&#39;product-qty&#39; min=&#39;0&#39; type=&#39;number&#39; placeholder=&#39;0&#39; /&gt;<br>                        &lt;/div&gt;<br>                    `;<br>                    shablon += line;<br>                })<br><br>                item.innerHTML = `<br>                &lt;div class=&#39;bulk-wraper&#39;&gt;<br>                    &lt;div class=&#39;bulk-wrap-line title-line&#39;&gt;<br>                        &lt;div&gt;${lang[&#39;products.options&#39;]}&lt;/div&gt;<br>                        &lt;div&gt;&lt;/div&gt;<br>                        &lt;div&gt;${lang[&#39;products.quantity&#39;]}&lt;/div&gt;<br>                    &lt;/div&gt;<br>                    &lt;div class=&#39;bulk-option-wrap&#39;&gt;<br>                        ${shablon}<br>                    &lt;/div&gt;<br>                    &lt;button class=&#39;button bulk-buy-button&#39;&gt;${lang[&#39;products.add_to_cart&#39;]}&lt;/button&gt;<br>                    &lt;div class=&#39;error-msg&#39;&gt;<br>                        &lt;span style=&#39;display: none;&#39;&gt;${lang[&#39;products.select_one&#39;]}&lt;/span&gt;<br>                    &lt;/div&gt;<br>                &lt;/div&gt;<br>                <br>                `;<br><br>                item.classList.add(&#39;bulk-add&#39;);<br>            }<br>        })<br>    });<br><br>    const checkBulk = document.querySelectorAll(&#39;.checker&#39;);<br>    checkBulk.forEach(check =&gt; {<br>        check.onchange = () =&gt; {<br>            const element = check.parentElement.parentElement;<br>            const qty = element.querySelector(&#39;.product-qty&#39;);<br>            if (check.checked) {<br>                qty.value = 1;<br>            } else {<br>                qty.value = 0;<br>            }<br>        }<br>    });<br><br>    const productQty = document.querySelectorAll(&#39;.product-qty&#39;);<br>    productQty.forEach(qty =&gt; {<br>        qty.onchange = () =&gt; {<br>            const element = qty.parentElement;<br>            const checker = element.querySelector(&#39;.checker&#39;);<br>            if (qty.value &gt; 0) {<br>                checker.checked = true;<br>            } else {<br>                checker.checked = false;<br>            }<br>        }<br>    })<br><br>    const bulkBuyButton = document.querySelectorAll(&#39;.bulk-buy-button&#39;);<br>    bulkBuyButton.forEach(buy =&gt; {<br>        buy.onclick = async () =&gt; {<br>            const orderProduct = [];<br>            const element = buy.parentElement;<br>            const errorMsg = element.querySelector(&#39;.error-msg span&#39;)<br>            const qtyLine = element.querySelectorAll(&#39;.product-qty&#39;);<br>            const skuLine = element.querySelectorAll(&#39;.bulk-option-line&#39;);<br>            const chackBulk = element.querySelectorAll(&#39;.checker&#39;);<br><br>            for (let i = 0; i&lt;qtyLine.length; i++){<br>                if (qtyLine[i].value &gt; 0) {<br>                    orderProduct.push(`/cart.php?action=add&amp;sku=${skuLine[i].dataset.sku}&amp;qty=${qtyLine[i].value}`);<br>                }<br>            };<br><br>            if (orderProduct.length &gt; 0) {<br>                errorMsg.style.display = &#39;none&#39;;<br>                buy.innerText = lang[&#39;products.adding_to_cart&#39;];<br>                buy.disabled = true;<br>                for (const link of orderProduct) {<br>                    const res = await fetch(link);<br>                }<br>                qtyLine.forEach(line =&gt; {<br>                    line.value = 0;<br>                });<br>                chackBulk.forEach(item =&gt; {<br>                    item.checked = false;<br>                });<br>                buy.disabled = false;<br>                cartUpdate();<br>                buy.innerText = `${lang[&#39;products.add_to_cart&#39;]}`;<br>            } else {<br>                errorMsg.style.display = &#39;block&#39;;<br>                const remover = () =&gt; {<br>                    errorMsg.style.display = &#39;none&#39;;<br>                };<br>                setTimeout(remover, 4000);<br>            }<br>        }<br>    })<br>}</pre><p>The last step is to add some styling to make our block look good.</p><pre>$black: #000000;<br>$white: #ffffff;<br>$gray: #555555;<br>$warning: red;<br>$success: #82B456;<br><br>.option-order-box {<br>    .error-msg {<br>        span {<br>            color: $warning;<br>        }<br>    }<br><br>    .bulk-wraper {<br>        padding: 15px;<br>        background-color: $white;<br>        position: relative;<br>        border: 1px solid $gray;<br>        border-radius: 4px;<br><br>        .title-line {<br>            display: flex;<br>            justify-content: space-between;<br>            gap: 14px;<br>        }<br><br>        .bulk-buy-button {<br>            display: flex;<br>            justify-content: center;<br>            width: 100%;<br>            border-color: $black;<br>            color: $black;<br>            margin-bottom: 0;<br>        }<br>    }<br><br>    .bulk-option-wrap {<br>        .bulk-option-line {<br>            display: flex;<br>            justify-content: space-between;<br>            gap: 15px;<br>            align-items: center;<br>            margin-bottom: 10px;<br><br>            .bulk-option-group {<br>                display: flex;<br>                gap: 7px;<br>                flex: 2;<br>            }<br><br>            .product-qty {<br>                height: 24px;<br>                width: 50px;<br>                color: $black;<br>                text-align: right;<br>                border-color: $black;<br>                border-radius: 0;<br>                border-width: 1px;<br><br>                &amp;::placeholder {<br>                    color: $black;<br>                }<br>            }<br><br>            p {<br>                margin-bottom: 0;<br>                flex: 2;<br>                line-height: 1;<br>            }<br><br>            .price-block {<br>                white-space: nowrap;<br>                text-align: right;<br>            }<br><br>            .text-through {<br>                text-decoration: line-through;<br>            }<br><br>            .checker {<br>                -moz-appearance: none;<br>             -webkit-appearance: none;<br>             -o-appearance: none;<br>             outline: none;<br>             content: none;<br>                width: 15px;<br>                height: 15px;<br><br>                &amp;::before {<br>                    content: &quot;\2713&quot;;<br>                    font-weight: 700;<br>                    font-size: 10px;<br>                    color: transparent;<br>                    background: $white;<br>                    display: block;<br>                    width: 15px;<br>                    height: 15px;<br>                    border: 1px solid $gray;<br>                    display: flex;<br>                    justify-content: center;<br>                    align-items: center;<br>                }<br><br>                &amp;:checked:before {<br>                    color: $black;<br>                }<br>            }<br><br>            .product-marker {<br>                .status-marker {<br>                    height: 10px;<br>                    width: 10px;<br>                    border-radius: 50%;<br>                    display: block;<br>                }<br><br>                .warning-marker{<br>                    background-color: $warning;<br>                }<br>                .success-marker {<br>                    background-color: $success;<br>                }<br>            }<br>        }<br>    }<br>}</pre><p>And to tie it all together, optionCard.js import in optionProductData.js</p><p>import optionCard from ‘./optionCard’ and call.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*TsKQ1LQDqoFGVodw4_QjMw.jpeg" /></figure><p>Result in category page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*3KdBJVZf5xP3XuwmQ0deKw.png" /></figure><p>This is only one implementation option, the data can be used for different tasks, as well as for different listing pages. Having an effective way of adding data, you can build interfaces of different complexity.</p><p>At <a href="https://e-commerce.blackbit.com/en/platforms/BigCommerce?__hstc=175408818.d494e27dceaea10ff668d0dcf572639c.1700755196665.1701103440173.1701176158578.7&amp;__hssc=175408818.9.1701176158578&amp;__hsfp=682272519">Blackbit</a>, we always try to implement all the additional and not provided by standard themes functionality that is necessary for effective sales and improvement of user experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43aebabf6c57" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>